JUMBO FRAME on T4241

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

JUMBO FRAME on T4241

1,581 Views
naishabkp
Contributor I

Hi,

My question is regarding JUMBO frame enabling on T4241 processor.

I am using linux-4.17.3 from fsl git. I have used fsl_fm_max_frm=9600 parameter in U-Boot bootargs to set preferred MTU.

But when i set MTU to any other value than 1500 using ifconfig after booting to linux, it gives error saying  'hw max' is 1522 only. 

In T4240RDB this (fsl_fsl_max_frm) used to work (i think SDK-1.7 Linux kernel 3.10).

When i digged more into the fsl ethernet driver src code i noticed that .no_change_mtu function is removed.

Then i changed the file 'linux-fslc-4.17.3/drivers/net/ethernet/freescale/fman/fman.c' to

#define FSL_FM_MAX_FRAME_SIZE                FSL_FM_MAX_POSSIBLE_FRAME_SIZE  //1522

Now even if i set MTU to any value (say 6000), Receiving is  working for up to 9600 and transmit frames are obeying the set MTU (6000).

Looks like bootargs parameter (fsl_fm_max_frm) is not working properly (which used to work in Linux-3.x).

See the following lines from freescale/fman/fman.c

/* Max frame size, across all interfaces. Configurable from bootargs, to avoid allocating oversized (socket)
 * buffers when not using jumbo frames. Must be large enough to accommodate the network MTU, but small enough
 * to avoid wasting skb memory. Could be overridden once, at boot-time, via the fm_set_max_frm() callback.

*/
static int fsl_fm_max_frm = FSL_FM_MAX_FRAME_SIZE;
module_param(fsl_fm_max_frm, int, 0);
MODULE_PARM_DESC(fsl_fm_max_frm, "Maximum frame size, across all interfaces");

Also from  'linux-fslc-4.17.3/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c'
static int dpaa_eth_probe(struct platform_device *pdev)
{

...
       /* If fsl_fm_max_frm is set to a higher value than the all-common 1500, we choose conservatively and let the user explicitly set a higher
         * MTU via ifconfig. Otherwise, the user may end up with different MTUs in the same LAN.

          * If on the other hand fsl_fm_max_frm has been chosen below 1500,  start with the maximum allowed.        

       */
        net_dev->mtu = min(dpaa_get_max_mtu(), ETH_DATA_LEN);
...
}

It looks like frame size fixed compile time (either 1500 or 9600).

Could not find the function  fm_set_max_frm () anywhere in driver src code!!!

Why 9k Frame reception is working even if MTU is set to 6k only,  but Tx side it is working in configured MTU size.

Can anyone help?

Labels (1)
0 Kudos
Reply
1 Reply

1,396 Views
Pavel
NXP Employee
NXP Employee

Look at the Section 7.6.1.2.2.2.3 of NXP Linux SDK 2.0-1703 documentation about Jubmo frame using:

https://www.nxp.com/docs/en/supporting-information/QORIQ-SDK-2.0-IC-REV0.pdf


Have a great day,
Pavel Chubakov

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