How to check tap device for sndbuf when I set sndbuf=0 in the interface xml

Yalan Zhang yalzhang at redhat.com
Mon Oct 31 08:12:34 UTC 2022


cc libvirt-users for more inputs

Hi,

I'm trying to find out how to check sndbuf for a tap device, could you
please help to check it?

In kernel 2.6.18, the tap device's default sndbuf is 1MB. There is a RFE
bug[1] and patch[2] to introduce the option below in libvirt to adjust the
sndbuf.
<tune>
<sndbuf>1600</sndbuf>
</tune>
It is said in the patch[2] that when we set sndbuf=0, we actually set it to
0xffffffff.
How to check if it is set successfully? I have checked the below files, the
value didn't change after I start a vm with sndbuf=0
# grep . /proc/sys/net/core/*mem_default
/proc/sys/net/core/rmem_default:212992
/proc/sys/net/core/wmem_default:212992

And from the doc[3]: "The default value is set by the
/proc/sys/net/core/wmem_default file and the maximum allowed value is set
by the /proc/sys/net/core/wmem_max file."
Current kernel 5.14.0-177.el9 has some updates about sndbuf:
# cat  /proc/sys/net/core/wmem_default
212992
# cat  /proc/sys/net/core/wmem_max
212992

Thank you!


[1] Bug 665293 <https://bugzilla.redhat.com/show_bug.cgi?id=665293> - RFE:
Allow setting size of send buffer per TAP device in QEMU driver
[2] https://listman.redhat.com/archives/libvir-list/2011-January/032763.html
[3] https://man7.org/linux/man-pages/man7/socket.7.html

Yalan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20221031/8ca78f3c/attachment.htm>


More information about the libvirt-users mailing list