From: Donald Sharp Date: Wed, 16 Nov 2016 19:38:14 +0000 (-0500) Subject: pimd: Increase kernel socket rcvbuf size. X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~85 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4f7c4a76d8cb3e5863e3f23df2b4ff4f89055f6b;p=mirror%2Ffrr.git pimd: Increase kernel socket rcvbuf size. We are receiving notifications from the linux kernel that we are filling up the receive buffer for upcalls into pimd. Let's increase the size to something a bit bigger. Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 2557ac9710..3b8aed033c 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -53,6 +53,7 @@ static int pim_mroute_set(int fd, int enable) int err; int opt = enable ? MRT_INIT : MRT_DONE; socklen_t opt_len = sizeof(opt); + int rcvbuf = 1024 * 1024 * 8; err = setsockopt(fd, IPPROTO_IP, opt, &opt, opt_len); if (err) { @@ -62,6 +63,12 @@ static int pim_mroute_set(int fd, int enable) return -1; } + err = setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf)); + if (err) { + zlog_warn("%s: failure: setsockopt(fd=%d, SOL_SOCKET, %d): errno=%d: %s", + __PRETTY_FUNCTION__, fd, rcvbuf, errno, safe_strerror(errno)); + } + if (enable) { int upcalls = IGMPMSG_WRVIFWHOLE;