Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: deliran@verdict.gg
Cc: dsahern@kernel.org, idosch@nvidia.com, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, shuah@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v3 3/3] selftests: net: pmtu: Add IPv6 and asymmetric multipath tests
Date: Tue, 17 Nov 2026 13:14:34 +0000	[thread overview]
Message-ID: <179492127464.3136.16715840375114819070@kernel.org> (raw)
In-Reply-To: <20261113122237.88990-4-deliran@verdict.gg>

Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] In tools/testing/selftests/net/pmtu.sh, the new IPv6 variants
  of setup_multipath_new() and setup_multipath_old() add host6_a_addr…

--

selftests: net: pmtu: Add IPv6 and asymmetric multipath tests

This commit makes pmtu_ipv4_mp_exceptions family agnostic and adds an
IPv6 variant of it. It also adds IPv4 and IPv6 asymmetric multipath
tests. These pick a flow through each router and check which paths get
PMTU exceptions.

> diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
> index c7cd271714ef7..2bd132991841a 100755
> --- a/tools/testing/selftests/net/pmtu.sh
> +++ b/tools/testing/selftests/net/pmtu.sh

[ ... ]

> @@ -994,49 +1014,112 @@ setup_ovs_bridge() {
>  }
>  
>  setup_multipath_new() {
> -	# Set up host A with multipath routes to host B host4_b_addr
> -	run_cmd ${ns_a} ip addr add ${host4_a_addr} dev lo
> -	run_cmd ${ns_a} ip nexthop add id 401 via ${prefix4}.${a_r1}.2 dev veth_A-R1
> -	run_cmd ${ns_a} ip nexthop add id 402 via ${prefix4}.${a_r2}.2 dev veth_A-R2
> -	run_cmd ${ns_a} ip nexthop add id 403 group 401/402
> -	run_cmd ${ns_a} ip route add ${host4_b_addr} src ${host4_a_addr} nhid 403
> +	family=${1}
> +
> +	if [ ${family} -eq 4 ]; then

[ ... ]

> +	else
> +		host_a_addr=${host6_a_addr}
> +		host_b_addr=${host6_b_addr}

[ ... ]

> +	fi
> +
> +	# Set up host A with multipath routes to host B host_b_addr
> +	run_cmd ${ns_a} ip addr add ${host_a_addr} dev lo
> +	run_cmd ${ns_a} ip nexthop add id ${family}01 via ${nh_a_r1} dev veth_A-R1
> +	run_cmd ${ns_a} ip nexthop add id ${family}02 via ${nh_a_r2} dev veth_A-R2
> +	run_cmd ${ns_a} ip nexthop add id ${family}03 group ${family}01/${family}02
> +	run_cmd ${ns_a} ip route add ${host_b_addr} src ${host_a_addr} nhid ${family}03

[Severity: Medium]
With family 6, can this route add race against DAD on the lo address?

host6_a_addr is added to lo without nodad, so ipv6_add_addr() marks it
IFA_F_TENTATIVE. addrconf_dad_start() only queues dad_work. The flag is
cleared later, once addrconf_dad_work() takes the rtnl lock and reaches the
IFF_LOOPBACK shortcut in addrconf_dad_begin().

The next command uses that address as the prefsrc. In
ip6_route_info_create_nh() the address is checked like this:

    if (!ipv6_chk_addr(net, &cfg->fc_prefsrc, dev, 0)) {
        NL_SET_ERR_MSG(extack, "Invalid source address");
        err = -EINVAL;

ipv6_chk_addr() bans IFA_F_TENTATIVE. If dad_work hasn't run yet, the route
add fails with "Invalid source address".

The same check covers the legacy nexthop route in setup_multipath_old(),
and the host B routes in both helpers.

The run_cmd return values are ignored. The status of setup_multipath()
comes from the last router route add, so setup() still succeeds even when
host A or B has no multipath route.

Would that lead to spurious failures? Examples would be "no flow through
veth_A-R2 found" in test_pmtu_ipvX_mp_asym_exceptions(), or a missing
exception on veth_A-R2 in pmtu_ipv6_mp_exceptions.

IPv4 has no DAD, so the IPv4-only version of these helpers didn't have
this race. Would adding nodad to the IPv6 lo addresses, as other net
selftests do, avoid it?

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113122237.88990-1-deliran%40verdict.gg

      reply	other threads:[~2026-11-17 13:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 12:22 [PATCH net-next v3 0/3] ipv4/ipv6: Cache pmtu on all paths of a multipath route Vladimir Vdovin
2026-11-13 12:22 ` [PATCH net-next v3 1/3] ipv4: Only lower the pmtu of the other " Vladimir Vdovin
2026-11-17 13:14   ` netdev-bot+sashiko
2026-11-13 12:22 ` [PATCH net-next v3 2/3] ipv6: Cache pmtu for all " Vladimir Vdovin
2026-11-17 13:14   ` netdev-bot+sashiko
2026-11-13 12:22 ` [PATCH net-next v3 3/3] selftests: net: pmtu: Add IPv6 and asymmetric multipath tests Vladimir Vdovin
2026-11-17 13:14   ` netdev-bot+sashiko [this message]

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=179492127464.3136.16715840375114819070@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=davem@davemloft.net \
    --cc=deliran@verdict.gg \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /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