[systemd-devel] Inconsistent device naming for dual-port or multi-port network devices
Kay Sievers
kay at vrfy.org
Mon May 5 05:44:48 PDT 2014
On Mon, May 5, 2014 at 2:35 PM, Robert Milasan <rmilasan at suse.com> wrote:
> Hello, seems that on some systems (in our cases s390x) a dual
> port network device, is named ens11 and ens11d1 which doesn't exactly
> looks normal (not sure if this in on purpose or not)
>
> udevadm info -a -p /sys/class/net/ens11 | grep dev_id
> ATTR{dev_id}=="0x0"
> udevadm info -a -p /sys/class/net/ens11d1 | grep dev_id
> ATTR{dev_id}=="0x1"
>
> Seems that in src/udev/udev-builtin-net_id.c:201 we don't use dev_id,
> if dev_id = 0.
>
> Again, checking the idea in the header of udev-builtin-net_id.c, the
> logic should be:
>
> en (ethernet), s <slot>, f <function>, d <dev_id>, but is not specified
> that dev_id is not use if dev_id = 0.
>
> The logic should be ens11d0 and ens11d1, at least according to how it
> is explained.
>
> I've attached the patch which fixes this issue, if this is not really a
> bug, then ignore the mail :)
It is intentional to suppress the always existing dev_id == 0.
If we care about the cosmetic issue that the first port has no dev_id
identifier, the drivers should start counting at 1 instead of 0 (like
the firmware index for cards always starts at 1).
Or alternatively the dev_id field could be entirely suppressed in the
kernel network core code for single instance cards.
Kay
More information about the systemd-devel
mailing list