Article View: linux.kernel.netdev
Article #24242Re: [PATCH net-next 1/1] net: neighbour: skip the stale dst lookup for a redirected skb
From: Jamal Hadi Salim
Date: Sun, 29 Nov 2026 22:39
Date: Sun, 29 Nov 2026 22:39
74 lines
14733 bytes
14733 bytes
On Sun, Nov 29, 2026 at 12:08 PM <willemb@google.com> wrote: > > Alexei Starovoitov wrote: > > On Fri, Nov 20, 2026 at 07:42 AM Jamal Hadi Salim <jhs@mojatatu.com> > > wrote: > > > Skip the lookup when skb->dev is already neigh->dev; the parking > > neighbour > > > is the top-level one in that case and can reinject the packet itself. A > > > dst that is a route via another device, which is the sch_teql shape, > > still > > > takes the lookup. > > > It doesn't. The check never reads dst->dev: > > > if (dst && skb->dev != neigh->dev && > > > Please resend with this revised. > This is a bit confusing—what is wrong with the code as is? Unles you are pointing to what Alexei said - I believe that has to do with the commit log (and not the code). If I were to send the change to the commit it would look as follows: ----- -One packet to 10.10.0.2 egresses va and the rule steers it through vb to -10.1.0.2, whose neighbour is incomplete, so it is parked there with va's -route. +A packet sent to 10.10.0.2 egresses va; the rule rewrites the nexthop to +10.1.0.2 on vb, whose neighbour is incomplete, so it is parked there with +va's route. ---- Alexei already acked it despite that. > Also, typo in the reproducer: `10.10.0.2` should be `10.1.0.2`. 10.10.0.2 is correct. To clarify, that is the sender's destination which makes the frame egress va and hit the egress rule. The rule then rewrites the nexthop to 10.1.0.2 on vb, whose neighbour is incomplete, so the skb is parked there while its dst still names va's route - that stale dst is the bug. > Please do include a Fixes tag even if sending to net-next. > Ok, i was intentionaly leaving that out in previous net-next (most merged) and argued many times with sashiko that it is not needed, but i just checked the docs since you are bringing it - will add it going forward. > No need for a series/cover-letter for a single line patch, and please > do make explicit that this patch can be merged immediately, is not > subject to the other patches that the cover letter refers to. I sent 00 to helped provide context which seemed useful in this case. The previous revision was 4 patches and under a different subject. This one carried one of those 4. Note: I understand everyone is overloaded (so am i, I have a large number of patches i am holding back so far); my frustration is that this has been sitting in the queue for 9 days - if I resend, will I have to wait another nine days just for a commit log change? cheers, jamal > -- > > pw-bot: cr > >
Technical Details
Message-ID:
<CAM0EoMkHcEp3g2zmwU8reyt2MmiuZFB8O9wXkeWFsS_Em8v6qQ@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!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-373682-linux-kernel-netdev=dewy.ruReferences:
<CORE-J9UK.v1.r0.20261120103344@mojatatu.com> <CORE-J9UK.v1.r0.20261120103344-1@mojatatu.com> <DN09UU4NHKLV.29WR92GGDPBP5@gmail.com> <willemb.22774a928906@google.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!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-373682-linux-kernel-netdev=dewy.ru
From: jhs@mojatatu.com (Jamal Hadi Salim)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 1/1] net: neighbour: skip the stale dst lookup
for a redirected skb
Date: Sun, 29 Nov 2026 17:39:38 -0500
Organization: Usenet Network
Message-ID: <CAM0EoMkHcEp3g2zmwU8reyt2MmiuZFB8O9wXkeWFsS_Em8v6qQ@mail.gmail.com>
References: <CORE-J9UK.v1.r0.20261120103344@mojatatu.com> <CORE-J9UK.v1.r0.20261120103344-1@mojatatu.com>
<DN09UU4NHKLV.29WR92GGDPBP5@gmail.com> <willemb.22774a928906@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="1277054"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:f2fys+n96sQQr1I1yVOhnrHyvzA= sha256:WSFTMpcW44olReeFBu3MEpP0SJoLB5x/62oItIIHi9E=
sha1:q7bYFmo9myx0Py9syqMpKNQ7ifw= sha256:mGGzh7/2ZrzX1CuPnc9N2ri39bVV9guoo+x/Yhjwjao=
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 D2378125F08; Mon, 30 Nov 2026 01:40:08 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 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.249,
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 (1024-bit key)
header.d=mojatatu.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 nuHUWUZztJ-z;
Mon, 30 Nov 2026 01:40:05 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373682-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mojatatu.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 8CD60125FAD; Mon, 30 Nov 2026 01:39:54 +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 3589C26534; Sun, 29 Nov 2026 22:39:53 +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=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795991993;
b=4K944F29OjtomgN7LmRAFq6E5I9YVDaUhzrHwCwOowlv4ByKzb7z0fso9Z7qO2PuHukd
RTFRmnJh8EHoCjKWJt7heRSoWU1kA7t+/uWT38fspELsnUajBQ5AJKpnbL1Q5P24mqhbK
0FFg9OZR1Cn5KLf11zglUIgPqVVNv534UNZ8TOdACaDJQUIZT2A5IBF9I3zhoTvlxMeGG
epjGuupmFU5We9dMiNkgJs2lglaCVNBv1KyO0wcfpgqS0aBWGXFxxLR9qrIRtRRQ8rt0Q
ljDu85baRk2z+i06V8x8ZpSHnqHP+pFNR22m/XZZ/L44myG4rkABGQHuz2f/EEjjnPQ==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795991993;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
References:In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:
Cc:Content-Type:Content-Transfer-Encoding;
bh=C3tHSZv1/VvT9nZC9diqth51B10Jv4UyAFtK098Qlpc=;
b=qhs/SeSEuYtFlD1OFeK0tDEq2R3bKeWNqbyTUQmORQl8g6wnOst6IMetW/Npd6W6ZEgI
i2SUhdH3QWE9lCIpepm6jZQ+125BfoW1iqZnOq037SXSZ2wymDmydQbXBDbtx7Y5YOOCR
IkxLR/X4zKi035aoRRFwUQKKXeIuaOl6JxGxRP8dEC+eu8N9VXKU+22h5ZCy0fRGmiEuR
M2LVXRjaTQVWbbhfcI54F3VDdgN18XcLNKwNUNP+9h4SQ/IEpTaqs4kAMBqyUUFpOcG/o
AZzdgcefjYgGk+C5kzrR6KId4lEI0LPMi7nuIom8E3Z2eQvqZ2sA4UTlw+vKaKd6mZg==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org;
dkim=pass header.d=mojatatu.com header.i=@mojatatu.com header.a=rsa-sha256 header.s=google header.b=ojEwY703;
dmarc=none header.from=mojatatu.com;
spf=none smtp.mailfrom=mojatatu.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 0D0A5606A32E;
Sun, 29 Nov 2026 22:39:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=mojatatu.com header.i=@mojatatu.com header.a=rsa-sha256 header.s=google header.b=ojEwY703
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.210.173
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795991992;
b=sp0rGn28UrtL54CmrTeGjvzyOod3n7aNVEHQk3T3LJ8bEn9kLFEOWsD755iZpP4+1Kx2
XUuZ2hBPqvPfueOsCNQqO0oGMN62XT96CzMscHhYyO/6y9miMCmHL9Vw8EYIDVoP9lw10
MPBJjdeGFtyAJJPfMFJhUOdiLWA8FtR/lQlEAnlTNtZdTMpgAJMzdjtoaePmd8NaKGm+v
YH3xy/TeP5G3cuUkrIwoMZb7HZHrVwtCaLw+8YLyrHCFJcBGOlAGfAC/PCuAgfK/Yl2nL
R9Ar8GXrKsG4wMrRJ+rBbjVzz+cWoVjdZ5gWj5hQRvupUvOhvULmF0kUFj+2Bskr2Kg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795991992;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:
MIME-Version:References:In-Reply-To:From:Date:X-Gm-Features:
Message-ID:Subject:To:Cc:Content-Type:Content-Transfer-Encoding;
bh=C3tHSZv1/VvT9nZC9diqth51B10Jv4UyAFtK098Qlpc=;
b=q3pDtjm4GJgQrxG0f/XO3YCTb/auol33DhiUn9bvShMMcFMhGwB7P017ydpGxjaWa1r2
5IPw2F+ya7VIYstwGSOHbcTfPnv4nPlcUZ+kMlDaR3wFtWjqkvXlt2k/cor+xXwX4DBgi
3qC1P1XCyvG2ZhwMhUmu18WBsMTQLzTqeD3ZkBXWXFQrvvs3bp0fIx4wIiqUAnfkaOdyd
H6EEX5uNN39MoG86PxqliZkoYQ114Pg826zKL/qmOUhjl8xrJHinrG//Mpkp/yQbTiX3d
TPcWOfLOmap9AkUlfs7hgzUKKtCEbB+B88Xo5Ghw4EUueG9VzJT8s8JP8HB5v8lmZsA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dmarc=none header.from=mojatatu.com;
spf=none smtp.mailfrom=mojatatu.com;
dkim=pass header.d=mojatatu.com header.i=@mojatatu.com header.a=rsa-sha256 header.s=google header.b=ojEwY703;
arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.210.173
X-Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4184606A31C
for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 22:39:51 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B4184606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mojatatu.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=mojatatu.com
X-Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-8c6c06b3321so7795993b3a.3
for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 14:39:51 -0800 (PST)
X-ARC-Seal: i=1; a=rsa-sha256; t=1795991991; cv=none;
d=google.com; s=arc-20260327;
b=RmYD3vFDS+A2cXYsy2L3uHFoD2Nf7pMEW+NHK+BkdW91VYYfMn1zrr6MCkNV/LcJU6
IuhlJ93SBAv7KCIk0qPcgQbZsr4grfkbpnO/x0KP9Sp4HvfDfuexKAMV3CdA5Co+CfO9
+77AZypbbz45xVf23pVkweXiHZ/I5XLs8rY1ujH+oed1Fy5ME00cFu0aVvvzDa52X4Sq
BUtW4UGHanCQw0QGBmRkz1yR/GGaf67f6VS6PN5kKqcEUsPnPiy30vaxqIs5I27c5rzU
n+UeAEMdcMGv5rle+YMRxZGhvGiS0ezOzP0GZ0H3C5O21GUTWfN3j3bc3HybQNRogGAp
bBIQ==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:dkim-signature;
bh=C3tHSZv1/VvT9nZC9diqth51B10Jv4UyAFtK098Qlpc=;
fh=jKkCQ10DR3jnlo0u88ckfo9fWjW2FYkGX+iR0lYz26E=;
b=LSPaI7XV04UETHZ8v6OEGqxtnHCWzma2y7/ckfKIUBBnBqMt1370j92o8H5j959yBm
JlIRMJ+kjqosXMHN3DD4Rvwq8pRZHE+zg0zXJjAbYNvR7hKKFSgeYJFzE9cZlSGWYSjR
n6LA5xRwmtxOFEnpr6KewjV+iFYurjSH7ym7onl4Ekhncb7PfQRirjuIFkfHQZRUId5c
cEF83RLQ3KD6+ESyroaiDPedNoTg0rXbpGpPC1Yx8valHLBdYLftfPSycZ5ye0RqZRvD
os9SFV4EIEyn/1X51cUrodCGCKDEp1w8LOgr8fWCv1OsislPO+gAyqZWWRN/LeJf+I87
/arg==;
darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mojatatu.com; s=google; t=1795991991; x=1796596791; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=C3tHSZv1/VvT9nZC9diqth51B10Jv4UyAFtK098Qlpc=;
b=ojEwY703Ygt4P8Z8KRGolOxz4w+N4irTzgN7fGbMPUWIXIyPvTLm3xxz/ZRDJ74sDy
NNRM9MkUbea74LeuRdwdL1Yq7cVP64q3aQ5XLm+gS8U4k3TRW6H5mdR/9AOfrdcSvFTB
WQBPu5zHNHhKeQoS6rpq1W8zJthh7xn30+o/c=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1795991991; x=1796596791;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=C3tHSZv1/VvT9nZC9diqth51B10Jv4UyAFtK098Qlpc=;
b=iB1ooF5CPBTlkp3q3u/ed0q1wTKw5QYKeZB8yO+lbBF13iNeWffulapDXBCuCiyuWR
30BSuPppYHRVpV/mAf1cy7NyufQpfki51nhQWW8VdSeFGYwJGANQB8MC8VeVf7o9Tnie
NbYWv96SmktBoKvRe51X4Tk5+byxAjRAbR0ZwO52yAunABy4lHk9m0W6bQWZMOQgt0wr
p5DxuX98EIEFxdZIQV95hP8tKKKWb8yV11pOgf7/fiAPE9qTPxZsBmiLH+kYd4P6+s2p
/m/iP1IFcf+j9iwtuMXSNe8+Wr/UpbvshCWnfr0MAW4rTqOHJJfkVEjBglRyVz7KpiMr
nicQ==
X-Forwarded-Encrypted: i=1; AL+hErEqZ/I80M0ydXRNB177U5mMG/aFcc35bQ26qyJf1+uWiiaXImFu8iL2suFYiJZJbm0ASCi97F0=@vger.kernel.org
X-Gm-Message-State: APuU4Z8VPBFSJj+HbR035ve34ST0DC2ErJ87hkWGzFi3+4AE1YeVlLbx
P2mXIOqjqyBnW91kIY9GdgaPYfB51ksvIewavj6+C/qZCex7S0CEWecMyICVvOxubU7j8GcgrcE
sc7x+5BqXyvBZzrL0YdoYHvxdsYQRALPsJOgx5qUG
X-Gm-Gg: AZFdTZfIzbckejQRlnT+C7zbKh1ZrunILVR3Km0FW7SOnq0p8BhgPusYnVS6HhiE0wt
tR93KG5ZRUR8EGnzR7/4dG17VOmUlReUkywxXHP/bXhEH+4p+6wM3cKcUP8LjD31VC4lRmAvlAE
yo/o3hFAixWemokJkiPoGA8uc3ljQf2DZagiUP0MSbKCyVgHYp19pxkWZuS/djgfAPNSWU7innN
t8wtQVyF+qj0kIBb6olXrIFkuuP/BSuQt6xDzhFlQPc/faVXy8lhzeubqfzK7gCxkIRNNrfrbKf
/BIhKMRV9v2s4s61ZHYscuifKvxEdEsIJBQLNbSS2wdoqpWEfHqKzklc1I9E/p1d7WjwzvYWaT4
LrqR5PmDEShnj9Ijde3DkdIxXjWZADsBjZkhVSwfvGV2bQUhRYPY16Qj2T7xaGKMECTXhk1tqmu
i2uPfSyEDqHmIRJF177ldLJRsUdvWD2Po7SVo0N3t5pkoHQMo1NC1FqtbGvroVYRZ5t3VLgL0lr
JJZ
X-Received: by 2002:a05:6a00:1789:b0:8b1:3137:d78b with SMTP id
d2e1a72fcca58-8c87d31cfb0mr31406618b3a.48.1795991991023; Sun, 29 Nov 2026
14:39:51 -0800 (PST)
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-In-Reply-To: <willemb.22774a928906@google.com>
X-Gm-Features: Aa3M54qmDStLbVQSaRhqxg-gLIHC3Ea95l938slgodqcTYhehdR63pu4dpDmDCI
X-Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>, netdev@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
bpf@vger.kernel.org, Jiri Pirko <jiri@resnulli.us>,
Victor Nogueira <victor@mojatatu.com>