Commit f80ddbec authored by Magnus Karlsson's avatar Magnus Karlsson Committed by Alexei Starovoitov

selftests/xsk: add metadata copy test for multi-buff

Enable the already existing metadata copy test to also run in
multi-buffer mode with 9K packets.
Signed-off-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/r/20230719132421.584801-23-maciej.fijalkowski@intel.comSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 69760449
...@@ -29,7 +29,7 @@ SEC("xdp.frags") int xsk_xdp_drop(struct xdp_md *xdp) ...@@ -29,7 +29,7 @@ SEC("xdp.frags") int xsk_xdp_drop(struct xdp_md *xdp)
return bpf_redirect_map(&xsk, 0, XDP_DROP); return bpf_redirect_map(&xsk, 0, XDP_DROP);
} }
SEC("xdp") int xsk_xdp_populate_metadata(struct xdp_md *xdp) SEC("xdp.frags") int xsk_xdp_populate_metadata(struct xdp_md *xdp)
{ {
void *data, *data_meta; void *data, *data_meta;
struct xdp_info *meta; struct xdp_info *meta;
......
...@@ -1949,7 +1949,6 @@ static int testapp_xdp_metadata_count(struct test_spec *test) ...@@ -1949,7 +1949,6 @@ static int testapp_xdp_metadata_count(struct test_spec *test)
int count = 0; int count = 0;
int key = 0; int key = 0;
test_spec_set_name(test, "XDP_METADATA_COUNT");
test_spec_set_xdp_prog(test, skel_rx->progs.xsk_xdp_populate_metadata, test_spec_set_xdp_prog(test, skel_rx->progs.xsk_xdp_populate_metadata,
skel_tx->progs.xsk_xdp_populate_metadata, skel_tx->progs.xsk_xdp_populate_metadata,
skel_rx->maps.xsk, skel_tx->maps.xsk); skel_rx->maps.xsk, skel_tx->maps.xsk);
...@@ -2163,6 +2162,12 @@ static void run_pkt_test(struct test_spec *test, enum test_mode mode, enum test_ ...@@ -2163,6 +2162,12 @@ static void run_pkt_test(struct test_spec *test, enum test_mode mode, enum test_
ret = testapp_xdp_drop(test); ret = testapp_xdp_drop(test);
break; break;
case TEST_TYPE_XDP_METADATA_COUNT: case TEST_TYPE_XDP_METADATA_COUNT:
test_spec_set_name(test, "XDP_METADATA_COUNT");
ret = testapp_xdp_metadata_count(test);
break;
case TEST_TYPE_XDP_METADATA_COUNT_MB:
test_spec_set_name(test, "XDP_METADATA_COUNT_MULTI_BUFF");
test->mtu = MAX_ETH_JUMBO_SIZE;
ret = testapp_xdp_metadata_count(test); ret = testapp_xdp_metadata_count(test);
break; break;
default: default:
......
...@@ -88,6 +88,7 @@ enum test_type { ...@@ -88,6 +88,7 @@ enum test_type {
TEST_TYPE_BPF_RES, TEST_TYPE_BPF_RES,
TEST_TYPE_XDP_DROP_HALF, TEST_TYPE_XDP_DROP_HALF,
TEST_TYPE_XDP_METADATA_COUNT, TEST_TYPE_XDP_METADATA_COUNT,
TEST_TYPE_XDP_METADATA_COUNT_MB,
TEST_TYPE_RUN_TO_COMPLETION_MB, TEST_TYPE_RUN_TO_COMPLETION_MB,
TEST_TYPE_UNALIGNED_MB, TEST_TYPE_UNALIGNED_MB,
TEST_TYPE_ALIGNED_INV_DESC_MB, TEST_TYPE_ALIGNED_INV_DESC_MB,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment