summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>2021-03-30 01:43:00 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-03-30 19:24:38 +0300
commit9f33df73a929ed91dddad036f518d690b3094eda (patch)
tree795a292bd3d7e5afc891a77e4e4c7a9d19828695 /tools
parent05d817031ff9686a8206039b19e37616cf9e1d44 (diff)
downloadlinux-9f33df73a929ed91dddad036f518d690b3094eda.tar.xz
selftests: xsk: Don't call worker_pkt_dump() for stats test
For TEST_TYPE_STATS, worker_pkt_validate() that places frames onto pkt_buf is not called. Therefore, when dump mode is set, don't call worker_pkt_dump() for mentioned test type, so that it won't crash on pkt_buf() access. Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210329224316.17793-2-maciej.fijalkowski@intel.com
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/bpf/xdpxceiver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/xdpxceiver.c b/tools/testing/selftests/bpf/xdpxceiver.c
index 1e21a3172687..09429ed2ddf6 100644
--- a/tools/testing/selftests/bpf/xdpxceiver.c
+++ b/tools/testing/selftests/bpf/xdpxceiver.c
@@ -999,7 +999,7 @@ static void testapp_validate(void)
pthread_join(t1, NULL);
pthread_join(t0, NULL);
- if (debug_pkt_dump) {
+ if (debug_pkt_dump && test_type != TEST_TYPE_STATS) {
worker_pkt_dump();
for (int iter = 0; iter < num_frames - 1; iter++) {
free(pkt_buf[iter]->payload);