[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241220091806.1856223-1-wei.fang@nxp.com>
Date: Fri, 20 Dec 2024 17:18:06 +0800
From: Wei Fang <wei.fang@....com>
To: ast@...nel.org,
daniel@...earbox.net,
davem@...emloft.net,
kuba@...nel.org,
hawk@...nel.org,
john.fastabend@...il.com,
andrii@...nel.org,
eddyz87@...il.com,
mykolal@...com,
martin.lau@...ux.dev,
song@...nel.org,
yonghong.song@...ux.dev,
kpsingh@...nel.org,
sdf@...ichev.me,
haoluo@...gle.com,
jolsa@...nel.org,
shuah@...nel.org
Cc: netdev@...r.kernel.org,
bpf@...r.kernel.org,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org,
imx@...ts.linux.dev
Subject: [PATCH bpf] selftests/bpf: add XDP_UMEM_TX_METADATA_LEN flag to umem_config
The Tx metadata test has been broken since the commit d5e726d9143c ("xsk:
Require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len"). Because
this change requires XDP_UMEM_TX_METADATA_LEN flag to be set, otherwise
xsk_buff_pool::tx_metadata_len will be initialized to 0, which means that
the driver cannot get Tx metadata and cannot execute AF_XDP Tx metadata
hooks.
Fixes: d5e726d9143c ("xsk: Require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len")
Signed-off-by: Wei Fang <wei.fang@....com>
---
tools/testing/selftests/bpf/xdp_hw_metadata.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/xdp_hw_metadata.c b/tools/testing/selftests/bpf/xdp_hw_metadata.c
index 6f9956eed797..ad6c08dfd6c8 100644
--- a/tools/testing/selftests/bpf/xdp_hw_metadata.c
+++ b/tools/testing/selftests/bpf/xdp_hw_metadata.c
@@ -79,7 +79,7 @@ static int open_xsk(int ifindex, struct xsk *xsk, __u32 queue_id)
.fill_size = XSK_RING_PROD__DEFAULT_NUM_DESCS,
.comp_size = XSK_RING_CONS__DEFAULT_NUM_DESCS,
.frame_size = XSK_UMEM__DEFAULT_FRAME_SIZE,
- .flags = XSK_UMEM__DEFAULT_FLAGS,
+ .flags = XDP_UMEM_TX_METADATA_LEN,
.tx_metadata_len = sizeof(struct xsk_tx_metadata),
};
__u32 idx = 0;
--
2.34.1
Powered by blists - more mailing lists