Skip to content

Commit aa13e52

Browse files
idoschkuba-moo
authored andcommitted
selftests: fib_tests: Count all trace point invocations
The tests rely on the IPv{4,6} FIB trace points being triggered once for each forwarded packet. If receive processing is deferred to the ksoftirqd task these invocations will not be counted and the tests will fail. Fix by specifying the '-a' flag to avoid perf from filtering on the mausezahn task. Before: # ./fib_tests.sh -t ipv4_mpath_list IPv4 multipath list receive tests TEST: Multipath route hit ratio (.68) [FAIL] # ./fib_tests.sh -t ipv6_mpath_list IPv6 multipath list receive tests TEST: Multipath route hit ratio (.27) [FAIL] After: # ./fib_tests.sh -t ipv4_mpath_list IPv4 multipath list receive tests TEST: Multipath route hit ratio (1.00) [ OK ] # ./fib_tests.sh -t ipv6_mpath_list IPv6 multipath list receive tests TEST: Multipath route hit ratio (.99) [ OK ] Fixes: 8ae9efb ("selftests: fib_tests: Add multipath list receive tests") Reported-by: kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/netdev/202309191658.c00d8b8-oliver.sang@intel.com/ Tested-by: kernel test robot <oliver.sang@intel.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: David Ahern <dsahern@kernel.org> Tested-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Link: https://lore.kernel.org/r/20231010132113.3014691-3-idosch@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent dbb1337 commit aa13e52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/net/fib_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2452,7 +2452,7 @@ ipv4_mpath_list_test()
24522452
# words, the FIB lookup tracepoint needs to be triggered for every
24532453
# packet.
24542454
local t0_rx_pkts=$(link_stats_get ns2 veth2 rx packets)
2455-
run_cmd "perf stat -e fib:fib_table_lookup --filter 'err == 0' -j -o $tmp_file -- $cmd"
2455+
run_cmd "perf stat -a -e fib:fib_table_lookup --filter 'err == 0' -j -o $tmp_file -- $cmd"
24562456
local t1_rx_pkts=$(link_stats_get ns2 veth2 rx packets)
24572457
local diff=$(echo $t1_rx_pkts - $t0_rx_pkts | bc -l)
24582458
list_rcv_eval $tmp_file $diff
@@ -2497,7 +2497,7 @@ ipv6_mpath_list_test()
24972497
# words, the FIB lookup tracepoint needs to be triggered for every
24982498
# packet.
24992499
local t0_rx_pkts=$(link_stats_get ns2 veth2 rx packets)
2500-
run_cmd "perf stat -e fib6:fib6_table_lookup --filter 'err == 0' -j -o $tmp_file -- $cmd"
2500+
run_cmd "perf stat -a -e fib6:fib6_table_lookup --filter 'err == 0' -j -o $tmp_file -- $cmd"
25012501
local t1_rx_pkts=$(link_stats_get ns2 veth2 rx packets)
25022502
local diff=$(echo $t1_rx_pkts - $t0_rx_pkts | bc -l)
25032503
list_rcv_eval $tmp_file $diff

0 commit comments

Comments
 (0)