From: Julien Lepiller <julien@lepiller.eu>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 63516@debbugs.gnu.org
Subject: bug#63516: [PATCH Guile-Netlink 00/11] Add 'wait-for-link' and related code
Date: Tue, 23 May 2023 20:53:04 +0200 [thread overview]
Message-ID: <20230523205304.52d3c06a@sybil.lepiller.eu> (raw)
In-Reply-To: <20230523123951.6225-1-ludo@gnu.org>
Thanks, I was able to test it simply by doing something like
(wait-for-link "veth0") and from another terminal, "ip l add veth0 type
veth peer veth1" (it doesn't have to be veth, it's the first one I
thought of that I didn't have to reach the manual for).
Pushed to guile-netlink's master :)
Le Tue, 23 May 2023 14:39:40 +0200,
Ludovic Courtès <ludo@gnu.org> a écrit :
> 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
next prev parent reply other threads:[~2023-05-23 18:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 9:30 bug#63516: Static networking should wait for interfaces to be up Ludovic Courtès
2023-05-20 23:03 ` Ludovic Courtès
2023-05-23 12:39 ` bug#63516: [PATCH Guile-Netlink 00/11] Add 'wait-for-link' and related code Ludovic Courtès
2023-05-23 12:39 ` bug#63516: [PATCH Guile-Netlink 01/11] connection: Remove unused procedure Ludovic Courtès
2023-05-23 12:39 ` bug#63516: [PATCH Guile-Netlink 02/11] connection: Use Guile's 'socket' procedure to open a socket Ludovic Courtès
2023-05-23 12:39 ` bug#63516: [PATCH Guile-Netlink 03/11] connection: Throw upon errors in FFI bindings Ludovic Courtès
2023-05-23 12:39 ` bug#63516: [PATCH Guile-Netlink 04/11] connection: Add support for suspendable sockets Ludovic Courtès
2023-05-23 12:39 ` bug#63516: [PATCH Guile-Netlink 05/11] connection: Allow users to pass extra SOCK_ flags to 'socket' Ludovic Courtès
2023-05-23 12:39 ` bug#63516: [PATCH Guile-Netlink 06/11] link: Extract 'new-link-message->link' Ludovic Courtès
2023-05-23 12:39 ` bug#63516: [PATCH Guile-Netlink 07/11] addr: Extract 'new-address-message->address' Ludovic Courtès
2023-05-23 12:39 ` bug#63516: [PATCH Guile-Netlink 08/11] connection: Add 'add-socket-membership' Ludovic Courtès
2023-05-23 12:39 ` 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 12:39 ` bug#63516: [PATCH Guile-Netlink 10/11] doc: Add indexes Ludovic Courtès
2023-05-23 12:39 ` bug#63516: [PATCH Guile-Netlink 11/11] link: Add 'wait-for-link' Ludovic Courtès
2023-05-23 18:53 ` Julien Lepiller [this message]
2023-05-24 14:55 ` bug#63516: [PATCH Guile-Netlink 00/11] Add 'wait-for-link' and related code Ludovic Courtès
2023-05-24 15:12 ` Julien Lepiller
2023-06-14 21:53 ` bug#63516: Static networking should wait for interfaces to be up Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230523205304.52d3c06a@sybil.lepiller.eu \
--to=julien@lepiller.eu \
--cc=63516@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.