Since the device runs IP routing, having MTU’s that don’t match may result unnecessary ip fragmentation and performance penalty.
I have also verified that with MTU 1466, the device can receive standard size frames, but is not able to send them, since the IP layer is informed otherwise.
I am currently forcing MTU to 1534. In the short term, it seems to work, but need to do more testing.
It looks to me like the nvethernet driver is confused about the definition of MTU.
I was trying to find an answer for @Honey_Patouceul on setting this automatically. The value of mtu which is in question can be viewed in “/sys/class/net/eth0/mtu”. “cat” verifies values from ifconfig. The actual configuration should be via “/etc/sysctl.conf” (or one of the “/etc/sysctl.d/*” files). These lines should be reflected in: find /proc/sys/net -name mtu
Editing the “/etc/sysctl.conf” (or the sysctl.d/ subdirectory) should work to edit those files at boot:
(or 1500, but I was trying to make sure and tried 1534 as well)
Those sysctl edits do not make the update. I’ve concluded that somehow, during the transition to the 5.x kernel (of L4T R35.2.1, which I’m testing on) the sysctl.conf mechanism was lost. Would anyone at NVIDIA know why sysctl.conf no longer works for networking MTU?
Incidentally, it should be possible to pass a driver argument (it is a Realtek driver) to the kernel command line at boot to adjust this MTU, but I was unable to find a list of valid kernel arguments for the Realtek driver, so I could not try.
The workaround with rc.local may work better or worse, but is is only a workaround - not a fix. Firstly, the rc.local has been obsolete for several years and not recommended to use.
Secondly putting the script ip up/down in the script that is run when boot process is essentially completed, causes unnecessary network flapping. There are better ways for setting custom MTU and vary depending on the netwaork management software (NetworkManager or networkd).
However, the point is that if you are using the system API to set MTU is does not work correctly. So, if you have software that relies of this API, e.g. anything related to tunneling, it will be broken.
The bug is in the nvethernet driver and it still has not been fixed in Jetpack 5.1. Nvidia has not even classified it as a bug, even though I reported it 4 months ago.
Thanks. This is the only solution for the mgbe* cards on AGX Orin which do not allow setting MTU of a connected Ethernet link.
I even tried a /etc/network/if-pre-up.d script and /etc/NetworkManager/dispatcher.d/pre-up.d script, but it did not work (the NM script was being run too late and the network script was not run for my interface at all).