Enable Jumbo frames for ethernet?

Hey,

to reduce the CPU load for network transfer via UDP, I was thinking about setting up a larger MTU than the standard 1500 byte one. While my switch supports 9000 bytes and my desktop PC was cooperative in changing the setting to that, when I tried to change it via ifconfig on the iMX6 board to a higher value than 1500, it said the parameter was invalid.

Is this a hardware limit for this board, or is there anything in the Linux configuration that would change support for larger frames?

For context: (maybe someone has other hints)

Another device currently sends UDP packets of 1360 bytes payload with a very stable data rate of roughly 30 MByte/sec. It’s connected via a gigabit ethernet switch to the Apalis board.
On the iMX6 dual core, I have a program that’s basically a while(true) loop calling recv(…) on a socket set up for UDP, and a little bit of stats keeping, the performance impact of which is negligible.
The averaged total CPU load shown by the “uptime” command is ~35%, tload roughly agrees. Htop shows one core roughly at 22% sometimes peaking 30%, the other core at 53% peaking at 60%, roughly.
I had set the CPU affinity of my process to core1, so that not everything (incl the interrupts and system calls) runs on core0 which could max out and cause packet loss if something else is running.

So right now it looks like a 4-core version is needed to really do useful things on the CPU, which is significantly busy with data shoveling (I’m not really processing the data yet, just peeking at headers to check integrity).
Before that, I’d like to see if the CPU load can be reduced somehow… and reducing overhead / interrupt frequency by larger UDP packet size is about the only remaining thing that comes to mind now.

Side note: (or should this be an own thread?)
Why was I actually able to set CPU affinity on the iMX6, which in Toradex’ Linux image (see below under Environment), is compiled with CONFIG_CPUSET option disabled? While I am not able to set CPU affinity on the TK1 board - no surprize there, it also has CPUSET disabled.
I’m contemplating building a new Linux image with that option, but these observations make me doubt whether the effort is warranted by certain success - although the above described relation between the config option and availability of said functionality is what I gathered from the manpages* of sched_setaffinity and links there, I must now doubt my understanding.

  • The manpages tell about certain files that need to be present as an indicator of whether affinity is supported, e.g. cpuset(7) - Linux man page says there should be a “nodev cpuset” in /proc/filesystems. Not seeing those, I stumbled upon the CPUSET option.

Is this a hardware limit for this board, or is there anything in the Linux configuration that would change support for larger frames?

Ifconfig/ip is the correct command, but the driver rejects your request for a higher MTU. Beside the PHY, even more importantly, the MAC, as well as the driver, need to support Jumbo frames. It seems that the driver currently only supports frame up to 1500 bytes MTU.

There is a patch on the mailing list which increases the limit slightly, not sure if that is helpful for your case:

https://patchwork.kernel.org/patch/9467701/

We tried to figure out what the MAC’s maximum frame length is: The i.MX 6 uses an IP named ENET and is driven by the FEC driver. The Reference Manual of i.MX 6 is a bit unclear what the limitations are of the ENET IP, it looks like that MAX_FL is programmable, and would allow up to 14-bit values (16Kb). But it seems that this is limited by various hardware constraints:

https://community.nxp.com/thread/311509

Also, note that the i.MX 6 suffers an errata which only allows network speeds up to 400Mbps…

Another device currently sends UDP packets of 1360 bytes payload with a very stable data rate of roughly 30 MByte/sec.

Please note that this is obviously already a considerable load and not only on the CPU but also on the shared infrastructure (memory and various busses between memory and/or ENET/FEC).

Would you please ask a separate question about your side note and include the various commands you already tried.

Ah, thanks for the info. Can you tell me where I find the errata mentioning network speeds?

Here you are:

https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf ERR004512

thankyou !

You are very welcome.