mbox series

[bpf-next,0/6] selftests/xsk: Add tests for XDP tail adjustment in AF_XDP

Message ID 20250220084147.94494-1-tushar.vyavahare@intel.com (mailing list archive)
Headers show
Series selftests/xsk: Add tests for XDP tail adjustment in AF_XDP | expand

Message

Tushar Vyavahare Feb. 20, 2025, 8:41 a.m. UTC
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.

---
Patch Summary:

1. Add functions to replace packet streams for ifobjects and test_spec.

2. Introduce xsk_xdp_adjust_tail to adjust packet tails dynamically.

3. Add userspace function to adjust packet tails using XDP program.

4. Add function to check if bpf_xdp_adjust_tail() is supported.

5. Add function to test packet resizing using bpf_xdp_adjust_tail.

6. Introduce test shrinking and growing packets using
   bpf_xdp_adjust_tail(), and cover multi-buffer scenarios when used with
   AF_XDP.
---

Tushar Vyavahare (6):
  selftests/xsk: Add packet stream replacement functions
  selftests/xsk: Add tail adjustment functionality to XDP
  selftests/xsk: Add testapp_xdp_adjust_tail function to userspace for
    packet tail adjustment
  selftests/xsk: Add support check for bpf_xdp_adjust_tail() helper in
    xskxceiver
  selftests/xsk: Implement packet resizing test with bpf_xdp_adjust_tail
  selftests/xsk: Add packet resizing tests with bpf_xdp_adjust_tail for
    AF_XDP

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      | 147 ++++++++++++++++--
 tools/testing/selftests/bpf/xskxceiver.h      |   2 +
 4 files changed, 183 insertions(+), 15 deletions(-)