linux/tools/testing/selftests/bpf/xsk_xdp_common.h
Tushar Vyavahare 4b30209255 selftests/xsk: Add tail adjustment tests and support check
Introduce tail adjustment functionality in xskxceiver using
bpf_xdp_adjust_tail(). Add `xsk_xdp_adjust_tail` to modify packet sizes
and drop unmodified packets. Implement `is_adjust_tail_supported` to check
helper availability. Develop packet resizing tests, including shrinking
and growing scenarios, with functions for both single-buffer and
multi-buffer cases. Update the test framework to handle various scenarios
and adjust MTU settings. These changes enhance the testing of packet tail
adjustments, improving AF_XDP framework reliability.

Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Tushar Vyavahare <tushar.vyavahare@intel.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20250410033116.173617-3-tushar.vyavahare@intel.com
2025-04-10 10:08:55 -07:00

13 lines
305 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef XSK_XDP_COMMON_H_
#define XSK_XDP_COMMON_H_
#define MAX_SOCKETS 2
#define PKT_HDR_ALIGN (sizeof(struct ethhdr) + 2) /* Just to align the data in the packet */
struct xdp_info {
__u64 count;
} __attribute__((aligned(32)));
#endif /* XSK_XDP_COMMON_H_ */