cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Anonymous
Not applicable
4,037 Views

MTU Size Change Broke?

I previously did a project on a custom board similar to the ML507 using the Hard Ethernet MAC and the xlltemac driver.  We needed Gigabit Ethernet and Jumbo Frames.  I used Xilinx Linux kernel version 2.6.29 and everything worked great.  With this version I was able to set the Ethernet MTU size to get the jumbo frames with no problems.

 

I'm now starting up a new project and I thought I'd upgrade the kernel to the latest version so I grabbed a snapshot of the 2.6.34 kernel.  Now I can no longer change the MTU size.  If I change it during startup I never get to the login prompt.  If I take it out of the startup and try to change it from the command line the system locks up. 

 

I've tried two methods of changing it from the command line - either:

   ifconfig eth0 mtu 4000

               or

   ip link set eth0 mtu 4000

 

both methods cause the system to lock up.

 

I even tried something less than 1500 and it still locks up.

 

Has something changed in the driver?  Is there a new setting I need to change in the kernel's .config file to allow changing the MTU?  Or is there something else that I am missing?

 

Randy

0 Kudos
3 Replies
timo-ge
Explorer
Explorer
3,974 Views
Registered: ‎11-12-2007

I have the same issue here. 

I'm on Kernel 2.6.34 from the xilinx git tree. Changing the mtu locks up the system.

 

Edit: typo

0 Kudos
Anonymous
Not applicable
3,946 Views

I had hoped to hear something from someone at Xilinx about this issue but I haven't seen too many responses from them recently.  I have a work around for the issue that at least keeps the system from crashing.  It requires making a change to Xilinx's lltemac driver.

In file drivers/net/xilinx_lltemac/xlltemac_main.c there is a function called xenet_change_mtu.  I commented out part of this function to make it look like it did back in version 2.6.29.  Comment out everything after line 1413 (dev->mtu = new_mtu;) and before the functions 'return 0;' statement.  After recompiling the kernel changing the MTU size no longer locks up the system and the ifconfig command reports the new MTU size.

I haven't looked into what this extra code is trying to do nor where in there the lock up is occurring; as usual I only had enough time to make it work.  Of course I do wonder why this extra code was needed and since I have eliminated it am I truly using my new MTU size?

0 Kudos
johann.baudy
Newbie
Newbie
3,514 Views
Registered: ‎09-05-2012

This bug is fixed with below patch:


         if (pdata->dcr_host) {
             printk("XLlTemac: DCR address: 0x%0x\n", pdata->ll_dev_baseaddress);
             XLlDma_Initialize(&lp->Dma, pdata->ll_dev_baseaddress);
+            lp->virt_dma_addr = pdata->ll_dev_baseaddress;
         } else {
                 virt_baddr = (u32) ioremap(pdata->ll_dev_baseaddress, 4096);
             lp->virt_dma_addr = virt_baddr;

 

0 Kudos