All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/5] selftests/xsk: improve shared-UMEM coverage
@ 2026-08-13  6:27 Tushar Vyavahare
  2026-08-13  6:27 ` [PATCH net-next v2 1/5] selftests/xsk: add UMEM users refcount and centralize socket teardown Tushar Vyavahare
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Tushar Vyavahare @ 2026-08-13  6:27 UTC (permalink / raw)
  To: netdev, magnus.karlsson, maciej.fijalkowski, stfomichev,
	kernelxing, davem, kuba, pabeni, ast, daniel, tirthendu.sarkar,
	tushar.vyavahare, andrii
  Cc: bpf

AF_XDP shared-UMEM support in the existing XSK selftests is limited to
a small set of scenarios, while the supporting setup and cleanup paths
become fragile as coverage expands.

This series improves shared-UMEM testing and infrastructure in five
steps.

Patch 1 makes UMEM ownership explicit with refcounting and centralizes
socket/UMEM teardown, keeping cleanup behavior consistent across normal
completion and error paths.

Patch 2 prevents TX setup when RX socket configuration has already
failed. This avoids shared-UMEM TX setup relying on incomplete RX-side
socket and UMEM state.

Patch 3 expands XSKMAP and test capacity to four sockets and adds a
length-based XDP steering program. The classifier uses total
XDP-visible packet length (data_end - data) and SHARED_UMEM_LEN_SPLIT.

Patch 4 adds the shared-UMEM callback runner and initial 4-socket,
length-based steering, uneven-distribution, and unaligned-chunk test
cases. The unaligned path snapshots and restores alignment flags with
NULL-safe UMEM guards.

Patch 5 makes pkt_stream_even_odd_sequence() transactional: it stages
replacement streams until all allocations succeed, avoiding leaked
replacement streams and partially replaced socket stream arrays after
an allocation failure.

Together, these patches strengthen shared-UMEM setup and cleanup and
extend selftest coverage to multi-socket and packet-distribution
scenarios.

v1 -> v2:
- [1/5] Track per-slot UMEM ownership and centralize refcount-based
  socket teardown. [sashiko]
- [2/5] Replace the redundant partial-socket rollback with RX failure
  publication before the setup barrier and skip TX setup after a failed
  RX configuration. [BPF AI]
- [3/5] Trim the length-classifier comment to match nearby BPF style.
  [BPF AI]
- [5/5] Clarify the partial stream replacement leak in the commit
  message. [BPF AI]

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Tushar Vyavahare <tushar.vyavahare@intel.com>

Tushar Vyavahare (5):
  selftests/xsk: add UMEM users refcount and centralize socket teardown
  selftests/xsk: Skip TX setup after RX configuration failure
  selftests/xsk: expand XSKMAP capacity and add length-based XDP program
  selftests/xsk: add shared-UMEM callback framework and initial test
    cases
  selftests/xsk: make pkt_stream_even_odd_sequence rollback-safe

 .../selftests/bpf/prog_tests/test_xsk.c       | 423 ++++++++++++++++--
 .../selftests/bpf/prog_tests/test_xsk.h       |  26 +-
 .../selftests/bpf/progs/xsk_xdp_progs.c       |  15 +-
 tools/testing/selftests/bpf/xsk_xdp_common.h  |   3 +-
 tools/testing/selftests/bpf/xskxceiver.c      |  38 +-
 5 files changed, 430 insertions(+), 75 deletions(-)

-- 
2.43.0

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

end of thread, other threads:[~2026-08-14  6:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13  6:27 [PATCH net-next v2 0/5] selftests/xsk: improve shared-UMEM coverage Tushar Vyavahare
2026-08-13  6:27 ` [PATCH net-next v2 1/5] selftests/xsk: add UMEM users refcount and centralize socket teardown Tushar Vyavahare
2026-08-14  6:30   ` sashiko-bot
2026-08-13  6:27 ` [PATCH net-next v2 2/5] selftests/xsk: Skip TX setup after RX configuration failure Tushar Vyavahare
2026-08-13  6:27 ` [PATCH net-next v2 3/5] selftests/xsk: expand XSKMAP capacity and add length-based XDP program Tushar Vyavahare
2026-08-13  6:27 ` [PATCH net-next v2 4/5] selftests/xsk: add shared-UMEM callback framework and initial test cases Tushar Vyavahare
2026-08-13  6:27 ` [PATCH net-next v2 5/5] selftests/xsk: make pkt_stream_even_odd_sequence rollback-safe Tushar Vyavahare

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.