Netdev List
 help / color / mirror / Atom feed
* [PATCH net v3 0/2] octeon_ep, octeon_ep_vf: fix skb frags overflow in the RX path
@ 2026-07-04  6:15 Maoyi Xie
  2026-07-04  6:15 ` [PATCH net v3 1/2] octeon_ep: " Maoyi Xie
  2026-07-04  6:15 ` [PATCH net v3 2/2] octeon_ep_vf: " Maoyi Xie
  0 siblings, 2 replies; 3+ messages in thread
From: Maoyi Xie @ 2026-07-04  6:15 UTC (permalink / raw)
  To: Veerasenareddy Burru, Sathesh Edara
  Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maciej Fijalkowski, netdev, linux-kernel

Both octeon_ep and octeon_ep_vf build an skb for a multi-buffer RX packet
by adding one fragment per buffer_size chunk of a device-reported length.
Neither bounds the count against MAX_SKB_FRAGS. A long packet yields about
18 fragments, one past the default MAX_SKB_FRAGS of 17, so
skb_add_rx_frag() writes past shinfo->frags[].

Each driver now checks the fragment count before it builds the skb and
drops a packet that would not fit.

v3:
 - octeon_ep_vf: pull the drop drain into octep_vf_oq_drop_rx().
   The overflow drop and the napi_build_skb failure path both use it.
   Suggested by Maciej Fijalkowski.
 - octeon_ep: add Maciej's Reviewed-by.

v1: https://lore.kernel.org/r/20260701112825.1653044-1-maoyixie.tju@gmail.com
v2: https://lore.kernel.org/r/20260702180518.2013324-1-maoyixie.tju@gmail.com


Maoyi Xie (2):
  octeon_ep: fix skb frags overflow in the RX path
  octeon_ep_vf: fix skb frags overflow in the RX path

 .../net/ethernet/marvell/octeon_ep/octep_rx.c |  9 ++++
 .../marvell/octeon_ep_vf/octep_vf_rx.c        | 46 ++++++++++++-------
 2 files changed, 39 insertions(+), 16 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-07-04  6:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-04  6:15 [PATCH net v3 0/2] octeon_ep, octeon_ep_vf: fix skb frags overflow in the RX path Maoyi Xie
2026-07-04  6:15 ` [PATCH net v3 1/2] octeon_ep: " Maoyi Xie
2026-07-04  6:15 ` [PATCH net v3 2/2] octeon_ep_vf: " Maoyi Xie

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