Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue

Tony Nguyen says:

====================
ixgbe: bypass devlink phys_port_name generation

Jedrzej adds option to skip phys_port_name generation and opts
ixgbe into it as some configurations rely on pre-devlink naming
which could end up broken as a result.

* '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
ixgbe: prevent from unwanted interface name changes
devlink: let driver opt out of automatic phys_port_name generation
====================

Link: https://patch.msgid.link/20250812205226.1984369-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+7 -2
+1
drivers/net/ethernet/intel/ixgbe/devlink/devlink.c
··· 543 543 544 544 attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL; 545 545 attrs.phys.port_number = adapter->hw.bus.func; 546 + attrs.no_phys_port_name = 1; 546 547 ixgbe_devlink_set_switch_id(adapter, &attrs.switch_id); 547 548 548 549 devlink_port_attrs_set(devlink_port, &attrs);
+5 -1
include/net/devlink.h
··· 78 78 * @flavour: flavour of the port 79 79 * @split: indicates if this is split port 80 80 * @splittable: indicates if the port can be split. 81 + * @no_phys_port_name: skip automatic phys_port_name generation; for 82 + * compatibility only, newly added driver/port instance 83 + * should never set this. 81 84 * @lanes: maximum number of lanes the port supports. 0 value is not passed to netlink. 82 85 * @switch_id: if the port is part of switch, this is buffer with ID, otherwise this is NULL 83 86 * @phys: physical port attributes ··· 90 87 */ 91 88 struct devlink_port_attrs { 92 89 u8 split:1, 93 - splittable:1; 90 + splittable:1, 91 + no_phys_port_name:1; 94 92 u32 lanes; 95 93 enum devlink_port_flavour flavour; 96 94 struct netdev_phys_item_id switch_id;
+1 -1
net/devlink/port.c
··· 1519 1519 struct devlink_port_attrs *attrs = &devlink_port->attrs; 1520 1520 int n = 0; 1521 1521 1522 - if (!devlink_port->attrs_set) 1522 + if (!devlink_port->attrs_set || devlink_port->attrs.no_phys_port_name) 1523 1523 return -EOPNOTSUPP; 1524 1524 1525 1525 switch (attrs->flavour) {