Skip to content

82-net-setup-link.rules affects all network interfaces, not only the Mellanox ones #5

@kcgthb

Description

@kcgthb

There's an issue with the udev rules in 82-net-setup-link.rules, as they result in all network interfaces being renamed, irrespective of the net.ifnames and biosdevnames kernel options used to enable or disable consistent network interface device naming.

For instance, on a system with biosdevname=1 and net.ifnames=0, the expected name for a regular embedded Ethernet interface is em1.

With the rules in 82-net-setup-link.rules, the interface is first named em1 as expected, but then because of 82-net-setup-link.rules, it's renamed a 2nd time to the name that would have been used with net.ifnames=1 (here, it's enp99s0f0):

# udevadm test --action=add /sys/class/net/em1  |& grep -w NAME
NAME 'em1' /usr/lib/udev/rules.d/71-biosdevname.rules:22
'/etc/infiniband/vf-net-link-name.sh p0 701a77feffe197bc'(out) 'NAME=enp99s0f0'
NAME 'enp99s0f0' /etc/udev/rules.d/82-net-setup-link.rules:3
RUN '/sbin/ethtool -L $env{NAME} combined 4' /etc/udev/rules.d/82-net-setup-link.rules:3
NAME=enp99s0f0

Without those rules, the interface is named correctly:

# rm /etc/udev/rules.d/82-net-setup-link.rules
# udevadm test --action=add /sys/class/net/em1  |& grep -w NAME
NAME 'em1' /usr/lib/udev/rules.d/71-biosdevname.rules:22

I'm not exactly sure what the goal of those udev rules are, but they clearly don't work when consistent network interface device naming is disabled or when the naming rules are changed. And the impact non-Mellanox interfaces too, so maybe they could be restricted with a vendor check or something?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions