[PATCH v1][libnl3] lib/nl: Increase default receive socket buffer size to 128k

Leno Hou lenohou at gmail.com
Wed Dec 9 19:22:05 PST 2015


From: Leno Hou <houqy at linux.vnet.ibm.com>

This patch set default receive socket buffer size to 128K to solve
nl_recv returned with error: No buffer space available
1. When switching CPUs to offline/online in a system more than 128 cpus
2. When using virsh to destroy domain in a system with more interfaces
3. When NetworkMananger monitoring some uevents,e.g. netlink is changed.

Signed-off-by: Leno Hou <lenohou at gmail.com>
---
 lib/nl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/nl.c b/lib/nl.c
index 8fc9ec1..0b9807e 100644
--- a/lib/nl.c
+++ b/lib/nl.c
@@ -122,7 +122,7 @@ int nl_connect(struct nl_sock *sk, int protocol)
 		goto errout;
 	}
 
-	err = nl_socket_set_buffer_size(sk, 0, 0);
+	err = nl_socket_set_buffer_size(sk, 131702, 0);
 	if (err < 0)
 		goto errout;
 
-- 
2.1.0




More information about the libnl mailing list