Article View: linux.kernel.netdev
Article #26909[PATCH net-next 0/2] ipv6: move superseded pcpu dsts to the uncached list
From: Ralf Lici
Date: Fri, 04 Dec 2026 11:29
Date: Fri, 04 Dec 2026 11:29
50 lines
10738 bytes
10738 bytes
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
Technical Details
Message-ID:
<cover.1796382820.git.ralf@mandelbit.com>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377307-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377307-linux-kernel-netdev=dewy.ru From: ralf@mandelbit.com (Ralf Lici) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next 0/2] ipv6: move superseded pcpu dsts to the uncached list Date: Fri, 4 Dec 2026 12:29:26 +0100 Organization: Usenet Network Message-ID: <cover.1796382820.git.ralf@mandelbit.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2751296"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:1DIfhl5RgkvWHii7rRdp+bRLrDs= sha256:oRt0bfx86UkhmdFOjm2IkQYeNktECAYC1dChw2xug9o= sha1:PsudT8RShHBVg8y0IOyDrylcIEE= sha256:ahC85jp90IyhSI9GNVwl2OrDVeISMlrk2oDlDAlppdI= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 02D08117BD3; Fri, 4 Dec 2026 14:30:37 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.298 X-Spam-Status: No, score=-3.298 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=mandelbit.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8xU___93ee-I; Fri, 4 Dec 2026 14:30:33 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-377307-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mandelbit.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 936F3117BCC; Fri, 4 Dec 2026 14:30:25 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 21A6637A5C; Fri, 4 Dec 2026 11:30:24 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796383823; b=4cYQCTtBH8XoHhvCTfg92SMPWb9M5XZzkiYBn0OLaf5/fXniUmymSR+nL9Yf2ADYupdb rBxCO2qTjzsiVy/PQaQg5dmJdp2vVVqriJq9RIkFRB8QLexBX1GpjGORmExFqxcnigyPJ ZW7rSS1CRTJiHOWe5qZzFf4+XYUS855tt8ANCRlM6eC1pVIn80Jy3oHFpUcdzgQsxkyqF 6gN72ju7ewKINY+RO04xj9SovcqMDJyQy3HA0YVY5DE3tP8DTuVJNFQrGzYkrm4r99Dpu yGUyWNDW6EQcFFv/AMM4FaDiRT5fDIm/++rLuWs5tFgpapfFUO0NABZaD0R5fvy586g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383823; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To: Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=DCCnSEjpYbAikKuwz+jNvXox2kZqEC9RYXvMW6EZkL0=; b=BRfU9lLKRxHHCHf69R4iWKX1npOIiW6jr1SSlFzawNlDmnsiHmElKLq2lQv96B3r81yK TaEJKfc9Qi1rxNHBcOFa9VCtCCCm04eX9XWeAntJ671MwYykp8m8ucCH3YK4ciPJ+KoRd N7KI0uMqxp4HCMCJfHqznVkpYoL5g6Hc1vN3OjIuJVFfFEqSxINIAgwlEjK5D8Q40JnqA KEcf3rbcS34WFXmeAnr2BNIlyoVZpKWG3pGXxE9hWNcUGls36CtRh9CTR+HX3DlCCCdQ1 hncW4LIvtOFfBcyo37mZFTG4592H2PkwfxeMqfzMy64Cxe1SkdgtyZh+YBuQT4drkTw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=hIJh9D3O; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E9E11606A334; Fri, 4 Dec 2026 11:30:22 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=hIJh9D3O X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.47 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796383790; b=jSbKYUYBUtP/U9Vz+lHs0tjPn9+ItHa9+LY1Rix1SyuVqgT7DMkWJRZFY6lAYrxNs+gk oFA4ChSKi67YsOGsWkmUbTIJ1hd9AA5Gr3Yj41aypO5UwtaAlqYNy7XruQ20OpA5FmtDr d0kqzHaZCASnW9Nw5x9/0uo+0rt+831wTwJmXav6Erpc445slYgck/Vmt0jVBR/oqNbow bPhvy22a4Zsi27lhgsLY7at2UJaCtrkoz6hjI4mlApOPAG9lq1DlEMeyN66DgUuuO57re HSFiltJiBwUpO2n3ycDpSNo81slwvX2iX6tOqMCyqVA30JvrAMMA2esbKyK/P9QOQBw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383790; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-Rspamd-Queue-Id; bh=DCCnSEjpYbAikKuwz+jNvXox2kZqEC9RYXvMW6EZkL0=; b=eu3AYBQ/ZY2/hs+F+j568d07s1JQt+gVErGwXwAyNZCwEflZ+F5rv4D2Nkl5OsULgSff BunAw8z3Ern0wL9bQYuZh+rvb8elZdDfd6mdfPhYWg+/SMWhxays9l6b4B/Wf3p4mkS2B O4zKVEf2F/V0f6t1fKAgADY3SBOEiKqkO/rsUv1c+q7L2AyhPA/vgiVFsGvNB2tyoq7+q OEZpB1HppvaLbrhcfKslYmsj6horVnN36OyN2Jy9CpQQoUgCUZ5KzPYj1yhf8qx7ee07E rK0XTXcqSI9xVjSc50rqhP3GUMqvaBiQcK5qmLANlG3EkKB31V68zjUgW8i6vCvyyFQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=hIJh9D3O; arc=none smtp.remote-ip=195.10.208.47 X-Received: from mout-b-107.mailbox.org (mout-b-107.mailbox.org [195.10.208.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81223606A322; Fri, 4 Dec 2026 11:29:49 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 81223606A322 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com X-Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-107.mailbox.org (Postfix) with ESMTPS id 4jgq5v6Q87z3yNC; Fri, 04 Dec 2026 12:29:39 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1796383779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=DCCnSEjpYbAikKuwz+jNvXox2kZqEC9RYXvMW6EZkL0=; b=hIJh9D3OBZpOF3raeXfVIe9pFQNBdz0EUS5KUCL9Ek63mTrxqxtoh8v2ipESo6ZO5AtxPp lwleLMqLg5rMy0ijjcFASfTQoQJhxxKYANIDP6I31lkZj4rgBDOkjoZinKgxWbi1a0eW2y iywUlIM/n1IXjlOdhlP8sT6qXFgT7wWUgF3CDw5peKP2aI1Vg8S4KkgyD9ZDivRCG/pMh7 n+XxMxQsLZtEMOpOA652Gqrd+nQnxwYiCrk4eIULRDR8GLnBSkh8YOOr6OhAPbC2SbsKkF SARVMmkFdo3CxQJ2R1rgXhmRHV/L1DtCKnApgwtnGsV/9gE5Pz1kuvu/w6k5EA== X-Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of ralf@mandelbit.com designates 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=ralf@mandelbit.com X-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> X-Mailer: git-send-email 2.56.1 X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-Rspamd-Queue-Id: 4jgq5v6Q87z3yNC