Changing MTU Size

Hi,

I am working with a Multisense S21 stereo camera system from Carnegie Robotics. This sensor requires an MTU of 7200 over ethernet to achieve its full throughput and framerate. On other systems, I am able to connect to the sensor via a static IP and change the MTU size with

sudo ifconfig eth0 mtu 7200

The command appears to work and the MTU change is reflected in the output of ifconfig, but I immediately lose communication with the sensor. I am able to communicate with the sensor when the network interface is configured to use a normal MTU size (1500). However, pinging the device with the MTU set to 7200 always results in a host unreachable error.

Is there something that I am missing? Does the Jetson Xavier not support Jumbo Frames?

Thanks for the help.

I see the same thing, but I have nothing to test with. Note that everything along the route must support MTU/MRU of 7200 for it to work…I can’t say for sure, but it could be that if you are using a switch, then the switch may not support it (my setup which failed was PC-switch-Jetson).

I can’t say why networking fails with MTU 7200, but I found this of interest:
http://www.microhowto.info/howto/change_the_mtu_of_a_network_interface.html

Thanks for the info.

Unfortunately, I am not using a switch, so it appears that the issue is due to the Jetson itself.

I have run across that article in my searching. Since we don’t get an error message (“SIOCSIFMTU: Invalid argument”) from the kernel after attempting to set the MTU to 7200, it seems that the hardware should support jumbo frames. So, maybe there’s some bug in the kernel that’s causing the interface to die with high MTUs.

I don’t know enough about the actual ethernet chip, but it is possible the chip itself doesn’t support larger frames…or maybe just that one frame size. Or, as you mention, perhaps there is a kernel option missing. Hard to say without knowing the specifics of that ethernet chip.

The forum admin accepted linuxdev’s answer, but I have unaccepted it because my question is not answered. I would like to hear from nvidia about the viability of large MTU sizes on the Jetson Xavier.

Thanks.

Could you also try different MTU size? Any size <9000 should be valid.

Hi,

Yes. I have tried multiple MTU sizes, starting with 1501 and going up to 9000. Nothing above 1500 works. Additionally, I have replicated the problem by connecting a laptop running Ubuntu 16.04 to the Jetson. I can ping the laptop at an MTU of 1500, but anything higher kills communication. The laptop I am using is able to communicate with my sensor at an MTU of 7200 with no problems.

Has nvidia verified that they are able to communicate with external devices at larger MTU sizes? If not, can such verification be performed? This is functionality that I need to effectively use the Jetson Xavier for my application.

Sure, we will look into this.

May I have you test steps?

Thank you for the help.

Here is my basic test procedure:

  1. Connect Jetson Xavier and a laptop directly via ethernet
  2. Configure Jetson and Laptop to operate with a static IP (I just use the connection editor GUI)
  3. Ping the laptop IP from the Jetson. This should work without issues and will validate your connection settings.
  4. Change the laptop interface MTU. I use ifconfig to do this. It may be necessary to restart the network interface.
  5. Ping the laptop from the Jetson. This still works fine for me.
  6. Change the Jetson MTU size using ifconfig. Restart network interface (I just check and uncheck “enable networking” in networking GUI)
  7. Try to ping the laptop. This always fails for me.

Let me know if you have any questions. Thanks again.

sddavis14,

I just tried. Looks like you need to disable eth0 and enable it again.

sudo ifconfig eth0 down
sudo ifconfig eth0 up

We’ve updated the driver. Please apply this patch to kernel source.

Next release would include this patch. Thanks!

diff --git a/drivers/net/ethernet/nvidia/eqos/drv.c b/drivers/net/ethernet/nvidia/eqos/drv.c
index 68d9182..a70c3da 100644
--- a/drivers/net/ethernet/nvidia/eqos/drv.c
+++ b/drivers/net/ethernet/nvidia/eqos/drv.c
@@ -3753,7 +3753,10 @@
 	struct platform_device *pdev = pdata->pdev;
 	int max_frame = (new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN);
 
-	pr_debug("-->eqos_change_mtu: new_mtu:%d\n", new_mtu);
+	if (!netif_running(dev)) {
+		dev_info(&pdev->dev, "network interface is not running\n");
+		return 0;
+	}
 
 #ifdef EQOS_CONFIG_PGTEST
 	dev_err(&pdev->dev, "jumbo frames not supported with PG test\n");
@@ -3778,9 +3781,7 @@
 
 	dev_info(&pdev->dev, "changing MTU from %d to %d\n", dev->mtu, new_mtu);
 
-	mutex_lock(&pdata->hw_change_lock);
-	if (!pdata->hw_stopped)
-		eqos_stop_dev(pdata);
+	eqos_close(dev);
 
 	if (max_frame <= 2048) {
 		pdata->rx_buffer_len = 2048;
@@ -3791,14 +3792,7 @@
 
 	dev->mtu = new_mtu;
 
-	if (!pdata->hw_stopped)
-		eqos_start_dev(pdata);
-
-	mutex_unlock(&pdata->hw_change_lock);
-
-	pr_debug("<--eqos_change_mtu\n");
-
-	return 0;
+	return eqos_open(dev);
 }
 
 #ifdef EQOS_QUEUE_SELECT_ALGO

Thanks Wayne. I was able to get things working on my end with this info. For anyone else dealing with this, make sure to set the MTU size to automatic within the connection editor GUI.

Is this fix in the latest release?

I’m using the latest version of the JetPack and this no longer appears to be an issue.