NetworkManager/src/platform
Thomas Haller ed82b6bcb3 platform: increase initial buffer size of libnl's nl_recvmsg() to 32K
Since commit 9fafb382db, we would
explicitly set libnl's socket buffer size to 4*getpagesize().
That is also the default of libnl itself. Additionally, we would
workaround too small buffers by increasing the buffer size up to 512K.

A too small buffer causes messages to be lost. Usually, that only
results in a cache-resync, which isn't too bad. Lost messages are however
a problem if the lost message was an ACK that we were waiting for.
However, it is rather unlikely to happen, because it's expected that
the buffer size gets adjusted already when the cache is filled initially,
before any other requests are pending.

Still, let's increase the default buffer size to 32K, hoping that this
initial value is already large enough to avoid the problem altogether.

Note that iproute2 also uses a buffer size of 32K [1] [2].

Alternatively, we could use MSG_PEEK like systemd does [3]. However,
that requires two syscalls per message.

[1] https://patchwork.ozlabs.org/patch/592178/
[2] https://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/tree/lib/libnetlink.c?id=f5f760b81250630da23a4021c30e802695be79d2#n274
[3] cd66af2274/src/libsystemd/sd-netlink/netlink-socket.c (L323)
2016-12-02 15:23:11 +01:00
..
tests build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
wifi build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
nm-fake-platform.c core: don't use generated glib enum for platform types 2016-10-22 17:16:17 +02:00
nm-fake-platform.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-linux-platform.c platform: increase initial buffer size of libnl's nl_recvmsg() to 32K 2016-12-02 15:23:11 +01:00
nm-linux-platform.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-platform-utils.c core: merge NM_PLATFORM_LINK_DUPLEX_UNSET and UNKNOWN 2016-11-22 15:24:47 +01:00
nm-platform-utils.h platform: add APIs to allow link negotiation management 2016-11-22 15:24:47 +01:00
nm-platform.c platform: add APIs to allow link negotiation management 2016-11-22 15:24:47 +01:00
nm-platform.h core: merge NM_PLATFORM_LINK_DUPLEX_UNSET and UNKNOWN 2016-11-22 15:24:47 +01:00
nmp-netns.c core: refactor private data for NMExportedObject and others 2016-10-03 12:04:14 +02:00
nmp-netns.h core: refactor private data for NMExportedObject and others 2016-10-03 12:04:14 +02:00
nmp-object.c platform: don't use static temporary cache_id 2016-12-01 10:57:35 +01:00
nmp-object.h platform: don't use static temporary cache_id 2016-12-01 10:57:35 +01:00