[systemd-devel] udev interface naming for SR-IOV VFs

Kay Sievers kay at vrfy.org
Mon Apr 20 09:38:40 PDT 2015


On Tue, Apr 14, 2015 at 12:11 PM, Ido Barkan <ibarkan at redhat.com> wrote:
> Hi all,
>
> I am VDSM developer in the Ovirt project.
>
> We are implementing support for SR-IOV network cards. Afer the changing of
> the number of VFs on the card and programmatically querying for all links
> (we use libnl for this) we observe that *during the iteration* over the links
> some of them were renamed by udev and still were not. Meanning, some of them
> are called 'ethN' and some are called 'enp2sNf2' (where N is an arbitrary
> number). Also, there are times that not all of the devices are returned from
> libnl.
> After a _while_ everything stabilizes (# of interfaces and names).
>
> My questions:
> 1. Is this what you would expect from udev? Meaning, this is just async behavior?

Udev has no specific knowledge, there is nothing really it could provide here.

> 2. Is there a way to _know_ programmticaly that everything was probed and renamed?
>    Not a heuristic?

Only if you know which devices to expect and listen to udev monitor
events when they appear and react to them. The device handling is
finished before the event is sent out.

Udev generally has no idea when things have been probed or what to wait for.

Kay


More information about the systemd-devel mailing list