DPDK patches and discussions
 help / color / mirror / Atom feed
* Restrict max packet size on rx
@ 2024-10-18 16:35 Rajasekhar Pulluru
  2024-10-18 16:43 ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Rajasekhar Pulluru @ 2024-10-18 16:35 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

Team,
Does setting mtu using rte_eth_dev_set_mtu limit the maximum size of the
packet received on the dpdk port to the configured mtu size?

On an intel machine with ixgbe port, with mtu set to 1500, no rx-offloads
enabled, ixgbe dpdk port is able to receive packets greater than 1500 size
and even jumbo frames of size 9000, even though the peer is sending them
fragmented with mtu of 1500.

How do I restrict the port not to receive any frame greater than mtu size?

Appreciate any help,
Thanks.
Rajasekhar

[-- Attachment #2: Type: text/html, Size: 635 bytes --]

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

* Re: Restrict max packet size on rx
  2024-10-18 16:35 Restrict max packet size on rx Rajasekhar Pulluru
@ 2024-10-18 16:43 ` Stephen Hemminger
  2024-10-18 16:49   ` Rajasekhar Pulluru
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2024-10-18 16:43 UTC (permalink / raw)
  To: Rajasekhar Pulluru; +Cc: dev

On Fri, 18 Oct 2024 22:05:24 +0530
Rajasekhar Pulluru <pullururajasekhar@gmail.com> wrote:

> Team,
> Does setting mtu using rte_eth_dev_set_mtu limit the maximum size of the
> packet received on the dpdk port to the configured mtu size?
> 
> On an intel machine with ixgbe port, with mtu set to 1500, no rx-offloads
> enabled, ixgbe dpdk port is able to receive packets greater than 1500 size
> and even jumbo frames of size 9000, even though the peer is sending them
> fragmented with mtu of 1500.
> 
> How do I restrict the port not to receive any frame greater than mtu size?
> 
> Appreciate any help,
> Thanks.
> Rajasekhar


In networking, MTU and MRU are overlapping concepts.
The MTU value is used as a hint to the driver as to what size buffer to allocate
but it can use larger if it wants. If you have restrictions, then the application
needs to enforce them.

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

* Re: Restrict max packet size on rx
  2024-10-18 16:43 ` Stephen Hemminger
@ 2024-10-18 16:49   ` Rajasekhar Pulluru
  2024-10-18 17:37     ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Rajasekhar Pulluru @ 2024-10-18 16:49 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

Thanks Stephen.

On Fri, Oct 18, 2024 at 10:13 PM Stephen Hemminger <
stephen@networkplumber.org> wrote:

> On Fri, 18 Oct 2024 22:05:24 +0530
> Rajasekhar Pulluru <pullururajasekhar@gmail.com> wrote:
>
> > Team,
> > Does setting mtu using rte_eth_dev_set_mtu limit the maximum size of the
> > packet received on the dpdk port to the configured mtu size?
> >
> > On an intel machine with ixgbe port, with mtu set to 1500, no rx-offloads
> > enabled, ixgbe dpdk port is able to receive packets greater than 1500
> size
> > and even jumbo frames of size 9000, even though the peer is sending them
> > fragmented with mtu of 1500.
> >
> > How do I restrict the port not to receive any frame greater than mtu
> size?
> >
> > Appreciate any help,
> > Thanks.
> > Rajasekhar
>
>
> In networking, MTU and MRU are overlapping concepts.
> The MTU value is used as a hint to the driver as to what size buffer to
> allocate
> but it can use larger if it wants. If you have restrictions, then the
> application
> needs to enforce them.
>

[-- Attachment #2: Type: text/html, Size: 1491 bytes --]

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

* Re: Restrict max packet size on rx
  2024-10-18 16:49   ` Rajasekhar Pulluru
@ 2024-10-18 17:37     ` Stephen Hemminger
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2024-10-18 17:37 UTC (permalink / raw)
  To: Rajasekhar Pulluru; +Cc: dev

On Fri, 18 Oct 2024 22:19:35 +0530
Rajasekhar Pulluru <pullururajasekhar@gmail.com> wrote:

> Thanks Stephen.
> 
> On Fri, Oct 18, 2024 at 10:13 PM Stephen Hemminger <
> stephen@networkplumber.org> wrote:  
> 
> > On Fri, 18 Oct 2024 22:05:24 +0530
> > Rajasekhar Pulluru <pullururajasekhar@gmail.com> wrote:
> >  
> > > Team,
> > > Does setting mtu using rte_eth_dev_set_mtu limit the maximum size of the
> > > packet received on the dpdk port to the configured mtu size?
> > >
> > > On an intel machine with ixgbe port, with mtu set to 1500, no rx-offloads
> > > enabled, ixgbe dpdk port is able to receive packets greater than 1500  
> > size  
> > > and even jumbo frames of size 9000, even though the peer is sending them
> > > fragmented with mtu of 1500.
> > >
> > > How do I restrict the port not to receive any frame greater than mtu  
> > size?  
> > >
> > > Appreciate any help,
> > > Thanks.
> > > Rajasekhar  
> >
> >
> > In networking, MTU and MRU are overlapping concepts.
> > The MTU value is used as a hint to the driver as to what size buffer to
> > allocate
> > but it can use larger if it wants. If you have restrictions, then the
> > application
> > needs to enforce them.
> >  

There are some drivers like ixgbe that need to round up the receive buffer to
a power of 2. So it is possible to get 2K frames even with standard 1500 byte MTU.

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

end of thread, other threads:[~2024-10-18 17:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-18 16:35 Restrict max packet size on rx Rajasekhar Pulluru
2024-10-18 16:43 ` Stephen Hemminger
2024-10-18 16:49   ` Rajasekhar Pulluru
2024-10-18 17:37     ` 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).