Bug 1516283

Summary: Netdev names for nfp driver inconsistent
Product: Red Hat Enterprise Linux 7 Reporter: Jan Gutter (Netronome) <jan.gutter>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: high Docs Contact:
Priority: high    
Version: 7.5CC: bbreard, fsumsal, jiji, kzhang, qding, rkhan, sukulkar, systemd-maint-list, yuma
Target Milestone: beta   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-219-52.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 11:24:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1525606    
Bug Blocks:    

Description Jan Gutter (Netronome) 2017-11-22 12:15:21 UTC
Description of problem:

The nfp driver uses a similar model of creating multiple netdevs per physical PCI function that mlxsw* and rocker drivers use.

Upstream systemd provides support for consistent naming of these multiple netdevs in https://github.com/systemd/systemd/blob/master/src/udev/udev-builtin-net_id.c based on phys_port_id.

Unfortunately, enabling this globally caused regressions in other drivers, as documented in:

https://access.redhat.com/articles/3154771

The nfp driver in RHEL 7.4 does not expose phys_port_name for its netdevs, but the proposed module in RHEL 7.5 will.

Would it be possible to add an exception line to /usr/lib/udev/rules.d/76-phys-port-name.rules for the "nfp*" series drivers? This would cover nfp and nfp_netvf (if phys_port_name is used there in the future).

Version-Release number of selected component (if applicable):

systemd-219-42.el7_4.4.x86_64 is affected

How reproducible:

100% reproducable

Steps to Reproduce:

Boot using RHEL 7.4.1

Actual results:

(in this case)
netdevs are named enp5s0 and eth<x>

Expected results:

netdevs are named enp5s0np0 and enp5s0np1

Additional info:

This is a summary of the proposed change:

/usr/lib/udev/rules.d/76-phys-port-name.rules

--- /usr/lib/udev/rules.d/76-phys-port-name.rules.orig	2017-11-22 11:51:40.381455942 +0200
+++ /usr/lib/udev/rules.d/76-phys-port-name.rules	2017-11-22 11:51:52.587506052 +0200
@@ -2,6 +2,7 @@
 ACTION!="add", GOTO="phys_port_name_end"
 SUBSYSTEM!="net", GOTO="phys_port_name_end"

+DRIVERS=="nfp*", ATTR{phys_port_name}=="?*", IMPORT{program}="/usr/lib/udev/phys-port-name-gen %k"
 DRIVERS=="mlxsw*", ATTR{phys_port_name}=="?*", IMPORT{program}="/usr/lib/udev/phys-port-name-gen %k"
 DRIVERS=="rocker", ATTR{phys_port_name}=="?*", IMPORT{program}="/usr/lib/udev/phys-port-name-gen %k"

Comment 2 Lukáš Nykrýn 2017-11-22 12:26:55 UTC
I presume this drivers could be already used in production. If so then we can change the naming scheme since it would change the device names on already existing cards and that is something we just can't do, even the new names would be much prettier.

All I can afford is that we can put together a Knowledge Base article, where we will describe how you can add the rule yourself.

Comment 3 Jan Gutter (Netronome) 2017-11-22 12:49:51 UTC
I'll attempt to find out if there's any customers currently using the in-kernel driver in 7.4 in production. Our out-of-tree driver packages have been shipping udev rules similar to the above, resulting in consistent naming.

The problem is also exacerbated because the in-tree driver in 7.4 has no way to distinguish between the netdevs in breakout mode (so the netdev names are actually randomized each boot).

The reason for this proposal is because the 7.5 kernel introduces a number of new backported features, meaning that users will expect added functionality. I understand completely if this avenue is not available: automated systems are not smart enough to figure out which fixes break functionality and which do not.

Comment 11 errata-xmlrpc 2018-04-10 11:24:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0711