Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] selftests/xsk: improve shared-UMEM coverage and infrastructure
@ 2026-08-07 13:42 Tushar Vyavahare
  2026-08-07 13:42 ` [PATCH net-next 1/5] selftests/xsk: add UMEM users refcount and centralize socket teardown Tushar Vyavahare
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Tushar Vyavahare @ 2026-08-07 13:42 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 existing XSK selftests is limited to a
small set of scenarios and cleanup paths that become fragile as coverage
expands.

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

Patch 1 introduces explicit UMEM lifetime management with refcounting
and consolidates socket/UMEM teardown into common helpers, keeping
cleanup behavior consistent across normal completion and error paths.

Patch 2 adds rollback for partial socket setup in xsk_configure() when
xsk_socket__create() retries are exhausted or busy-poll setup fails.

Patch 3 adds a length-based XDP steering helper and updates XSKMAP/test
capacity constants for 4-socket scenarios. Steering is explicitly based
on total XDP-visible packet length (data_end - data) using
SHARED_UMEM_LEN_SPLIT.

Patch 4 adds the shared-UMEM callback runner together with the first
four test cases (4-socket, length-based steering, uneven distribution,
and unaligned chunk mode) in one commit so every SHA in the series
builds and bisects cleanly. The unaligned path snapshots/restores prior
alignment flags with NULL-safe UMEM guards.

Patch 5 makes pkt_stream_even_odd_sequence() rollback-safe by staging
replacement streams in temporary arrays and committing only after all
allocations succeed.

Together, these patches make shared-UMEM setup/cleanup more robust and
extend selftest coverage to common multi-socket and distribution
scenarios.

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: roll back partial socket setup on configure failures
  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       | 428 ++++++++++++++++--
 .../selftests/bpf/prog_tests/test_xsk.h       |  24 +
 .../selftests/bpf/progs/xsk_xdp_progs.c       |  19 +-
 tools/testing/selftests/bpf/xsk_xdp_common.h  |   3 +-
 tools/testing/selftests/bpf/xskxceiver.c      |  35 +-
 5 files changed, 436 insertions(+), 73 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-08-07 13:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07 13:42 [PATCH net-next 0/5] selftests/xsk: improve shared-UMEM coverage and infrastructure Tushar Vyavahare
2026-08-07 13:42 ` [PATCH net-next 1/5] selftests/xsk: add UMEM users refcount and centralize socket teardown Tushar Vyavahare
2026-08-07 13:42 ` [PATCH net-next 2/5] selftests/xsk: roll back partial socket setup on configure failures Tushar Vyavahare
2026-08-07 13:42 ` [PATCH net-next 3/5] selftests/xsk: expand XSKMAP capacity and add length-based XDP program Tushar Vyavahare
2026-08-07 13:42 ` [PATCH net-next 4/5] selftests/xsk: add shared-UMEM callback framework and initial test cases Tushar Vyavahare
2026-08-07 13:42 ` [PATCH net-next 5/5] selftests/xsk: make pkt_stream_even_odd_sequence rollback-safe Tushar Vyavahare

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