[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250321005419.684036-1-tushar.vyavahare@intel.com>
Date: Fri, 21 Mar 2025 00:54:17 +0000
From: Tushar Vyavahare <tushar.vyavahare@...el.com>
To: bpf@...r.kernel.org
Cc: netdev@...r.kernel.org,
bjorn@...nel.org,
magnus.karlsson@...el.com,
maciej.fijalkowski@...el.com,
jonathan.lemon@...il.com,
davem@...emloft.net,
kuba@...nel.org,
pabeni@...hat.com,
ast@...nel.org,
daniel@...earbox.net,
tirthendu.sarkar@...el.com,
tushar.vyavahare@...el.com
Subject: [PATCH bpf-next v4 0/2] selftests/xsk: Add tests for XDP tail adjustment in AF_XDP
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.
v2 -> v3:
1. Introduce `adjust_value` to replace `count` for clearer communication
with userspace.
v3 -> v4:
1. Remove `testapp_adjust_tail_common()`. [Maciej]
2. Add comments and modify code for buffer resizing logic in test cases
(shrink/grow by specific byte sizes for testing purposes). [Maciej]
---
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@...el.com>
.../selftests/bpf/progs/xsk_xdp_progs.c | 50 ++++++++
tools/testing/selftests/bpf/xsk_xdp_common.h | 1 +
tools/testing/selftests/bpf/xskxceiver.c | 118 ++++++++++++++++--
tools/testing/selftests/bpf/xskxceiver.h | 2 +
4 files changed, 163 insertions(+), 8 deletions(-)
--
2.34.1
Powered by blists - more mailing lists