Hi Nvidia,
In Jetpack5.1.1, I enable the ethernet node 2310000 and 6810000. They always follow the order of 2310000(eth0) → 6810000(eth1) as below log.
pilot@pilot-desktop:~$ sudo dmesg | grep ethernet
[sudo] password for pilot:
[ 13.521473] nvethernet 2310000.ethernet: 1 IOMMU configuration found in device tree
[ 13.529397] nvethernet 2310000.ethernet: Adding to iommu group 50
[ 13.535814] nvethernet 2310000.ethernet: failed to read skip mac reset flag, default 0
[ 13.543977] nvethernet 2310000.ethernet: failed to read MDIO address
[ 13.550522] nvethernet 2310000.ethernet: Failed to read nvida,pause_frames, so setting to default support as disable
[ 13.561357] nvethernet 2310000.ethernet: setting to default DMA bit mask
[ 13.568246] nvethernet 2310000.ethernet: max-platform-mtu DT entry missing, setting default 1500
[ 13.577305] nvethernet 2310000.ethernet: missing nvidia,pad_auto_cal_pu_offset, setting default 0
[ 13.586428] nvethernet 2310000.ethernet: missing nvidia,pad_auto_cal_pd_offset, setting default 0
[ 13.839667] nvethernet 2310000.ethernet: Ethernet MAC address: 48:b0:2d:5d:16:01
[ 13.847599] nvethernet 2310000.ethernet: macsec param in DT is missing or disabled
[ 13.855385] nvethernet 2310000.ethernet: Macsec not supported/Not enabled in DT
[ 13.864252] nvethernet 2310000.ethernet: eth0 (HW ver: 53) created with 8 DMA channels
[ 13.872569] nvethernet 6810000.ethernet: 1 IOMMU configuration found in device tree
[ 13.880480] nvethernet 6810000.ethernet: Adding to iommu group 51
[ 13.887015] nvethernet 6810000.ethernet: failed to read skip mac reset flag, default 0
[ 13.895161] nvethernet 6810000.ethernet: failed to read MDIO address
[ 13.901713] nvethernet 6810000.ethernet: setting to default DMA bit mask
[ 13.910135] nvethernet 6810000.ethernet: failed to get phy reset gpio error: -2
[ 13.921613] nvethernet 6810000.ethernet: Ethernet MAC address: 48:b0:2d:5d:17:01
[ 13.929494] nvethernet 6810000.ethernet: macsec param in DT is missing or disabled
[ 13.937282] nvethernet 6810000.ethernet: Macsec not supported/Not enabled in DT
[ 13.946876] nvethernet 6810000.ethernet: eth1 (HW ver: 31) created with 10 DMA channels
[ 19.051749] using random self ethernet address
[ 19.056365] using random host ethernet address
[ 19.836976] using random self ethernet address
[ 19.841590] using random host ethernet address
[ 19.925112] nvethernet 2310000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[ 20.101767] nvethernet 6810000.ethernet: failed to find MDIO node
[ 20.163382] nvethernet 6810000.ethernet: [xpcs_lane_bring_up][477][type:0x4][loga-0x0] PCS block lock SUCCESS
[ 20.197792] nvethernet 6810000.ethernet eth1: Link is Up - 10Gbps/Full - flow control off
[ 20.700803] nvethernet 6810000.ethernet: [xpcs_lane_bring_up][477][type:0x4][loga-0x0] PCS block lock SUCCESS
[ 20.700868] nvethernet 6810000.ethernet eth1: Link is Up - 10Gbps/Full - flow control off
However, after upgrading to Jetpack6, the order is not fixed. Node 2310000 will sometimes be initialized after 6810000 which leads to 6810000(eth0) → 2310000(eth1). And the pre-configured IP address will swap because it is related with eth0/1.
But other times node 2310000 is the first to be loaded, it seems randomly.
How to make this order fixed at every time of boot?
Thanks.
Try to write a aliases node in the device tree.
For example,
mmc0= “/bus@0/mmc@3460000”.
MGBE is not ethernet@6810000. It has been changed in JP6.
Also, make sure your device tree really has these changes during runtime.
Hi Wayne,
Sorry, I notice that. But things do not get better.
I have checked the device tree in runtime to ensure my changes.
pilot@pilot-desktop:/proc/device-tree/aliases$ cat eth0
/bus@0/ethernet@2310000
pilot@pilot-desktop:/proc/device-tree/aliases$ cat eth1
/bus@0/ethernet@6800000
pilot@pilot-desktop:~$ sudo dmesg | grep ethernet
[sudo] password for pilot:
[ 8.860235] using random self ethernet address
[ 8.860241] using random host ethernet address
[ 9.015292] nvpps c6a0000.nvpps: primary-emac found ethernet@6800000
[ 9.015306] nvpps c6a0000.nvpps: using ptp notifier method on emac ethernet@6800000
[ 9.123410] nvethernet 6800000.ethernet: Adding to iommu group 53
[ 9.125823] nvethernet 6800000.ethernet: failed to read skip mac reset flag, default 0
[ 9.125829] nvethernet 6800000.ethernet: failed to read MDIO address
[ 9.125835] nvethernet 6800000.ethernet: setting to default DMA bit mask
[ 9.125844] nvethernet 6800000.ethernet: failed to read PHY iface mode- default to 10G XFI
[ 9.139580] nvethernet 6800000.ethernet: failed to get phy reset gpio error: -2
[ 9.146530] nvethernet 6800000.ethernet: Get Mac index from mac-addr-idx
[ 9.146553] nvethernet 6800000.ethernet: Ethernet MAC address: 48:b0:2d:5d:17:00
[ 9.147924] nvethernet 6800000.ethernet: Macsec not enabled
[ 9.147926] nvethernet 6800000.ethernet: Macsec: Reduced MTU: 1466 Max: 16383
[ 9.151002] nvethernet 6800000.ethernet: eth0 (HW ver: 31) created with 10 DMA channels
[ 9.151315] nvethernet 2310000.ethernet: Adding to iommu group 55
[ 9.151479] nvethernet 2310000.ethernet: failed to read skip mac reset flag, default 0
[ 9.151482] nvethernet 2310000.ethernet: failed to read MDIO address
[ 9.151487] nvethernet 2310000.ethernet: Failed to read nvida,pause_frames, so setting to default support as disable
[ 9.151489] nvethernet 2310000.ethernet: setting to default DMA bit mask
[ 9.151498] nvethernet 2310000.ethernet: max-platform-mtu DT entry missing, setting default 1500
[ 9.395575] nvethernet 2310000.ethernet: Get Mac index from mac-addr-idx
[ 9.395595] nvethernet 2310000.ethernet: Ethernet MAC address: 48:b0:2d:5d:16:00
[ 9.443154] nvethernet 2310000.ethernet: Macsec not enabled
[ 9.443158] nvethernet 2310000.ethernet: Macsec: Reduced MTU: 1466 Max: 1500
[ 9.444822] nvethernet 2310000.ethernet: eth1 (HW ver: 53) created with 8 DMA channels
[ 9.473784] using random self ethernet address
[ 9.473790] using random host ethernet address
[ 9.742381] nvethernet 6800000.ethernet: failed to find MDIO node
[ 9.779015] nvethernet 6800000.ethernet: [xpcs_lane_bring_up][477][type:0x4][loga-0x0] PCS block lock SUCCESS
[ 9.779737] nvethernet 6800000.ethernet eth0: Link is Up - 10Gbps/Full - flow control off
[ 10.158629] nvethernet 2310000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
[ 10.302403] nvethernet 6800000.ethernet: [xpcs_lane_bring_up][477][type:0x4][loga-0x0] PCS block lock SUCCESS
[ 10.302467] nvethernet 6800000.ethernet eth0: Link is Up - 10Gbps/Full - flow control off
Here is my dtb and extlinux.conf
dtb.txt (313.9 KB)
TIMEOUT 30
DEFAULT primary
MENU TITLE L4T boot options
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
FDT /boot/dtb/kernel_tegra234-p3737-0000+p3701-0005-nv.dtb
INITRD /boot/initrd
APPEND ${cbootargs} root=PARTUUID=44bbbd89-11b6-40e7-8e1e-dcdcd3e21bb3 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0
# When testing a custom kernel, it is recommended that you create a backup of
# the original kernel and add a new entry to this file so that the device can
# fallback to the original kernel. To do this:
#
# 1, Make a backup of the original kernel
# sudo cp /boot/Image /boot/Image.backup
#
# 2, Copy your custom kernel into /boot/Image
#
# 3, Uncomment below menu setting lines for the original kernel
#
# 4, Reboot
LABEL backup
MENU LABEL backup kernel
LINUX /boot/Image.backup
INITRD /boot/initrd
APPEND ${cbootargs} root=PARTUUID=44bbbd89-11b6-40e7-8e1e-dcdcd3e21bb3 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0
Does your modification show up under /proc/device-tree/aliases?
In my latest post, I have checked it.
Then maybe try to use udev rule.
As I know, the rules take effect quite slow, when at this moment eth0 and eth1 have already been occupied by eth@2310000 or eth@6800000. Then it cannot change the binding successfully.
I tried as below, but still no effect.
/etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="48:b0:2d:5d:16:00", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="48:b0:2d:5d:17:00", NAME="eth1"
sudo udevadm control --reload-rules