selftests/xsk: dump packet at error
authorMagnus Karlsson <magnus.karlsson@intel.com>
Tue, 16 May 2023 10:31:03 +0000 (12:31 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 17 May 2023 05:31:51 +0000 (22:31 -0700)
commit7a8a6762822a1f5249eec356e7ea31f98161fba0
treee1a367f48b8ebdfdc893a922d5c0bccfe87e52cd
parentfeb973a9094ff92fb8c141be5d2e762f9ab36a7a
selftests/xsk: dump packet at error

Dump the content of the packet when a test finds that packets are
received out of order, the length is wrong, or some other packet
error. Use the already existing pkt_dump function for this and call it
when the above errors are detected. Get rid of the command line option
for dumping packets as it is not useful to print out thousands of
good packets followed by the faulty one you would like to see.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/r/20230516103109.3066-5-magnus.karlsson@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_xsk.sh
tools/testing/selftests/bpf/xskxceiver.c
tools/testing/selftests/bpf/xskxceiver.h