bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/2] selftests/xsk: Add tests for XDP tail adjustment in AF_XDP
@ 2025-02-27 14:27 Tushar Vyavahare
  2025-02-27 14:27 ` [PATCH bpf-next v2 1/2] selftests/xsk: Add packet stream replacement function Tushar Vyavahare
  2025-02-27 14:27 ` [PATCH bpf-next v2 2/2] selftests/xsk: Add tail adjustment tests and support check Tushar Vyavahare
  0 siblings, 2 replies; 7+ messages in thread
From: Tushar Vyavahare @ 2025-02-27 14:27 UTC (permalink / raw)
  To: bpf
  Cc: netdev, bjorn, magnus.karlsson, maciej.fijalkowski,
	jonathan.lemon, davem, kuba, pabeni, ast, daniel,
	tirthendu.sarkar, tushar.vyavahare

This patch series adds tests to validate the XDP tail adjustment
functionality, focusing on its use within the AF_XDP context. The tests
verify dynamic packet size manipulation using the bpf_xdp_adjust_tail()
helper function, covering both single and multi-buffer scenarios.

v1 -> v2:
1. Retain and extend stream replacement: Keep `pkt_stream_replace`
   unchanged. Add `pkt_stream_replace_ifobject` for targeted ifobject
   handling.

2. Consolidate patches: Merge patches 2 to 6 for tail adjustment tests and
   check.

---
Patch Summary:

1. Packet stream replacement: Add `pkt_stream_replace_ifobject` to manage
   packet streams efficiently.

2. Tail adjustment tests and support check: Implement dynamic packet
   resizing in xskxceiver by adding `xsk_xdp_adjust_tail` and extend this
   functionality to userspace with `testapp_xdp_adjust_tail` for
   validation. Ensure support by adding `is_adjust_tail_supported` to
   verify the availability of `bpf_xdp_adjust_tail()`. Introduce tests for
   shrinking and growing packets using `bpf_xdp_adjust_tail()`, covering
   both single and multi-buffer scenarios when used with AF_XDP.
---

Tushar Vyavahare (2):
  selftests/xsk: Add packet stream replacement function
  selftests/xsk: Add tail adjustment tests and support check

Signed-off-by: Tushar Vyavahare <tushar.vyavahare@intel.com>

 .../selftests/bpf/progs/xsk_xdp_progs.c       |  48 +++++++
 tools/testing/selftests/bpf/xsk_xdp_common.h  |   1 +
 tools/testing/selftests/bpf/xskxceiver.c      | 131 ++++++++++++++++--
 tools/testing/selftests/bpf/xskxceiver.h      |   2 +
 4 files changed, 174 insertions(+), 8 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2025-03-05 14:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27 14:27 [PATCH bpf-next v2 0/2] selftests/xsk: Add tests for XDP tail adjustment in AF_XDP Tushar Vyavahare
2025-02-27 14:27 ` [PATCH bpf-next v2 1/2] selftests/xsk: Add packet stream replacement function Tushar Vyavahare
2025-02-27 14:27 ` [PATCH bpf-next v2 2/2] selftests/xsk: Add tail adjustment tests and support check Tushar Vyavahare
2025-02-27 18:21   ` Maciej Fijalkowski
2025-02-28  9:56     ` Vyavahare, Tushar
2025-03-03 16:15       ` Maciej Fijalkowski
2025-03-05 14:40         ` Vyavahare, Tushar

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