netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: xdp: handle frags with unreadable memory
@ 2025-09-05 22:15 Jakub Kicinski
  2025-09-05 22:15 ` [PATCH net-next 1/2] net: xdp: pass full flags to xdp_update_skb_shared_info() Jakub Kicinski
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Jakub Kicinski @ 2025-09-05 22:15 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, daniel, hawk,
	john.fastabend, sdf, michael.chan, anthony.l.nguyen,
	marcin.s.wojtas, tariqt, mbloch, jasowang, bpf,
	aleksander.lobakin, pavan.chebbi, przemyslaw.kitszel,
	Jakub Kicinski

Make XDP helpers compatible with unreadable memory. This is very
similar to how we handle pfmemalloc frags today. Record the info
in xdp_buf flags as frags get added and then update the skb once
allocated.

This series adds the unreadable memory metadata tracking to drivers
using xdp_build_skb_from*() with no changes on the driver side - hence
the only driver changes here are refactoring. Obviously, unreadable memory
is incompatible with XDP today, but thanks to xdp_build_skb_from_buf()
increasing number of drivers have a unified datapath, whether XDP is
enabled or not.

RFC: https://lore.kernel.org/20250812161528.835855-1-kuba@kernel.org

Jakub Kicinski (2):
  net: xdp: pass full flags to xdp_update_skb_shared_info()
  net: xdp: handle frags with unreadable memory

 include/net/xdp.h                             | 38 ++++++++++++-------
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c |  7 ++--
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 15 ++++----
 drivers/net/ethernet/intel/ice/ice_txrx.c     | 15 ++++----
 drivers/net/ethernet/marvell/mvneta.c         |  7 ++--
 .../net/ethernet/mellanox/mlx5/core/en_rx.c   | 23 ++++++-----
 drivers/net/virtio_net.c                      |  7 ++--
 net/core/xdp.c                                | 21 +++++-----
 8 files changed, 69 insertions(+), 64 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2025-09-11 10:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-05 22:15 [PATCH net-next 0/2] net: xdp: handle frags with unreadable memory Jakub Kicinski
2025-09-05 22:15 ` [PATCH net-next 1/2] net: xdp: pass full flags to xdp_update_skb_shared_info() Jakub Kicinski
2025-09-09 13:30   ` Jesper Dangaard Brouer
2025-09-09 23:24     ` Jakub Kicinski
2025-09-05 22:15 ` [PATCH net-next 2/2] net: xdp: handle frags with unreadable memory Jakub Kicinski
2025-09-05 22:55 ` [PATCH net-next 0/2] " Stanislav Fomichev
2025-09-08 12:02 ` Alexander Lobakin
2025-09-11 10:10 ` patchwork-bot+netdevbpf

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).