Hi Ido,
-----Original Message----- From: Ido Schimmel idosch@idosch.org Sent: Sunday, 27 August 2023 19:18 To: Sriram Yagnaraman sriram.yagnaraman@est.tech Cc: netdev@vger.kernel.org; linux-kselftest@vger.kernel.org; David S . Miller davem@davemloft.net; Eric Dumazet edumazet@google.com; Jakub Kicinski kuba@kernel.org; Paolo Abeni pabeni@redhat.com; David Ahern dsahern@kernel.org; Ido Schimmel idosch@nvidia.com; Shuah Khan shuah@kernel.org; Petr Machata petrm@nvidia.com Subject: Re: [PATCH net v2 3/3] selftests: forwarding: Add test for load- balancing between multiple servers
On Fri, Aug 25, 2023 at 11:08:30AM +0200, Sriram Yagnaraman wrote:
Create a topology with a host, and a router. The host (veth0) is in the default namespace, and a network namespace is created for the router, the peer veth1 is moved to the router netns. A dummy interface is added inside the router netns, to simulate a network that has two
neighbors.
An ECMP route to a virtual IP (vip) with the two neighbors as the next hop is added.
The test uses perf stat to count the number of fib:fib_table_lookup tracepoint hits for IPv4 and the number of fib6:fib6_table_lookup for IPv6. The measured count is checked to be within 15% for the number of packets received on veth1 in the router.
See diagram in the test for more information.
Suggested-by: Ido Schimmel idosch@nvidia.com Signed-off-by: Sriram Yagnaraman sriram.yagnaraman@est.tech
.../testing/selftests/net/forwarding/Makefile | 1 + tools/testing/selftests/net/forwarding/lib.sh | 5 + .../net/forwarding/router_multipath_vip.sh | 255 ++++++++++++++++++
I believe this test better fits in fib_tests.sh. Here's a diff that uses the previously mentioned method [1]. I verified that it fails without the fixes and passes with them:
Before:
IPv4 multipath list receive tests TEST: Multipath route hit ratio (.15) [FAIL] TEST: Single path route hit ratio (.15) [ OK ]
IPv6 multipath list receive tests TEST: Multipath route hit ratio (.15) [FAIL] TEST: Single path route hit ratio (.14) [ OK ]
After:
IPv4 multipath list receive tests TEST: Multipath route hit ratio (.99) [ OK ] TEST: Single path route hit ratio (.15) [ OK ]
IPv6 multipath list receive tests TEST: Multipath route hit ratio (.99) [ OK ] TEST: Single path route hit ratio (.14) [ OK ]
Thanks a lot, it works for me as well. I will post v3 with this version of the test then.