summaryrefslogtreecommitdiff
path: root/src/systemd/sd-rtnl.h
diff options
context:
space:
mode:
authorAlin Rauta <alin.rauta@intel.com>2014-11-27 18:50:48 +0100
committerTom Gundersen <teg@jklm.no>2014-11-27 18:59:47 +0100
commitbe660c371b231c253a97464ddd8f32ec8721da21 (patch)
tree5d66f4f5a4abb1a0e011b1cca596280dc065063c /src/systemd/sd-rtnl.h
parent0e3434aeb1eed951fdbeddacc6126e10d82a1c8b (diff)
networkd: fix kernel rtnl receive buffer overrun error
We got the following error when running systemd on a device with many ports: "rtnl: kernel receive buffer overrun Event source 'rtnl-receive-message' returned error, disabling: No buffer space available" I think the kernel socket receive buffer queue should be increased. The default value is taken from: "/proc/sys/net/core/rmem_default", but we can overwrite it using SO_RCVBUF socket option. This is already done in networkd for other sockets. For example, the bus socket (sd-bus/bus-socket.c) has a receive queue of 8MB. In our case, the default is 208KB. Increasing the buffer receive queue for manager socket to 512KB should be enough to get rid of the above error. [tomegun: bump the limit even higher to 8M]
Diffstat (limited to 'src/systemd/sd-rtnl.h')
-rw-r--r--src/systemd/sd-rtnl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/systemd/sd-rtnl.h b/src/systemd/sd-rtnl.h
index 0980de8e3..95bdb1d3d 100644
--- a/src/systemd/sd-rtnl.h
+++ b/src/systemd/sd-rtnl.h
@@ -41,6 +41,7 @@ typedef int (*sd_rtnl_message_handler_t)(sd_rtnl *rtnl, sd_rtnl_message *m, void
/* bus */
int sd_rtnl_open(sd_rtnl **nl, unsigned n_groups, ...);
+int sd_rtnl_inc_rcvbuf(const sd_rtnl *const rtnl, const int size);
sd_rtnl *sd_rtnl_ref(sd_rtnl *nl);
sd_rtnl *sd_rtnl_unref(sd_rtnl *nl);