]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
RPKI socket read is prioritized over other sockets
authorMaria Matejka <mq@ucw.cz>
Thu, 20 Jun 2024 17:39:09 +0000 (19:39 +0200)
committerMaria Matejka <mq@ucw.cz>
Wed, 26 Jun 2024 09:29:43 +0000 (11:29 +0200)
proto/rpki/transport.c
sysdep/unix/io-loop.c

index d3d8414bcefaed985ea90583ffb322129469ae0a..5188531455afa7229322e607bc6237fa410d76b6 100644 (file)
@@ -76,6 +76,7 @@ rpki_tr_open(struct rpki_tr_sock *tr)
   /* sk->type -1 is invalid value, a correct value MUST be set in the specific transport layer in open_fp() hook */
   sk->type = -1;
 
+  sk->fast_rx = 1;  /* We need to load the ROAs DAMN FAST */
   sk->tx_hook = rpki_connected_hook;
   sk->err_hook = rpki_err_hook;
   sk->data = cache;
index b69adc7ec5f20b42e04ba2d599a5f2dc019d5a29..6d66708c601b8cacb6167190916d6707dc87596b 100644 (file)
@@ -547,7 +547,7 @@ sockets_fire(struct birdloop *loop, _Bool read, _Bool write)
 
       /* Read until task limit is up */
       if (read && (rev & POLLIN))
-       while ((s == loop->sock_active) && s->rx_hook && sk_read(s, rev) && task_still_in_limit())
+       while ((s == loop->sock_active) && s->rx_hook && sk_read(s, rev) && (s->fast_rx || task_still_in_limit()))
          ;
 
       if (s != loop->sock_active)