From: Tushar Vyavahare <tushar.vyavahare@intel.com>
To: netdev@vger.kernel.org, magnus.karlsson@intel.com,
maciej.fijalkowski@intel.com, stfomichev@gmail.com,
kernelxing@tencent.com, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net,
tirthendu.sarkar@intel.com, tushar.vyavahare@intel.com,
andrii@kernel.org
Cc: bpf@vger.kernel.org
Subject: [PATCH net-next 0/5] selftests/xsk: improve shared-UMEM coverage and infrastructure
Date: Fri, 7 Aug 2026 13:42:04 +0000 [thread overview]
Message-ID: <20260807134209.3794735-1-tushar.vyavahare@intel.com> (raw)
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
next reply other threads:[~2026-08-07 13:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 13:42 Tushar Vyavahare [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260807134209.3794735-1-tushar.vyavahare@intel.com \
--to=tushar.vyavahare@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kernelxing@tencent.com \
--cc=kuba@kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stfomichev@gmail.com \
--cc=tirthendu.sarkar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox