Skip to content

Commit 265c17d

Browse files
DanielTimLeekernel-patches-bot
authored andcommitted
samples: bpf: fix lwt_len_hist reusing previous BPF map
Currently, lwt_len_hist's map lwt_len_hist_map is uses pinning, and the map isn't cleared on test end. This leds to reuse of that map for each test, which prevents the results of the test from being accurate. This commit fixes the problem by removing of pinned map from bpffs. Also, this commit add the executable permission to shell script files. Fixes: f74599f ("bpf: Add tests and samples for LWT-BPF") Signed-off-by: Daniel T. Lee <[email protected]>
1 parent f3ec150 commit 265c17d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

samples/bpf/lwt_len_hist.sh

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ VETH1=tst_lwt1b
88
TRACE_ROOT=/sys/kernel/debug/tracing
99

1010
function cleanup {
11+
# To reset saved histogram, remove pinned map
12+
rm /sys/fs/bpf/tc/globals/lwt_len_hist_map
1113
ip route del 192.168.253.2/32 dev $VETH0 2> /dev/null
1214
ip link del $VETH0 2> /dev/null
1315
ip link del $VETH1 2> /dev/null

samples/bpf/test_lwt_bpf.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)