]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodedev: Increase the netlink socket buffer size to the one used by udev
authorning.bo <ning.bo9@zte.com.cn>
Tue, 9 May 2017 02:09:07 +0000 (10:09 +0800)
committerErik Skultety <eskultet@redhat.com>
Mon, 29 May 2017 13:57:04 +0000 (15:57 +0200)
commitd1eea6c12aad5cb503562a52915138bf0d0a70a2
tree5a947e7db3b7f6b94d78ab2bb7f7ecacdbad7b6c
parent6e9e1423e1b30e0683f016f830d4b73da8423af4
nodedev: Increase the netlink socket buffer size to the one used by udev

When a number of SRIOV VFs (up to 128 on Intel XL710) is created:
for i in `seq 0 1`; do
  echo 63 > /sys/class/net/<interface>/device/sriov_numvfs
done

libvirtd will then report "udev_monitor_receive_device returned NULL"
error because the netlink socket buffer is not big enough (using GDB on
libudev confirmed this with ENOBUFFS) and thus some udev events were
dropped. This results in some devices being missing in the nodedev-list
output. This patch overrides the system's rmem_max limit but for that,
we need to make sure we've got root privileges.

https://bugzilla.redhat.com/show_bug.cgi?id=1450960

Signed-off-by: ning.bo <ning.bo9@zte.com.cn>
Signed-off-by: Erik Skultety <eskultet@redhat.com>
src/node_device/node_device_udev.c