[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] util: increase libnl buffer size to 1M



nl_recv() returns the error "No buffer space available"
when using virsh destroy domain with 240 or more
passhthrough network interfaces.
The patch increases libnl sock receive buffer size to 1M,
and nl_recv() doesn't return error when destroying domain
with 512 network interfaces.

Signed-off-by: ZhiPeng Lu <lu zhipeng zte com cn>
---
 src/util/virnetlink.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
index 92ecf77..bb56c54 100644
--- a/src/util/virnetlink.c
+++ b/src/util/virnetlink.c
@@ -189,10 +189,10 @@ virNetlinkCreateSocket(int protocol)
         goto error;
     }
 
-    if (virNetlinkSetBufferSize(nlhandle, 131702, 0) < 0) {
+    if (virNetlinkSetBufferSize(nlhandle, 1048576, 0) < 0) {
         virReportSystemError(errno, "%s",
                              _("cannot set netlink socket buffer "
-                               "size to 128k"));
+                               "size to 1M"));
         goto error;
     }
     nl_socket_enable_msg_peek(nlhandle);
-- 
1.8.3.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]