MTU and frame size filtering inaccuracy

Ferruh Yigit ferruh.yigit at intel.com
Tue Mar 1 18:50:16 CET 2022


Hi all,

There is a problem in MTU setting in DPDK.

In 'rte_eth_dev_configure()'and 'rte_eth_dev_set_mtu()', MTU is
converted to frame size.

Since L2 protocol header size changes based on what HW supports,
L2 overhead information get from PMD, but this still doesn't solve
the issue.

PMD reports max overhead based on what it supports, but there is
no way to know what will received packets have. Sample:

i40e has 26 bytes overhead: HRD_LEN + CRC_LEN + VLAN_LEN *2
when MTU set to 1500, configured frame size become 1526
When a packet received with no VLAN tag and 1504 bytes payload,
packet frame size is 1522 bytes and it is accepted.
So although MTU is set 1500 bytes, packet with 1504 bytes is accepted.

There is an inaccuracy in frame size filtering up to 8 bytes.


Damjan reported the same, and he has good point on the application
need (I hope it is OK to quote from his email):

1) information about the biggest l2 frame interface it can receive and send (1518,1522, 2000 or jumbo)
2) ability to ask hardware to help him with filtering oversized frames


We need to fix (2), I am not quite sure how, any comment is welcome.


-- 
Thanks,
ferruh


More information about the dev mailing list