summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/xskxceiver.h
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus.karlsson@intel.com>2023-01-11 10:35:23 +0100
committerAlexei Starovoitov <ast@kernel.org>2023-01-12 03:16:52 +0100
commit80bea9acabb7690042f8efe25f208ffc67032aac (patch)
tree5928d4db7c4afc7de05ea03f25211802e1816f18 /tools/testing/selftests/bpf/xskxceiver.h
parentselftests/xsk: get rid of built-in XDP program (diff)
downloadlinux-80bea9acabb7690042f8efe25f208ffc67032aac.tar.xz
linux-80bea9acabb7690042f8efe25f208ffc67032aac.zip
selftests/xsk: add test when some packets are XDP_DROPed
Add a new test where some of the packets are not passed to the AF_XDP socket and instead get a XDP_DROP verdict. This is important as it tests the recycling mechanism of the buffer pool. If a packet is not sent to the AF_XDP socket, the buffer the packet resides in is instead recycled so it can be used again without the round-trip to user space. The test introduces a new XDP program that drops every other packet. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Link: https://lore.kernel.org/r/20230111093526.11682-13-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/xskxceiver.h')
-rw-r--r--tools/testing/selftests/bpf/xskxceiver.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/xskxceiver.h b/tools/testing/selftests/bpf/xskxceiver.h
index 70b3e5d1d40c..a4daa5134fc0 100644
--- a/tools/testing/selftests/bpf/xskxceiver.h
+++ b/tools/testing/selftests/bpf/xskxceiver.h
@@ -87,6 +87,7 @@ enum test_type {
TEST_TYPE_STATS_RX_FULL,
TEST_TYPE_STATS_FILL_EMPTY,
TEST_TYPE_BPF_RES,
+ TEST_TYPE_XDP_DROP_HALF,
TEST_TYPE_MAX
};