Skip to content

Commit d60cc7d

Browse files
authored
[devices]: Fix eth0 hardware numbering using udev for AS4630-54PE platform. (#16464)
Management port currently broken for Edgecore AS4630-54PE platform due to NIC hardware numbering. Created new PR with typo from Edgecore in original PR fixed. Here is a link to the old PR that has broken logic: #9560
1 parent 2ce04ab commit d60cc7d

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="ixgbe", KERNELS=="0000:08:00.0", NAME:="eth0"
2+
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="ixgbe", KERNELS=="0000:06:00.1", NAME:="eth1"
3+
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="ixgbe", KERNELS=="0000:06:00.0", NAME:="eth3"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
/etc/init.d/netfilter-persistent stop
4+
modprobe -r ixgbe
5+
udevadm control --reload-rules
6+
udevadm trigger
7+
modprobe ixgbe
8+
/etc/init.d/netfilter-persistent start
9+

platform/broadcom/sonic-platform-modules-accton/debian/rules

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ MODULE_DIRS += as5835-54x as9716-32d as9726-32d as5835-54t as7312-54xs as7315-27
2525
MODULE_DIR := modules
2626
UTILS_DIR := utils
2727
SERVICE_DIR := service
28+
UDEV_DIR := udev
2829
CONF_DIR := conf
2930

3031
%:
@@ -69,9 +70,11 @@ binary-indep:
6970
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} $(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
7071
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} usr/local/bin; \
7172
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} lib/systemd/system; \
73+
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} etc/udev/rules.d; \
7274
cp $(MOD_SRC_DIR)/$${mod}/$(MODULE_DIR)/*.ko debian/$(PACKAGE_PRE_NAME)-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
7375
cp $(MOD_SRC_DIR)/$${mod}/$(UTILS_DIR)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/usr/local/bin/; \
7476
cp $(MOD_SRC_DIR)/$${mod}/$(SERVICE_DIR)/*.service debian/$(PACKAGE_PRE_NAME)-$${mod}/lib/systemd/system/; \
77+
cp $(MOD_SRC_DIR)/$${mod}/$(UDEV_DIR)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/etc/udev/rules.d/; \
7578
$(PYTHON3) $${mod}/setup.py install --root=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME)-$${mod} --install-layout=deb; \
7679
done)
7780
# Resuming debhelper scripts
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Special arrangement to make PDDF mode default
22
# Disable monitor, monitor-fan, monitor-psu (not enabling them would imply they will be disabled by default)
33
# Enable pddf-platform-monitor
4+
# Retrigger eth0-eth2 renumbering
45
depmod -a
56
systemctl enable pddf-platform-init.service
67
systemctl start pddf-platform-init.service
78
systemctl enable as4630-54pe-pddf-platform-monitor.service
89
systemctl start as4630-54pe-pddf-platform-monitor.service
10+
/usr/local/bin/restart_ixgbe.sh

0 commit comments

Comments
 (0)