[systemd-devel] persisting sriov_numvfs
Dan Kenigsberg
danken at redhat.com
Mon Jan 19 06:18:15 PST 2015
Hello, list.
I'm an http://oVirt.org developer, and we plan to (finally) support
SR-IOV cards natively. Working on this feature, we've noticed that
something is missing in the platform OS.
If I maintain a host with sr-iov cards, I'd like to use the new kernel
method of defining how many virtual functions (VFs) are to be exposed by
each physical function:
# echo 3 > /sys/class/net/enp2s0f0/device/sriov_numvfs
This spawns 3 new devices, for which udev allocated (on my host) the names
enp2s16, enp2s16f2 and enp2s16f4.
I can attach these VFs to virtual machines, but I can also use them as
yet another host NIC. Let's assume that I did the latter, and persisted
its IP address using initscripts in
/etc/sysconfig/network-scripts/ifcfg-enp2s16f4.
However, on the next boot, sriov_numvfs is reset to 0, there's no
device named enp2s16f4, and certainly no IP address asigned to it.
The admin can solve his own private issue by writing a service to start
after udev allocats device names but before network services kick in,
and re-apply his "echo" there. But it feels like something that should
be solved in a more generic fashion. It is also not limitted to network
device. As similar issue would affect anything that attempts to refer to
a VF by its name, and survive reboot.
How should this be implemented in the realm of systemd?
Regards,
Dan.
More information about the systemd-devel
mailing list