From: David Ahern <dsahern@kernel.org>
To: Ralf Lici <ralf@mandelbit.com>, netdev@vger.kernel.org
Cc: Ido Schimmel <idosch@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>,
Simon Horman <horms@kernel.org>,
Sagarika Sharma <sharmasagarika@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
Xia Yan <yanxia@cmss.chinamobile.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] ipv6: advance the serial after rebalancing in fib6_ifup and fib6_ifdown
Date: Thu, 26 Nov 2026 08:40:55 -0700 [thread overview]
Message-ID: <2c21814f-c378-44c8-a01b-1e1c0a7c037c@kernel.org> (raw)
In-Reply-To: <20261126081353.55240-1-ralf@mandelbit.com>
On 11/26/26 1:13 AM, Ralf Lici wrote:
> fib6_ifup and fib6_ifdown update the node serial before calling
> rt6_multipath_rebalance. A lookup that runs between the two can select a
> nexthop using the old ECMP upper bounds and read the new serial as its
> cookie. The cached dst then passes dst_check although it was selected
> from the old state, until the next relevant change.
>
> Update the serial after rt6_multipath_rebalance, so that it is published
> only after the routing state it describes. fib6_new_sernum allocates the
> serial with a fully ordered atomic_try_cmpxchg, which orders the
> rebalance before the serial update. The invalidation scope is unchanged:
> fib6_ifup still updates the node and its ancestors, fib6_ifdown only the
> node.
>
> Validating dsts against the generation sampled before the lookup, as
> proposed in "ipv6: validate cached dsts against the netns route
> generation", relies on this order as well: a lookup that reads the new
> generation must also observe the routing change it describes.
>
> Reported by Sashiko while reviewing an earlier version of this change.
>
> Fixes: d7dedee184e7 ("ipv6: Calculate hash thresholds for IPv6 nexthops")
> Fixes: 4bc852006b62 ("ipv6: update route serial number on NETDEV_CHANGE")
> Link: https://lore.kernel.org/netdev/cover.1795642432.git.dahern@nvidia.com/
> Signed-off-by: Ralf Lici <ralf@mandelbit.com>
> Reviewed-by: Xia Yan <yanxia@cmss.chinamobile.com>
> ---
> Split out of v5 of "ipv6: tie dst validation to the lookup that
> returned the dst", which is withdrawn in favour of the series in the
> Link above:
> https://lore.kernel.org/netdev/cover.1795537128.git.ralf@mandelbit.com/
>
> net/ipv6/route.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
prev parent reply other threads:[~2026-11-26 15:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 8:13 [PATCH net] ipv6: advance the serial after rebalancing in fib6_ifup and fib6_ifdown Ralf Lici
2026-11-26 8:18 ` netdev-bot+sinfo
2026-11-26 8:24 ` Ralf Lici
2026-11-26 15:40 ` David Ahern [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=2c21814f-c378-44c8-a01b-1e1c0a7c037c@kernel.org \
--to=dsahern@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ralf@mandelbit.com \
--cc=sharmasagarika@google.com \
--cc=willemb@google.com \
--cc=yanxia@cmss.chinamobile.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