From: Ido Schimmel <idosch@nvidia.com>
To: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Cc: "David S. Miller" <davem@davemloft.net>,
David Ahern <dsahern@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Willem de Bruijn <willemb@google.com>,
Jakub Kicinski <kuba@kernel.ord>, Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH net 2/2] selftests: fib_nexthops: Add test case for ipv4 multi nexthops
Date: Mon, 15 Dec 2025 08:59:33 +0200 [thread overview]
Message-ID: <aT-x1ZQtu4rsGxgI@shredder> (raw)
In-Reply-To: <20251213135849.2054677-2-vadim.fedorenko@linux.dev>
On Sat, Dec 13, 2025 at 01:58:49PM +0000, Vadim Fedorenko wrote:
> diff --git a/tools/testing/selftests/net/fib_nexthops.sh b/tools/testing/selftests/net/fib_nexthops.sh
> index 2b0a90581e2f..9d6f57399a73 100755
> --- a/tools/testing/selftests/net/fib_nexthops.sh
> +++ b/tools/testing/selftests/net/fib_nexthops.sh
> @@ -31,6 +31,7 @@ IPV4_TESTS="
> ipv4_compat_mode
> ipv4_fdb_grp_fcnal
> ipv4_mpath_select
> + ipv4_mpath_select_nogrp
> ipv4_torture
> ipv4_res_torture
> "
> @@ -375,6 +376,17 @@ check_large_res_grp()
> log_test $? 0 "Dump large (x$buckets) nexthop buckets"
> }
>
> +get_route_dev_src()
> +{
> + local pfx="$1"
> + local src="$2"
> + local out
> +
> + if out=$($IP -j route get "$pfx" from "$src" | jq -re ".[0].dev"); then
> + echo "$out"
> + fi
> +}
> +
> get_route_dev()
> {
> local pfx="$1"
> @@ -641,6 +653,79 @@ ipv4_fdb_grp_fcnal()
> $IP link del dev vx10
> }
>
> +ipv4_mpath_select_nogrp()
> +{
> + local rc dev match h addr
> +
> + echo
> + echo "IPv4 multipath selection no group"
> + echo "------------------------"
> + if [ ! -x "$(command -v jq)" ]; then
> + echo "SKIP: Could not run test; need jq tool"
> + return $ksft_skip
> + fi
> +
> + IP="ip -netns $peer"
> + # Use status of existing neighbor entry when determining nexthop for
> + # multipath routes.
> + local -A gws
> + gws=([veth2]=172.16.1.1 [veth4]=172.16.2.1)
> + local -A other_dev
> + other_dev=([veth2]=veth4 [veth4]=veth2)
> + local -A local_ips
> + local_ips=([veth2]=172.16.1.2 [veth4]=172.16.2.2 [veth5]=172.16.100.1)
> + local -A route_devs
> + route_devs=([veth2]=0 [veth4]=0)
> +
> + run_cmd "$IP address add 172.16.100.1/32 dev lo"
> + run_cmd "$IP ro add 172.16.102.0/24 nexthop via ${gws['veth2']} dev veth2 nexthop via ${gws['veth4']} dev veth4"
fib_nexthops.sh is for tests using nexthop objects: "This test is for
checking IPv4 and IPv6 FIB behavior with nexthop objects".
I suggest moving this to fib_tests.sh. See commit 4d0dac499bf3
("selftests/net: test tcp connection load balancing") that was added as
a test for the blamed commit.
next prev parent reply other threads:[~2025-12-15 6:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-13 13:58 [PATCH net 1/2] net: fib: restore ECMP balance from loopback Vadim Fedorenko
2025-12-13 13:58 ` [PATCH net 2/2] selftests: fib_nexthops: Add test case for ipv4 multi nexthops Vadim Fedorenko
2025-12-13 21:18 ` Willem de Bruijn
2025-12-13 21:26 ` Vadim Fedorenko
2025-12-13 22:02 ` David Ahern
2025-12-15 6:59 ` Ido Schimmel [this message]
2025-12-15 16:13 ` David Ahern
2025-12-15 19:01 ` Vadim Fedorenko
2025-12-13 20:54 ` [PATCH net 1/2] net: fib: restore ECMP balance from loopback Willem de Bruijn
2025-12-13 21:22 ` Vadim Fedorenko
2025-12-15 21:45 ` Willem de Bruijn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aT-x1ZQtu4rsGxgI@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.ord \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=vadim.fedorenko@linux.dev \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).