From c808532521253ece85a8410c4e32e6e958b2304d Mon Sep 17 00:00:00 2001 From: Til Kaiser Date: Sat, 12 Oct 2024 18:32:45 +0200 Subject: [PATCH] x86: rename and configure Mellanox Spectrum interfaces This commit renames all management network ports of the SN2100, SN2700, and SN3700 switches based on their PCI address during boot. For the default network config, the management port(s) are put into the br-lan and the QSFP ports into the br-wan bridge. Signed-off-by: Til Kaiser --- .../linux/x86/base-files/etc/board.d/02_network | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/target/linux/x86/base-files/etc/board.d/02_network b/target/linux/x86/base-files/etc/board.d/02_network index b3d1855764b..36d8d2ea19a 100644 --- a/target/linux/x86/base-files/etc/board.d/02_network +++ b/target/linux/x86/base-files/etc/board.d/02_network @@ -60,6 +60,22 @@ gowin-solution-co-ltd-gw-mb-u01) ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 poe" "sfp1 sfp2" ;; +mellanox-technologies-ltd-msn2100) + ucidef_set_network_device_path "mgmt" "pci0000:00/0000:00:14.0" + ucidef_set_interface_lan "mgmt" + ucidef_set_interface_netdev_range "wan" "swp" "1" "16" + ;; +mellanox-technologies-ltd-msn2700) + ucidef_set_network_device_path "mgmt0" "pci0000:00/0000:00:19.0" + ucidef_set_network_device_path "mgmt1" "pci0000:00/0000:00:1c.6/0000:06:00.0" + ucidef_set_interface_lan "mgmt0 mgmt1" + ucidef_set_interface_netdev_range "wan" "swp" "1" "32" + ;; +mellanox-technologies-ltd-msn3700) + ucidef_set_network_device_path "mgmt" "pci0000:00/0000:00:1c.7/0000:09:00.0" + ucidef_set_interface_lan "mgmt" + ucidef_set_interface_netdev_range "wan" "swp" "1" "32" + ;; pc-engines-apu1|pc-engines-apu2|pc-engines-apu3) ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0" ;;