Linux imx change MTU size > 1500

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linux imx change MTU size > 1500

7,078 Views
vladimirchernin
Contributor III

Hi!

we  need to change MTU size more than 1500 default on imx6ull/ul   linux imx

ifconfig eth0 mtu 2000

we get

ifconfig : SIOCSIFMTU invalid argument

Please explain how to change MTU size in linux imx?

How can we can add Jumbo packet support on imx6?  

Thanks

Vladimir 

Labels (3)
0 Kudos
Reply
11 Replies

5,819 Views
Yuri
NXP Employee
NXP Employee

Hello,

 

 

  Generally, from software point of view, frame length can be configured up to

16K size. According to section 22.6.4.5 (Frame length/type verification: frame length

check) of the i.MX 6UL Reference Manual:

  “When the receive frame length exceeds MAX_FL bytes, the BABR interrupt is generated

and the RxBD[LG] bit is set.

  The frame is not truncated unless the frame length exceeds the value programmed in

ENETn_FTRL[TRUNC_FL].”

 

  Bit fields MAX_FL of Receive Control Register (ENETx_RCR) and TRUNC_FL of

Frame Truncation Length (ENETx_FTRL) are 14-bit values.

 

  The problem is that ENET hardware does not support Jumbo frames directly.

In particular, FIFO is not sized for jumbo frames. This means data lost can take place

with high probability.

 

 

Have a great day,

Yuri

 

------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer

button. Thank you!

5,819 Views
vladimirchernin
Contributor III

Hi!

Yuri thank you for your answer.

If we need to get one Jumbo  in second for example 

Is it will work? Can i support Jumbo packets at 10 Mbps or 5 Mbps?  

Thanks

Vladimir

0 Kudos
Reply

5,819 Views
Yuri
NXP Employee
NXP Employee

Hello,

  It would be possible in store and forward disable mode (defined by bit STRFWD in

Transmit FIFO Watermark Register [ENETx_TFWR]. But section 22.6.8.4 (Received

frame discard) of the 6UL RM states, that the receive FIFO must be operated in store

and forward mode.

  Nevertheless, customers can try the store and forward disable mode.

Regards,

Yuri.

0 Kudos
Reply

5,819 Views
vladimirchernin
Contributor III

Hello!

Do i need to change the  ENETx_RCR ENETx_FTRL ENETx_TFWR registers  only to allow Jumbo packets

Do i need to patch Freescale FEC driver?

if you know any patch like this please find out! 

Regards

Vladimir

0 Kudos
Reply

5,819 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Yes, it is needed to disable  store and forward mode, configure FIFO watermarks

and provide enough buffers for data (to load the jumbo frames). It will require 

to modify NXP ENET / FEC driver. We do not have patches for the Jumbo, sorry.  

Regards,

Yuri.

0 Kudos
Reply

5,819 Views
vladimirchernin
Contributor III

Hello

I have done the patch I can receive a frame of 2002 bytes with the disabled store and forward.

i  have changed registries ENETx_RCR ENETx_FTRL ENETx_TFWR

plus FEC_ENET_RX_FRSIZE 

FEC_ENET_TX_FRSIZE

What did i miss?

2000 bytes is FIFO maximum on imx6ul?

i haven't found config of Maximum Receive Buffer Size Register ENETx_MRBR its located in ref. manual 22.5.23 

but i don't see it in the code 

Regards

Vladimir

0 Kudos
Reply

5,819 Views
fbre
Contributor III

Hello Vladimir,

I'm interested in your patch to support jumbo frames. Can I have a look at it, please?

Kind regards

F B

0 Kudos
Reply

5,819 Views
vladimirchernin
Contributor III

hi!

It works you can get 2000 mtu but i cannot give it for free.

0 Kudos
Reply

5,819 Views
fbre
Contributor III

As far as I know changes to this driver have to be public by license.

0 Kudos
Reply

5,819 Views
art
NXP Employee
NXP Employee

The original IEEE 802.3 Ethernet standard defines the Ethernet frame structure with MTU (i.e. frame payload size in bytes) in range of 46 to 1500. The higher values of MTU can be achieved using so-called Jumbo frames. However, this type of frames is not defined by the IEEE 802.3 standard and depends on the particular network equipment vendor. So, the ENET controllers of the i.MX series processors do not support the Jumbo frames and their highest MTU value is 1500 according to the IEEE 802.3 standard.


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

5,367 Views
carl_ex
Contributor I

We are streaming raw images to the board through ethernet and for us it is very important to be able to run jumbo packets to lower the overhead. In the i.MX8 reference manual (IMX8MDQLQRM.pdf) chapter 11.5.4.1 the 9000 octets  packets are mentioned in multiple tables and there is a note stating:
"Although the IEEE specification defines a maximum frame length, the MAC core provides the flexibility to program any value for the frame maximum length."

So my question is if the limitation not valid for i.MX8 and only i.MX6 and earlier? Jumbo packets is crucial for our selection of platform. Secondly I wonder if the solution above is enough for running jumbo pakets.

Thank you!

0 Kudos
Reply