Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kcgthb opened this issue Jul 16, 2020 · 0 comments

Comments

@kcgthb
Copy link

kcgthb commented Jul 16, 2020

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!

pmachata pushed a commit to pmachata/mlnx-tools that referenced this issue Sep 10, 2020
Example:
show_irq_affinity.sh mlx5_0 show_cpu_number
Note: without the show_cpu_number flag, the output will be as it was.

output before:
124: 0,00000001
125: 0,00000002
126: 0,00000004
127: 0,00000008
128: 0,00000010
129: 0,00000020
130: 0,00000040

output after:
124 (cpu #0): 0,00000001
125 (cpu Mellanox#1): 0,00000002
126 (cpu Mellanox#2): 0,00000004
127 (cpu Mellanox#3): 0,00000008
128 (cpu Mellanox#4): 0,00000010
129 (cpu Mellanox#5): 0,00000020
130 (cpu Mellanox#6): 0,00000040

Signed-off-by: Guy Twig <[email protected]>
Signed-off-by: Vladimir Sokolovsky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant