The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: azey <me@azey.net>
Cc: Jakub Kicinski <kuba@kernel.org>,
	David Ahern <dsahern@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	netdev <netdev@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] net/ipv6: allow device-only routes via the multipath API
Date: Fri, 28 Nov 2025 09:38:07 +0100	[thread overview]
Message-ID: <1d44e105-77bd-42e7-81f5-6e235fd12554@6wind.com> (raw)
In-Reply-To: <19ac5a2ee05.c5da832c80393.3479213523717146821@azey.net>

Le 27/11/2025 à 15:06, azey a écrit :
> On 2025-11-27 08:58:59 +0100  Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:
>> I still think that there could be regressions because this commit changes the
>> default behavior.
> 
> I don't think it should - my reasoning is that any routes created via
> ip6_route_multipath_add() would always pass rt6_qualify_for_ecmp()
> before this patch anyway:
> - RAs get added as single routes via ip6_route_add(), so RTF_ADDRCONF
>   wouldn't be set
> - f6i->nh wouldn't be set, since:
>   - ip6_route_info_create_nh() only sets nh if cfg->fc_nh_id is set,
>     otherwise sets fib6_nh
>   - rtm_to_fib6_config() prevents RTA_NH_ID and RTA_MULTIPATH from being
>     set at the same time, and only sets fc_nh_id if RTA_NH_ID is set
> - f6i->fib6_nh->fib_nh_gw_family would always be set, as dev-only routes
>   were stopped by the check in rtm_to_fib6_multipath_config()
> 
> Did I get anything wrong? I should've probably included this in the commit
> message, sorry.
With IPv6, unlike IPv4, the ECMP next hops can be added one by one. Your commit
doesn't allow this:

$ ip -6 route add 2002::/64 via fd00:125::2 dev ntfp2
$ ip -6 route append 2002::/64 dev ntfp3
$ ip -6 route
2002::/64 via fd00:125::2 dev ntfp2 metric 1024 pref medium
2002::/64 dev ntfp3 metric 1024 pref medium
...
$ ip -6 route append 2002::/64 via fd00:175::2 dev ntfp3
$ ip -6 route
2002::/64 metric 1024 pref medium
        nexthop via fd00:125::2 dev ntfp2 weight 1
        nexthop via fd00:175::2 dev ntfp3 weight 1

Note that the previous route via ntfp3 has been removed.

  reply	other threads:[~2025-11-28  8:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24 13:52 [PATCH v2] net/ipv6: allow device-only routes via the multipath API azey
2025-11-25  3:00 ` Jakub Kicinski
2025-11-25  3:15   ` azey
2025-11-25  3:25     ` Jakub Kicinski
2025-11-25  4:00       ` azey
2025-11-25  4:20         ` Jakub Kicinski
2025-11-25  5:30           ` azey
2025-11-26 17:51   ` azey
2025-11-27  7:58     ` Nicolas Dichtel
2025-11-27 14:06       ` azey
2025-11-28  8:38         ` Nicolas Dichtel [this message]
2025-11-28 12:38           ` azey
2025-11-28 13:22             ` azey
2025-11-28 15:28             ` Nicolas Dichtel
2025-11-28 15:45               ` azey
2025-11-28 15:54                 ` azey
2025-11-28 16:28                   ` Nicolas Dichtel
2025-11-28 17:49                     ` azey
2025-12-01 15:38                       ` Nicolas Dichtel

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=1d44e105-77bd-42e7-81f5-6e235fd12554@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@azey.net \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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