]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ixgbe: prevent from unwanted interface name changes
authorJedrzej Jagielski <jedrzej.jagielski@intel.com>
Mon, 25 Aug 2025 03:30:14 +0000 (20:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:34:42 +0000 (16:34 +0200)
[ upstream commit e67a0bc3ed4fd8ee1697cb6d937e2b294ec13b5e ]

Users of the ixgbe driver report that after adding devlink support by
the commit a0285236ab93 ("ixgbe: add initial devlink support") their
configs got broken due to unwanted changes of interface names. It's
caused by automatic phys_port_name generation during devlink port
initialization flow.

To prevent from that set no_phys_port_name flag for ixgbe devlink ports.

Reported-by: David Howells <dhowells@redhat.com>
Closes: https://lore.kernel.org/netdev/3452224.1745518016@warthog.procyon.org.uk/
Reported-by: David Kaplan <David.Kaplan@amd.com>
Closes: https://lore.kernel.org/netdev/LV3PR12MB92658474624CCF60220157199470A@LV3PR12MB9265.namprd12.prod.outlook.com/
Fixes: a0285236ab93 ("ixgbe: add initial devlink support")
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: stable@vger.kernel.org # 6.16
Tested-By: Calvin Owens <calvin@wbinvd.org>
Signed-off-by: Calvin Owens <calvin@wbinvd.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/ixgbe/devlink/devlink.c

index 54f1b83dfe42e02b341c4a9d3bbf9a852205ede1..d227f4d2a2d17a6932b3911005451c6cff168528 100644 (file)
@@ -543,6 +543,7 @@ int ixgbe_devlink_register_port(struct ixgbe_adapter *adapter)
 
        attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
        attrs.phys.port_number = adapter->hw.bus.func;
+       attrs.no_phys_port_name = 1;
        ixgbe_devlink_set_switch_id(adapter, &attrs.switch_id);
 
        devlink_port_attrs_set(devlink_port, &attrs);