summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-04-06 11:49:34 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-04-06 11:49:34 +0200
commit9e7b3ebdf9556d7464911dd39e862b1c003319b3 (patch)
treef1b3415e75106fd7d1ab7d17c7c47cb6e0f7583d /lib
parente86cfd41d975122cc944db68383aef4028da9575 (diff)
IO: Replace RX priority heuristic with explicit mark
In BIRD, RX has lower priority than TX with the exception of RX from control socket. The patch replaces heuristic based on socket type with explicit mark and uses it for both control socket and BGP session waiting to be established. This should avoid an issue when during heavy load, outgoing connection could connect (TX event), send open, but then failed to receive OPEN / establish in time, not sending notifications between and therefore got hold timer expired error from the neighbor immediately after it finally established the connection.
Diffstat (limited to 'lib')
-rw-r--r--lib/socket.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/socket.h b/lib/socket.h
index fbea92aa..0327e9e5 100644
--- a/lib/socket.h
+++ b/lib/socket.h
@@ -28,6 +28,7 @@ typedef struct birdsock {
struct iface *iface; /* Interface; specify this for broad/multicast sockets */
byte *rbuf, *rpos; /* NULL=allocate automatically */
+ uint fast_rx; /* RX has higher priority in event loop */
uint rbsize;
int (*rx_hook)(struct birdsock *, int size); /* NULL=receiving turned off, returns 1 to clear rx buffer */