ipv6: move superseded pcpu dsts to the uncached list
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ipv6: base dst ownership on RT6_LOOKUP_F_DST_NOREF onlyinclude/ net/ net/ | +26 | 0 replies | |
| 2/2 | ipv6: keep a superseded pcpu dst working until its holders noticenet/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH net-next 0/2] ipv6: move superseded pcpu dsts to the uncached list
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/[email protected]/
[3] https://lore.kernel.org/netdev/[email protected]/
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
Signature · 1 line
2.56.1