public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
* [PATCH v1 0/3] net/af_packet: fix MTU handling and add jumbo frame support
@ 2026-03-06  9:20 Xavier Guillaume
  2026-03-06  9:20 ` [PATCH v1 1/3] net/af_packet: fix MTU set data size calculation Xavier Guillaume
                   ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: Xavier Guillaume @ 2026-03-06  9:20 UTC (permalink / raw)
  To: dev; +Cc: linville, Xavier Guillaume

This series fixes two bugs in the af_packet PMD related to frame
size calculations and buffer safety, then enables jumbo frame
support by deriving the advertised capabilities from the actual
TPACKET ring configuration.

Patch 1 fixes the data size calculation in eth_dev_mtu_set() which
is too restrictive due to TPACKET2_HDRLEN including sizeof(struct
sockaddr_ll) even though the sockaddr_ll does not consume frame
data space. The formula is now consistent with the RX and TX paths.

Patch 2 adds a bounds check in the RX path to prevent a heap buffer
overflow when the kernel delivers a packet larger than the mbuf data
room (e.g. if the kernel interface MTU is raised externally).

Patch 3 replaces the static max_rx_pktlen (RTE_ETHER_MAX_LEN) and
adds max_mtu, both derived from the configured TPACKET frame size.
This enables jumbo frame support when the user specifies a larger
framesz devarg at vdev creation time.

Xavier Guillaume (3):
  net/af_packet: fix MTU set data size calculation
  net/af_packet: fix receive buffer overflow
  net/af_packet: support jumbo frames

 drivers/net/af_packet/rte_eth_af_packet.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-03-19  9:25 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06  9:20 [PATCH v1 0/3] net/af_packet: fix MTU handling and add jumbo frame support Xavier Guillaume
2026-03-06  9:20 ` [PATCH v1 1/3] net/af_packet: fix MTU set data size calculation Xavier Guillaume
2026-03-06  9:20 ` [PATCH v1 2/3] net/af_packet: fix receive buffer overflow Xavier Guillaume
2026-03-06  9:20 ` [PATCH v1 3/3] net/af_packet: support jumbo frames Xavier Guillaume
2026-03-09 16:03   ` Stephen Hemminger
2026-03-09 16:10 ` [PATCH v2 0/3] net/af_packet: fix MTU handling and add jumbo frame support Xavier Guillaume
2026-03-09 16:10   ` [PATCH v2 1/3] net/af_packet: fix MTU set data size calculation Xavier Guillaume
2026-03-09 16:10   ` [PATCH v2 2/3] net/af_packet: fix receive buffer overflow Xavier Guillaume
2026-03-09 16:10   ` [PATCH v2 3/3] net/af_packet: support jumbo frames Xavier Guillaume
2026-03-10 23:31     ` Stephen Hemminger
2026-03-12 13:32       ` Xavier Guillaume
2026-03-12 16:20         ` Stephen Hemminger
2026-03-09 20:16   ` [PATCH v2 0/3] net/af_packet: fix MTU handling and add jumbo frame support Stephen Hemminger
2026-03-09 20:49   ` [PATCH] net/af_packet: add multi-segment mbuf support for jumbo frames Sriram Yagnaraman
2026-03-09 21:02     ` [PATCH v2] " Sriram Yagnaraman
2026-03-10 14:02       ` Stephen Hemminger
2026-03-10 20:02         ` Sriram Yagnaraman
2026-03-16 16:02           ` Stephen Hemminger
2026-03-19  9:25             ` Sriram Yagnaraman
2026-03-10  1:55   ` [PATCH v2 0/3] net/af_packet: fix MTU handling and add jumbo frame support Stephen Hemminger
2026-03-10 11:21   ` [PATCH v3 " Xavier Guillaume
2026-03-10 11:21     ` [PATCH v3 1/3] net/af_packet: fix MTU set data size calculation Xavier Guillaume
2026-03-10 11:21     ` [PATCH v3 2/3] net/af_packet: fix receive buffer overflow Xavier Guillaume
2026-03-10 11:21     ` [PATCH v3 3/3] net/af_packet: support jumbo frames Xavier Guillaume
2026-03-11 16:03     ` [PATCH v3 0/3] net/af_packet: fix MTU handling and add jumbo frame support Stephen Hemminger
2026-03-12 18:46     ` Stephen Hemminger
2026-03-16 15:59     ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox