The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Ralf Lici <ralf@mandelbit.com>
To: netdev@vger.kernel.org
Cc: David Ahern <dsahern@kernel.org>,
	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>,
	linux-kernel@vger.kernel.org, David Ahern <dahern@nvidia.com>,
	Andrea Mayer <andrea.mayer@uniroma2.it>,
	Antonio Quartulli <antonio@mandelbit.com>
Subject: [PATCH net-next 0/2] ipv6: move superseded pcpu dsts to the uncached list
Date: Fri,  4 Dec 2026 12:29:26 +0100	[thread overview]
Message-ID: <cover.1796382820.git.ralf@mandelbit.com> (raw)

Hi,

When rt6_get_pcpu_route finds that the per-CPU dst of a route using a
nexthop object is stale, it calls dst_dev_put on it, so the packets of
holders that have not checked it again yet are dropped. IPv4 fixed the
same problem by putting such routes on the uncached list in commits
5018c59607a5 ("ipv4: fix race condition between route lookup and
invalidation") and ae89f2724db1 ("ipv4: route: don't blackhole in-use
routes when retiring fnhe routes").

In IPv6, membership in the uncached list also tells the callers of
RT6_LOOKUP_F_DST_NOREF lookups whether they own a reference, so patch 1
bases the ownership on the flag alone, as Ido suggested [1]. Patch 2,
from David's series [2], then puts the stale dst on the uncached list
and drops the slot's reference after a grace period.

Both are needed by the respin of "ipv6: tie dst validation to the
lookup that returned the dst" [3], which replaces the per-CPU dsts of
all routes this way.

[1] https://lore.kernel.org/netdev/20261202161942.GA2800642@shredder/
[2] https://lore.kernel.org/netdev/20261201174021.7211-3-dsahern@kernel.org/
[3] https://lore.kernel.org/netdev/cover.1795537128.git.ralf@mandelbit.com/

Thanks,

Ralf Lici
Mandelbit Srl

---
Changes to patch 2 since David's v3 [2]:
- Drop the slot's reference after a grace period.
- Drop the comment and the Fixes tag. (Ido)

David Ahern (1):
  ipv6: keep a superseded pcpu dst working until its holders notice

Ralf Lici (1):
  ipv6: base dst ownership on RT6_LOOKUP_F_DST_NOREF only

 include/net/ip6_route.h |  7 ++-----
 net/ipv6/route.c        | 36 +++++++++++++++++++++++++-----------
 net/ipv6/seg6_local.c   |  2 +-
 3 files changed, 28 insertions(+), 17 deletions(-)


base-commit: 8a3d0368f58e34e34d402718c7655811902a6bd4
-- 
2.56.1


             reply	other threads:[~2026-12-04 11:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 11:29 Ralf Lici [this message]
2026-12-04 11:29 ` [PATCH net-next 1/2] ipv6: base dst ownership on RT6_LOOKUP_F_DST_NOREF only Ralf Lici
2026-12-04 11:29 ` [PATCH net-next 2/2] ipv6: keep a superseded pcpu dst working until its holders notice Ralf Lici

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=cover.1796382820.git.ralf@mandelbit.com \
    --to=ralf@mandelbit.com \
    --cc=andrea.mayer@uniroma2.it \
    --cc=antonio@mandelbit.com \
    --cc=dahern@nvidia.com \
    --cc=davem@davemloft.net \
    --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=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --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