selftests: fib_tests: Fixes for multipath list receive tests
Subsystems (4)
Ido Schimmel
maintainercover selftests: fib_tests: Fixes for multipath list receive tests
Fix two issues in recently added FIB multipath list receive tests.
Ido Schimmel (2):
selftests: fib_tests: Disable RP filter in multipath list receive test
selftests: fib_tests: Count all trace point invocations
tools/testing/selftests/net/fib_tests.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.40.1
Ido Schimmel
maintainerPATCH 1/2 selftests: fib_tests: Disable RP filter in multipath list receive test
The test relies on the fib:fib_table_lookup trace point being triggered once for each forwarded packet. If RP filter is not disabled, the trace point will be triggered twice for each packet (for source validation and forwarding), potentially masking actual bugs. Fix by explicitly disabling RP filter.
Before:
# ./fib_tests.sh -t ipv4_mpath_list
IPv4 multipath list receive tests
TEST: Multipath route hit ratio (1.99) [ OK ]
After:
# ./fib_tests.sh -t ipv4_mpath_list
IPv4 multipath list receive tests
TEST: Multipath route hit ratio (.99) [ OK ]
--- tools/testing/selftests/net/fib_tests.sh | 3 +++ 1 file changed, 3 insertions(+)
tools/testing/selftests/net/fib_tests.sh +3 -0
@@ -2437,6 +2437,9 @@ ipv4_mpath_list_test() run_cmd "ip -n ns2 route add 203.0.113.0/24 nexthop via 172.16.201.2 nexthop via 172.16.202.2" run_cmd "ip netns exec ns2 sysctl -qw net.ipv4.fib_multipath_hash_policy=1" + run_cmd "ip netns exec ns2 sysctl -qw net.ipv4.conf.veth2.rp_filter=0" + run_cmd "ip netns exec ns2 sysctl -qw net.ipv4.conf.all.rp_filter=0" + run_cmd "ip netns exec ns2 sysctl -qw net.ipv4.conf.default.rp_filter=0" set +e local dmac=$(ip -n ns2 -j link show dev veth2 | jq -r '.[]["address"]')
Signature · 1 line
2.40.1
Re: [PATCH net 1/2] selftests: fib_tests: Disable RP filter in multipath list receive test
Quoted 20 lines · Ido Schimmel
The test relies on the fib:fib_table_lookup trace point being triggered once for each forwarded packet. If RP filter is not disabled, the trace point will be triggered twice for each packet (for source validation and forwarding), potentially masking actual bugs. Fix by explicitly disabling RP filter.
Before:
# ./fib_tests.sh -t ipv4_mpath_listIPv4 multipath list receive tests
TEST: Multipath route hit ratio (1.99) [ OK ]After:
# ./fib_tests.sh -t ipv4_mpath_listIPv4 multipath list receive tests
TEST: Multipath route hit ratio (.99) [ OK ]
Quoted 9 lines
Fixes 8ae9efb859c0 ("selftests: fib_tests: Add multipath list receive tests")Reported-by kernel test robot <[email protected]>Tested-by kernel test robot <[email protected]>Signed-off-by Ido Schimmel <[email protected]>--- tools/testing/selftests/net/fib_tests.sh | 3 +++ 1 file changed, 3 insertions(+)
Sriram Yagnaraman
Tested-byRE: [PATCH net 1/2] selftests: fib_tests: Disable RP filter in multipath list receive test
Quoted 46 lines
-----Original Message-----
From: David Ahern <[email protected]>
Sent: Tuesday, 10 October 2023 17:21
To: Ido Schimmel <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Sriram Yagnaraman <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH net 1/2] selftests:fib_tests: Disable RP filter in multipath list receive testQuoted 23 lines · Ido Schimmel
The test relies on the fib:fib_table_lookup trace point being triggered once for each forwarded packet. If RP filter is not disabled, the trace point will be triggered twice for each packet (for source validation and forwarding), potentially masking actual bugs. Fix by explicitly disabling RP filter.
Before:
# ./fib_tests.sh -t ipv4_mpath_listIPv4 multipath list receive tests
TEST: Multipath route hit ratio (1.99) [ OK ]After:
# ./fib_tests.sh -t ipv4_mpath_listIPv4 multipath list receive tests
TEST: Multipath route hit ratio (.99) [ OK ]Fixes 8ae9efb859c0 ("selftests: fib_tests: Add multipath list receivetests")
Reported-by kernel test robot <[email protected]>Quoted 9 lines
Closes:
https://lore.kernel.org/netdev/202309191658.c00d8b8-oliver.sang@intel.
com/Tested-by kernel test robot <[email protected]>Signed-off-by Ido Schimmel <[email protected]>--- tools/testing/selftests/net/fib_tests.sh | 3 +++ 1 file changed, 3 insertions(+)
Quoted 2 lines
Reviewed-by David Ahern <[email protected]>
Thanks a lot for fixing this
Ido Schimmel
maintainerPATCH 2/2 selftests: fib_tests: Count all trace point invocations
In reply to Ido SchimmelThe 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 ]
--- tools/testing/selftests/net/fib_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/net/fib_tests.sh +2 -2
@@ -2452,7 +2452,7 @@ ipv4_mpath_list_test() # words, the FIB lookup tracepoint needs to be triggered for every # packet. local t0_rx_pkts=$(link_stats_get ns2 veth2 rx packets) - run_cmd "perf stat -e fib:fib_table_lookup --filter 'err == 0' -j -o $tmp_file -- $cmd" + run_cmd "perf stat -a -e fib:fib_table_lookup --filter 'err == 0' -j -o $tmp_file -- $cmd" local t1_rx_pkts=$(link_stats_get ns2 veth2 rx packets) local diff=$(echo $t1_rx_pkts - $t0_rx_pkts | bc -l) list_rcv_eval $tmp_file $diff
@@ -2497,7 +2497,7 @@ ipv6_mpath_list_test() # words, the FIB lookup tracepoint needs to be triggered for every # packet. local t0_rx_pkts=$(link_stats_get ns2 veth2 rx packets) - run_cmd "perf stat -e fib6:fib6_table_lookup --filter 'err == 0' -j -o $tmp_file -- $cmd" + run_cmd "perf stat -a -e fib6:fib6_table_lookup --filter 'err == 0' -j -o $tmp_file -- $cmd" local t1_rx_pkts=$(link_stats_get ns2 veth2 rx packets) local diff=$(echo $t1_rx_pkts - $t0_rx_pkts | bc -l) list_rcv_eval $tmp_file $diff
Signature · 1 line
2.40.1
Re: [PATCH net 2/2] selftests: fib_tests: Count all trace point invocations
Quoted 30 lines · Ido Schimmel
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_listIPv4 multipath list receive tests
TEST: Multipath route hit ratio (.68) [FAIL]# ./fib_tests.sh -t ipv6_mpath_listIPv6 multipath list receive tests
TEST: Multipath route hit ratio (.27) [FAIL]After:
# ./fib_tests.sh -t ipv4_mpath_listIPv4 multipath list receive tests
TEST: Multipath route hit ratio (1.00) [ OK ]# ./fib_tests.sh -t ipv6_mpath_listIPv6 multipath list receive tests
TEST: Multipath route hit ratio (.99) [ OK ]
Quoted 9 lines
Fixes 8ae9efb859c0 ("selftests: fib_tests: Add multipath list receive tests")Reported-by kernel test robot <[email protected]>Tested-by kernel test robot <[email protected]>Signed-off-by Ido Schimmel <[email protected]>--- tools/testing/selftests/net/fib_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Sriram Yagnaraman
Tested-byRE: [PATCH net 2/2] selftests: fib_tests: Count all trace point invocations
Quoted 56 lines
-----Original Message-----
From: David Ahern <[email protected]>
Sent: Tuesday, 10 October 2023 17:22
To: Ido Schimmel <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Sriram Yagnaraman <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH net 2/2] selftests:fib_tests: Count all trace point invocationsQuoted 33 lines · Ido Schimmel
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_listIPv4 multipath list receive tests
TEST: Multipath route hit ratio (.68) [FAIL]# ./fib_tests.sh -t ipv6_mpath_listIPv6 multipath list receive tests
TEST: Multipath route hit ratio (.27) [FAIL]After:
# ./fib_tests.sh -t ipv4_mpath_listIPv4 multipath list receive tests
TEST: Multipath route hit ratio (1.00) [ OK ]# ./fib_tests.sh -t ipv6_mpath_listIPv6 multipath list receive tests
TEST: Multipath route hit ratio (.99) [ OK ]Fixes 8ae9efb859c0 ("selftests: fib_tests: Add multipath list receivetests")
Reported-by kernel test robot <[email protected]>Quoted 9 lines
Closes:
https://lore.kernel.org/netdev/202309191658.c00d8b8-oliver.sang@intel.
com/Tested-by kernel test robot <[email protected]>Signed-off-by Ido Schimmel <[email protected]>--- tools/testing/selftests/net/fib_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 2 lines
Reviewed-by David Ahern <[email protected]>
This series was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Tue, 10 Oct 2023 16:21:11 +0300 you wrote:
Fix two issues in recently added FIB multipath list receive tests.
Ido Schimmel (2):
selftests:fib_tests: Disable RP filter in multipath list receive test
selftests:fib_tests: Count all trace point invocationstools/testing/selftests/net/fib_tests.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Here is the summary with links:
- [net,1/2] selftests: fib_tests: Disable RP filter in multipath list receive test
https://git.kernel.org/netdev/net/c/dbb13378ba30 - [net,2/2] selftests: fib_tests: Count all trace point invocations https://git.kernel.org/netdev/net/c/aa13e5241a8f
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html