mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

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
13 lines
305 B
C
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_ */
|