[systemd-devel] persistent network device names

Keller, Jacob E jacob.e.keller at intel.com
Tue Jul 28 10:15:49 PDT 2015


On Tue, 2015-07-28 at 06:22 +0300, Andrei Borzenkov wrote:
> В Mon, 27 Jul 2015 19:05:37 +0000
> "Keller, Jacob E" <jacob.e.keller at intel.com> пишет:
> 
> > On Mon, 2015-07-27 at 21:53 +0300, Andrei Borzenkov wrote:
> > > В Mon, 27 Jul 2015 18:29:57 +0000
> > > "Keller, Jacob E" <jacob.e.keller at intel.com> пишет:
> > > 
> > > > On Mon, 2015-07-27 at 21:12 +0300, Andrei Borzenkov wrote:
> > > > > В Mon, 27 Jul 2015 17:52:59 +0000
> > > > > "Keller, Jacob E" <jacob.e.keller at intel.com> пишет:
> > > > > 
> > > > > > Hello,
> > > > > > 
> > > > > > I am working with a network device that can create virtual 
> > > > > > function
> > > > > > devices. When I create a large (>8) vfs for this device I 
> > > > > > get 
> > > > > > some
> > > > > > weird device names,
> > > > > > 
> > > > > > If I create 64 vfs, I see something like:
> > > > > > 
> > > > > > ens8
> > > > > > ens8f[1-7
> > > > > > en8sfs1-7]]
> > > 
> > > Are you sure? I do not see where such names would be generated.
> > > 
> > 
> > Yes. These are generated via the hotplug section of udev-builtin
> > -net_id.c rules
> > 
> > on line: 230 or so.
> > 
> 
> I do not see where it generates double 's'.
> 

Sorry that is a typo it looks like

ens8f[1-7]

and then

enp8s1f[1-7]

Basically, sometimes it uses the hotplug slot format and sometimes it
uses the full format, since the hotplug slot is

0000:08:00.0

and the SR-IOV devices show up as part slot part func.

every slot in my platform has "00" for the slot part of the PCI path,
and some number for the bus.

It seems wrong that devices plugged into the hotplug slot don't always
get found as "in" that slot, but maybe this is because slots are able
to actually show up as domain:bus:slot with a non-zero value for slot?
none of my platforms have non-zero slot for their hotplug slots...

But the current naming scheme for hotplug slots assumes they can be non
-zero.

> 
> > > > It looks like my issue comes from the "hotplug_slot" stuff, 
> > > > which
> > > > overwrites the "enp8s0f0" into "ens8"... that is what causes 
> > > > this 
> > > > dual
> > > > -name scheme confusion.
> > > > 
> > > 
> > > You can disable hotplug slot-based naming by setting suitable
> > > NamePolicy for network links (drop "slot"). 
> > 
> > How can I define my own version of the net_id which does what I 
> > would
> > like and run that in my udev rule?
> 
> 
> man systemd.link
> 
> specifically description of NamePolicy
 I see. Thank you.

Regards,
Jake


More information about the systemd-devel mailing list