1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Sockets: Unified API for main and other loops

Now sk_open() requires an explicit IO loop to open the socket in. Also
specific functions for socket RX pause / resume are added to allow for
BGP corking.

And last but not least, socket reloop is now synchronous to resolve
weird cases of the target loop stopping before actually picking up the
relooped socket. Now the caller must ensure that both loops are locked
while relooping, and this way all sockets always have their respective
loop.
This commit is contained in:
Maria Matejka
2023-04-02 19:15:22 +02:00
parent 571c4f69bf
commit 836e857b30
20 changed files with 243 additions and 227 deletions

View File

@@ -2043,7 +2043,7 @@ nl_open_async(void)
sk->rx_hook = nl_async_hook;
sk->err_hook = nl_async_err_hook;
sk->fd = fd;
if (sk_open(sk) < 0)
if (sk_open(sk, &main_birdloop) < 0)
bug("Netlink: sk_open failed");
}