DPDK patches and discussions
 help / color / mirror / Atom feed
* MTU and frame size filtering inaccuracy
@ 2022-03-01 17:50 Ferruh Yigit
  2022-03-02  8:53 ` Morten Brørup
  0 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2022-03-01 17:50 UTC (permalink / raw)
  To: dev
  Cc: Thomas Monjalon, Andrew Rybchenko, matan, Qi Zhang,
	Ajit Khaparde, Stephen Hemminger, Ray Kinsella, Bruce Richardson,
	Damjan Marion (damarion),
	Roy Fan Zhang, Morten Brørup, Min Hu (Connor),
	Konstantin Ananyev, Stokes, Ian, David Marchand

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-02 17:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01 17:50 MTU and frame size filtering inaccuracy Ferruh Yigit
2022-03-02  8:53 ` Morten Brørup
2022-03-02 16:21   ` Stephen Hemminger
2022-03-02 16:50     ` Morten Brørup
2022-03-02 17:40       ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).