Merge pull request #11192 from cyberstorm-mauritius/zebra_netlink

zebra: Add startup message and display netlink buffer size.
This commit is contained in:
Mark Stapp 2022-05-17 08:13:23 -04:00 committed by GitHub
commit 6ca1b0f44e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -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':

View File

@ -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