From: Loganaden Velvindron Date: Thu, 12 May 2022 14:04:17 +0000 (+0400) Subject: zebra: Add startup message and display netlink buffer size. X-Git-Tag: base_8.3~61^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=0c99696f302a750b211166e6f662f913c739f823;p=matthieu%2Ffrr.git zebra: Add startup message and display netlink buffer size. Add startup message and display netlink buffer size. Signed-off-by: Loganaden Velvindron --- diff --git a/zebra/main.c b/zebra/main.c index 7ef30d1d49..3ae20361be 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -79,8 +79,9 @@ int graceful_restart; bool v6_rr_semantics = false; /* Receive buffer size for kernel control sockets */ +#define RCVBUFSIZE_MIN 4194304 #ifdef HAVE_NETLINK -uint32_t rcvbufsize = 4194304; +uint32_t rcvbufsize = RCVBUFSIZE_MIN; #else uint32_t rcvbufsize = 128 * 1024; #endif @@ -365,6 +366,10 @@ int main(int argc, char **argv) break; case 's': rcvbufsize = atoi(optarg); + if (rcvbufsize < RCVBUFSIZE_MIN) + fprintf(stderr, + "Rcvbufsize is smaller than recommended value: %d\n", + RCVBUFSIZE_MIN); break; #ifdef HAVE_NETLINK case 'n': diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index b20d8daf38..3756f8153c 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -3914,6 +3914,7 @@ DEFUN (show_zebra, ipforward_ipv6() ? "On" : "Off"); ttable_add_row(table, "MPLS|%s", mpls_enabled ? "On" : "Off"); ttable_add_row(table, "EVPN|%s", is_evpn_enabled() ? "On" : "Off"); + ttable_add_row(table, "Kernel socket buffer size|%d", rcvbufsize); #ifdef GNU_LINUX