summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/xdpxceiver.h
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus.karlsson@intel.com>2021-08-25 12:37:15 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-08-25 22:22:00 +0300
commit0d41f59f458a4f08353f7aba64bbc6388a858265 (patch)
treee13085de372a506e6a1ccd32924aa2eb4c3616c8 /tools/testing/selftests/bpf/xdpxceiver.h
parent9da2ea4fe8d10060a417a71f808df7e825660867 (diff)
downloadlinux-0d41f59f458a4f08353f7aba64bbc6388a858265.tar.xz
selftests: xsk: Simplify packet validation in xsk tests
Simplify packet validation in the xsk selftests by performing it at once for every packet. The current code performed this per batch and did this on copied packet data. Make it simpler and faster by validating it at once and on the umem packet data thus skipping the copy and the memory allocation for the temprary buffer. The optional packet dump feature is also simplified in the same manner. Memory allocation and copying is removed and the dump is performed directly on the umem data. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210825093722.10219-10-magnus.karlsson@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/xdpxceiver.h')
-rw-r--r--tools/testing/selftests/bpf/xdpxceiver.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/tools/testing/selftests/bpf/xdpxceiver.h b/tools/testing/selftests/bpf/xdpxceiver.h
index 131bd998e374..0fb657b505ae 100644
--- a/tools/testing/selftests/bpf/xdpxceiver.h
+++ b/tools/testing/selftests/bpf/xdpxceiver.h
@@ -139,18 +139,4 @@ static struct ifobject *ifdict_tx;
pthread_barrier_t barr;
pthread_t t0, t1;
-TAILQ_HEAD(head_s, pkt) head = TAILQ_HEAD_INITIALIZER(head);
-struct head_s *head_p;
-struct pkt {
- char *pkt_frame;
-
- TAILQ_ENTRY(pkt) pkt_nodes;
-} *pkt_node_rx, *pkt_node_rx_q;
-
-struct pkt_frame {
- char *payload;
-} *pkt_obj;
-
-struct pkt_frame **pkt_buf;
-
#endif /* XDPXCEIVER_H */