]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Increase kernel socket rcvbuf size.
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 16 Nov 2016 19:38:14 +0000 (14:38 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:16 +0000 (20:26 -0500)
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 <sharpd@cumulusnetworks.com>
pimd/pim_mroute.c

index 2557ac9710c272bbe5ce3d6c4c0330c48703dc04..3b8aed033c3e1f32ca6049c52ab44ad94a89583a 100644 (file)
@@ -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;