* [PATCH net 0/2] selftests: fib_tests: Fixes for multipath list receive tests
@ 2023-10-10 13:21 Ido Schimmel
2023-10-10 13:21 ` [PATCH net 1/2] selftests: fib_tests: Disable RP filter in multipath list receive test Ido Schimmel
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Ido Schimmel @ 2023-10-10 13:21 UTC (permalink / raw)
To: netdev
Cc: davem, kuba, pabeni, edumazet, dsahern, sriram.yagnaraman,
oliver.sang, mlxsw, Ido Schimmel
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(-)
--
2.40.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH net 1/2] selftests: fib_tests: Disable RP filter in multipath list receive test
2023-10-10 13:21 [PATCH net 0/2] selftests: fib_tests: Fixes for multipath list receive tests Ido Schimmel
@ 2023-10-10 13:21 ` Ido Schimmel
2023-10-10 15:21 ` David Ahern
2023-10-10 13:21 ` [PATCH net 2/2] selftests: fib_tests: Count all trace point invocations Ido Schimmel
2023-10-13 21:30 ` [PATCH net 0/2] selftests: fib_tests: Fixes for multipath list receive tests patchwork-bot+netdevbpf
2 siblings, 1 reply; 8+ messages in thread
From: Ido Schimmel @ 2023-10-10 13:21 UTC (permalink / raw)
To: netdev
Cc: davem, kuba, pabeni, edumazet, dsahern, sriram.yagnaraman,
oliver.sang, mlxsw, 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_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 ]
Fixes: 8ae9efb859c0 ("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>
---
tools/testing/selftests/net/fib_tests.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
index e7d2a530618a..0dbb26b4fa4a 100755
--- a/tools/testing/selftests/net/fib_tests.sh
+++ b/tools/testing/selftests/net/fib_tests.sh
@@ -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"]')
--
2.40.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net 2/2] selftests: fib_tests: Count all trace point invocations
2023-10-10 13:21 [PATCH net 0/2] selftests: fib_tests: Fixes for multipath list receive tests Ido Schimmel
2023-10-10 13:21 ` [PATCH net 1/2] selftests: fib_tests: Disable RP filter in multipath list receive test Ido Schimmel
@ 2023-10-10 13:21 ` Ido Schimmel
2023-10-10 15:21 ` David Ahern
2023-10-13 21:30 ` [PATCH net 0/2] selftests: fib_tests: Fixes for multipath list receive tests patchwork-bot+netdevbpf
2 siblings, 1 reply; 8+ messages in thread
From: Ido Schimmel @ 2023-10-10 13:21 UTC (permalink / raw)
To: netdev
Cc: davem, kuba, pabeni, edumazet, dsahern, sriram.yagnaraman,
oliver.sang, mlxsw, 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_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: 8ae9efb859c0 ("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>
---
tools/testing/selftests/net/fib_tests.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
index 0dbb26b4fa4a..66d0db7a2614 100755
--- a/tools/testing/selftests/net/fib_tests.sh
+++ b/tools/testing/selftests/net/fib_tests.sh
@@ -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
--
2.40.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net 1/2] selftests: fib_tests: Disable RP filter in multipath list receive test
2023-10-10 13:21 ` [PATCH net 1/2] selftests: fib_tests: Disable RP filter in multipath list receive test Ido Schimmel
@ 2023-10-10 15:21 ` David Ahern
2023-10-11 12:23 ` Sriram Yagnaraman
0 siblings, 1 reply; 8+ messages in thread
From: David Ahern @ 2023-10-10 15:21 UTC (permalink / raw)
To: Ido Schimmel, netdev
Cc: davem, kuba, pabeni, edumazet, dsahern, sriram.yagnaraman,
oliver.sang, mlxsw
On 10/10/23 7:21 AM, Ido Schimmel wrote:
> 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 ]
>
> Fixes: 8ae9efb859c0 ("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>
> ---
> tools/testing/selftests/net/fib_tests.sh | 3 +++
> 1 file changed, 3 insertions(+)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net 2/2] selftests: fib_tests: Count all trace point invocations
2023-10-10 13:21 ` [PATCH net 2/2] selftests: fib_tests: Count all trace point invocations Ido Schimmel
@ 2023-10-10 15:21 ` David Ahern
2023-10-11 12:23 ` Sriram Yagnaraman
0 siblings, 1 reply; 8+ messages in thread
From: David Ahern @ 2023-10-10 15:21 UTC (permalink / raw)
To: Ido Schimmel, netdev
Cc: davem, kuba, pabeni, edumazet, dsahern, sriram.yagnaraman,
oliver.sang, mlxsw
On 10/10/23 7:21 AM, Ido Schimmel wrote:
> 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: 8ae9efb859c0 ("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>
> ---
> tools/testing/selftests/net/fib_tests.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH net 1/2] selftests: fib_tests: Disable RP filter in multipath list receive test
2023-10-10 15:21 ` David Ahern
@ 2023-10-11 12:23 ` Sriram Yagnaraman
0 siblings, 0 replies; 8+ messages in thread
From: Sriram Yagnaraman @ 2023-10-11 12:23 UTC (permalink / raw)
To: David Ahern, Ido Schimmel, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, dsahern@gmail.com, oliver.sang@intel.com,
mlxsw@nvidia.com
> -----Original Message-----
> From: David Ahern <dsahern@kernel.org>
> Sent: Tuesday, 10 October 2023 17:21
> To: Ido Schimmel <idosch@nvidia.com>; netdev@vger.kernel.org
> Cc: davem@davemloft.net; kuba@kernel.org; pabeni@redhat.com;
> edumazet@google.com; dsahern@gmail.com; Sriram Yagnaraman
> <sriram.yagnaraman@est.tech>; oliver.sang@intel.com; mlxsw@nvidia.com
> Subject: Re: [PATCH net 1/2] selftests: fib_tests: Disable RP filter in multipath
> list receive test
>
> On 10/10/23 7:21 AM, Ido Schimmel wrote:
> > 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 ]
> >
> > Fixes: 8ae9efb859c0 ("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>
> > ---
> > tools/testing/selftests/net/fib_tests.sh | 3 +++
> > 1 file changed, 3 insertions(+)
> >
>
> Reviewed-by: David Ahern <dsahern@kernel.org>
>
Thanks a lot for fixing this
Tested-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH net 2/2] selftests: fib_tests: Count all trace point invocations
2023-10-10 15:21 ` David Ahern
@ 2023-10-11 12:23 ` Sriram Yagnaraman
0 siblings, 0 replies; 8+ messages in thread
From: Sriram Yagnaraman @ 2023-10-11 12:23 UTC (permalink / raw)
To: David Ahern, Ido Schimmel, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, dsahern@gmail.com, oliver.sang@intel.com,
mlxsw@nvidia.com
> -----Original Message-----
> From: David Ahern <dsahern@kernel.org>
> Sent: Tuesday, 10 October 2023 17:22
> To: Ido Schimmel <idosch@nvidia.com>; netdev@vger.kernel.org
> Cc: davem@davemloft.net; kuba@kernel.org; pabeni@redhat.com;
> edumazet@google.com; dsahern@gmail.com; Sriram Yagnaraman
> <sriram.yagnaraman@est.tech>; oliver.sang@intel.com; mlxsw@nvidia.com
> Subject: Re: [PATCH net 2/2] selftests: fib_tests: Count all trace point
> invocations
>
> On 10/10/23 7:21 AM, Ido Schimmel wrote:
> > 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: 8ae9efb859c0 ("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>
> > ---
> > tools/testing/selftests/net/fib_tests.sh | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
>
> Reviewed-by: David Ahern <dsahern@kernel.org>
>
Tested-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net 0/2] selftests: fib_tests: Fixes for multipath list receive tests
2023-10-10 13:21 [PATCH net 0/2] selftests: fib_tests: Fixes for multipath list receive tests Ido Schimmel
2023-10-10 13:21 ` [PATCH net 1/2] selftests: fib_tests: Disable RP filter in multipath list receive test Ido Schimmel
2023-10-10 13:21 ` [PATCH net 2/2] selftests: fib_tests: Count all trace point invocations Ido Schimmel
@ 2023-10-13 21:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-10-13 21:30 UTC (permalink / raw)
To: Ido Schimmel
Cc: netdev, davem, kuba, pabeni, edumazet, dsahern, sriram.yagnaraman,
oliver.sang, mlxsw
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
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 invocations
>
> tools/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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-10-13 21:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-10 13:21 [PATCH net 0/2] selftests: fib_tests: Fixes for multipath list receive tests Ido Schimmel
2023-10-10 13:21 ` [PATCH net 1/2] selftests: fib_tests: Disable RP filter in multipath list receive test Ido Schimmel
2023-10-10 15:21 ` David Ahern
2023-10-11 12:23 ` Sriram Yagnaraman
2023-10-10 13:21 ` [PATCH net 2/2] selftests: fib_tests: Count all trace point invocations Ido Schimmel
2023-10-10 15:21 ` David Ahern
2023-10-11 12:23 ` Sriram Yagnaraman
2023-10-13 21:30 ` [PATCH net 0/2] selftests: fib_tests: Fixes for multipath list receive tests patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).