From ea89da381fc682155e7d08d6ad3d4ac8aa5fe115 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sun, 11 Oct 2009 18:56:16 +0200 Subject: Workaround for stupid callback scheduler. There is no reak callback scheduler and previous behavior causes bad things during hard congestion (like BGP hold timeouts). Smart callback scheduler is still missing, but main loop was changed such that it first processes all tx callbacks (which are fast enough) (but max 4* per socket) + rx callbacks for CLI, and in the second phase it processes one rx callback per socket up to four sockets (as rx callback can be slow when there are too many protocols, because route redistribution is done synchronously inside rx callback). If there is event callback ready, second phase is skipped in 90% of iterations (to speed up CLI during congestion). --- lib/socket.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/socket.h b/lib/socket.h index f192260..53e89ed 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -51,6 +51,7 @@ void sk_reallocate(sock *); /* Free and allocate tbuf & rbuf */ void sk_dump_all(void); int sk_set_ttl(sock *s, int ttl); /* Set TTL for given socket */ int sk_set_md5_auth(sock *s, ip_addr a, char *passwd); /* Add or remove security associations for given passive socket */ +int sk_rx_ready(sock *s); static inline int sk_send_buffer_empty(sock *sk) -- cgit v1.2.3