[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63516: [PATCH Guile-Netlink 00/11] Add 'wait-for-link' and related c
From: |
Ludovic Courtès |
Subject: |
bug#63516: [PATCH Guile-Netlink 00/11] Add 'wait-for-link' and related code |
Date: |
Tue, 23 May 2023 14:39:40 +0200 |
Hi Julien,
As a followup to <https://issues.guix.gnu.org/63516>, here is code that
lets us wait for a link to show up “the right way”—i.e., without polling.
It works over SOCK_NONBLOCK sockets, for use in Fibers programs.
I tested it in a VM created with ‘guix system vm’. If the “ens3” device
is already there, (wait-for-link "ens3") returns immediately. Then I
ran “rmmod e1000” to make the device disappear, and made another
(wait-for-link "ens3") call: that call returns once I’ve run “modprobe e1000”
in another terminal. Wonderful. :-)
Now, it would be good to have a test suite that can run without
complicated setups. We should check the strategy used by libnl, systemd,
and the likes.
Thoughts?
Ludo’.
Ludovic Courtès (11):
connection: Remove unused procedure.
connection: Use Guile's 'socket' procedure to open a socket.
connection: Throw upon errors in FFI bindings.
connection: Add support for suspendable sockets.
connection: Allow users to pass extra SOCK_ flags to 'socket'.
link: Extract 'new-link-message->link'.
addr: Extract 'new-address-message->address'.
connection: Add 'add-socket-membership'.
error: Add 'sub-type' field to '&netlink-decoder-error' and use it.
doc: Add indexes.
link: Add 'wait-for-link'.
doc/guile-netlink.texi | 51 +++++++++++++++--
ip/addr.scm | 46 +++++++--------
ip/link.scm | 122 ++++++++++++++++++++++++++++++---------
ip/route.scm | 6 +-
netlink/connection.scm | 126 +++++++++++++++++++++++++++--------------
netlink/constant.scm | 40 +++++++++++++
netlink/data.scm | 13 +++--
netlink/error.scm | 4 +-
8 files changed, 303 insertions(+), 105 deletions(-)
base-commit: beceb4cfea4739954e558411f46e07425891c774
--
2.40.1
- bug#63516: Static networking should wait for interfaces to be up, Ludovic Courtès, 2023/05/15
- bug#63516: Static networking should wait for interfaces to be up, Ludovic Courtès, 2023/05/20
- bug#63516: [PATCH Guile-Netlink 00/11] Add 'wait-for-link' and related code,
Ludovic Courtès <=
- bug#63516: [PATCH Guile-Netlink 07/11] addr: Extract 'new-address-message->address'., Ludovic Courtès, 2023/05/23
- bug#63516: [PATCH Guile-Netlink 04/11] connection: Add support for suspendable sockets., Ludovic Courtès, 2023/05/23
- bug#63516: [PATCH Guile-Netlink 02/11] connection: Use Guile's 'socket' procedure to open a socket., Ludovic Courtès, 2023/05/23
- bug#63516: [PATCH Guile-Netlink 01/11] connection: Remove unused procedure., Ludovic Courtès, 2023/05/23
- bug#63516: [PATCH Guile-Netlink 03/11] connection: Throw upon errors in FFI bindings., Ludovic Courtès, 2023/05/23
- bug#63516: [PATCH Guile-Netlink 08/11] connection: Add 'add-socket-membership'., Ludovic Courtès, 2023/05/23
- bug#63516: [PATCH Guile-Netlink 10/11] doc: Add indexes., Ludovic Courtès, 2023/05/23
- bug#63516: [PATCH Guile-Netlink 09/11] error: Add 'sub-type' field to '&netlink-decoder-error' and use it., Ludovic Courtès, 2023/05/23
- bug#63516: [PATCH Guile-Netlink 11/11] link: Add 'wait-for-link'., Ludovic Courtès, 2023/05/23
- bug#63516: [PATCH Guile-Netlink 06/11] link: Extract 'new-link-message->link'., Ludovic Courtès, 2023/05/23