From 4f7c4a76d8cb3e5863e3f23df2b4ff4f89055f6b Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 16 Nov 2016 14:38:14 -0500 Subject: [PATCH] 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 --- pimd/pim_mroute.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.39.5