kernel: modules: add Mellanox Spectrum hotplug renaming script
authorTil Kaiser <[email protected]>
Mon, 16 Dec 2024 18:26:20 +0000 (19:26 +0100)
committerRobert Marko <[email protected]>
Mon, 6 Oct 2025 17:06:26 +0000 (19:06 +0200)
commit8edcd772db0086898b09d73d359bdc9d96b241ba
tree818506b92eb9d617d38a9bdf14310eedf5ada23f
parentf22f533ebcbc0f7123481a01abd3a547f0232260
kernel: modules: add Mellanox Spectrum hotplug renaming script

Currently, the interfaces of the Mellanox Spectrum Switch QSFP ports
are all labeled eth*. Their order doesn't match the faceplate and is
different for each model.

They could be named during boot, but this isn't sufficient because they
support port splitting. After such ports are split, their port naming
begins again with eth*, and the same is true after they are unsplit again.

A hotplug script is used here that reads from the sysfs file
phys_port_name, which contains p1, p2, p3, ... for unsplit ports
and p1s0, p1s1, p1s2 for split ports.

Signed-off-by: Til Kaiser <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/17251
Signed-off-by: Robert Marko <[email protected]>
package/kernel/linux/files/hotplug-mlxsw-spectrum-port-names.sh [new file with mode: 0644]
package/kernel/linux/modules/netdevices.mk