On 06/29/2017 02:05 PM, ZhiPeng Lu wrote:
nl_recv() returns the error "No buffer space available"
when using virsh destroy domain with 240 or more
passhthrough network interfaces.
pass-through
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(a)zte.com.cn>
---
src/util/virnetlink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
This feels like something that perhaps should be configurable - that is
some /etc/libvirt/libvirtd.conf variable; otherwise, we'll keep hitting
some conflated maximum based on the size of something.
John
There's quite a bit of history in the archives from the original
implementation of this API... Not sure if you read it or not, but since
I was looking through the history, here
v1:
https://www.redhat.com/archives/libvir-list/2015-December/msg00407.html
v1 followup:
https://www.redhat.com/archives/libvir-list/2016-January/msg00107.html
v2:
https://www.redhat.com/archives/libvir-list/2016-January/msg00339.html
v3:
https://www.redhat.com/archives/libvir-list/2016-January/msg00342.html
v4:
https://www.redhat.com/archives/libvir-list/2016-January/msg00866.html
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);