platform: increase netlink socket receive buffer size
When the receive buffer is too small, we easily can hit ENOBUFS during recvmsg()
and need to resync the platform cache. But even worse, we possibly also loose
ACKs for pending netlink requests so that requests seem to fail (although they
might have succeeded).
Avoid that harder by increasing the buffer size to 8MB. This is also
done by networkd:
be660c371b
This commit is contained in:
@@ -5954,14 +5954,8 @@ constructed (GObject *_object)
|
|||||||
nle = nl_socket_set_nonblocking (priv->nlh);
|
nle = nl_socket_set_nonblocking (priv->nlh);
|
||||||
g_assert (!nle);
|
g_assert (!nle);
|
||||||
|
|
||||||
/* The default buffer size wasn't enough for the testsuites. It might just
|
/* use 8 MB for receive socket kernel queue. */
|
||||||
* as well happen with NetworkManager itself. For now let's hope 128KB is
|
nle = nl_socket_set_buffer_size (priv->nlh, 8*1024*1024, 0);
|
||||||
* good enough.
|
|
||||||
*
|
|
||||||
* FIXME: it's unclear that this is still actually needed. The testsuite
|
|
||||||
* certainly doesn't fail for me. Maybe it can be removed.
|
|
||||||
*/
|
|
||||||
nle = nl_socket_set_buffer_size (priv->nlh, 131072, 0);
|
|
||||||
g_assert (!nle);
|
g_assert (!nle);
|
||||||
|
|
||||||
nle = nl_socket_add_memberships (priv->nlh,
|
nle = nl_socket_add_memberships (priv->nlh,
|
||||||
|
Reference in New Issue
Block a user