Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] ipv6: move superseded pcpu dsts to the uncached list
@ 2026-12-04 11:29 Ralf Lici
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Ralf Lici @ 2026-12-04 11:29 UTC (permalink / raw)
  To: netdev
  Cc: David Ahern, Ido Schimmel, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Simon Horman,
	linux-kernel, David Ahern, Andrea Mayer, Antonio Quartulli

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-04 11:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 11:29 [PATCH net-next 0/2] ipv6: move superseded pcpu dsts to the uncached list Ralf Lici
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox