Article View: linux.kernel.netdev
Article #14146Re: [PATCH net v2] vxlan: reset the remote's dst cache when snooping moves a MAC
From: Nicolas Dichtel
Date: Tue, 10 Nov 2026 16:44
Date: Tue, 10 Nov 2026 16:44
43 lines
13692 bytes
13692 bytes
Le 10/11/2026 ร 16:30, CMGS a รฉcritย :
> vxlan_snoop() handles a known MAC that now arrives from another remote
> by rewriting the remote's IP address in place. It leaves the remote's
> dst_cache alone, so the next packet to that MAC is routed with the dst
> cached for the previous remote. When the two remotes have different
> next hops, the packet leaves the wrong way. For example, if the
> previous remote was on-link and the new one is behind a router, the
> device resolves the new remote's address on the local link, the
> neighbour stays incomplete, and traffic to the MAC is blackholed until
> the cached route is invalidated, such as by "ip route flush cache".
>
> The same branch also leaves remote_ifindex unchanged, although the
> early return compares it and vxlan_xmit_one() uses it as the output
> interface. When a MAC moves between an IPv6 link-local and another
> address, the remote keeps the previous interface, and every later
> packet from that remote enters the migration branch again.
>
> vxlan_fdb_replace(), which makes the same change through netlink,
> already resets the cache, updates remote_ifindex and clears offloaded.
> Do the same when snooping.
>
> Reproduced with network namespaces: a learning VXLAN device has one
> peer VTEP on-link and another behind a router, and an inner MAC moves
> from the first peer to the second. Without this patch, pings to the MAC
> fail after the move until the route cache is flushed: in 10 of 10 runs
> with one CPU, and in 5 of 6 runs with two CPUs, where it depends on
> whether the sending CPU holds the stale entry. With the patch, they
> succeed in all 16 runs. In a second setup over IPv6, the MAC moves from
> a peer with a global address to a peer with a link-local one. Without
> this patch, the move and every later packet from the new peer each send
> an RTM_NEWNEIGH notification, 33 in each run. With the patch, only the
> move sends one.
>
> This was found by our AI-driven automated live migration tests. The fix
> and this changelog were written with the help of an AI coding assistant.
>
> Fixes: 0c1d70af924b ("net: use dst_cache for vxlan device")
> Fixes: 87613de95041 ("vxlan: fix snooping for link-local IPv6 addresses")
> Signed-off-by: CMGS <ilskdw@gmail.com>
You should put your real name.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n463
Technical Details
Message-ID:
<e8066ad7-7a0c-4789-8859-371aa04fd652@6wind.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360435-linux-kernel-netdev=dewy.ruReferences:
<20261110153020.9635-1-ilskdw@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360435-linux-kernel-netdev=dewy.ru
From: nicolas.dichtel@6wind.com (Nicolas Dichtel)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2] vxlan: reset the remote's dst cache when snooping
moves a MAC
Date: Tue, 10 Nov 2026 17:44:39 +0100
Organization: Usenet Network
Message-ID: <e8066ad7-7a0c-4789-8859-371aa04fd652@6wind.com>
References: <20261110153020.9635-1-ilskdw@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="690853"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:3dGzvp3RC8Qo7fOwwIfydTBGCsI= sha256:gxRyD6Tj5hmOGHD+xEkzLXxrG5RZIt8VNDPPoLIBBss=
sha1:1j5uKafD0rFr8eciQCHyOgMjQSQ= sha256:46Lh5sd7Ixb44cmM7hfZmV5uuKvRWNbOiNoW/mE4VBw=
Content-Language: en-US
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 79512113CED; Tue, 10 Nov 2026 23:05:04 +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 (2048-bit key)
header.d=6wind.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 kR3l3xsti2G8;
Tue, 10 Nov 2026 23:04:56 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-360435-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=6wind.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
by mail.dewy.ru (Postfix) with ESMTPS id A35981139FF; Tue, 10 Nov 2026 23:04:47 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sin.lore.kernel.org (Postfix) with ESMTP id BCBE848D55; Tue, 10 Nov 2026 16:44:45 +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=1794329083;
b=Lbmmqkf7dQXih7EWKlaIrgpCIQu8t/S5XaI4Sqr8jI0NkfaLo8eyLsqveZb/LvG5tfa2
KgWyfe9AulendNZFOPVy3AmRtwfckiqPNml1zh+SFlaGfu3BggpiDblkDbjNvuHQrrV57
Q31ojACqX1DMdoD0IcMiXGGi/g2RVTZ2Lgrrps2LMWadHjHVQIHvPy3zHMob7TK3oYcXr
5a8N2IgMuprrf0/ZFVDIaOL3CkrVBdnRHgh7iOtEX/inmdSViF3qq2kKFFLmSSQwLTybv
efULbzqpmtw1S7zTDbwlyuwuIHOlUdTn8cL8eA+ob5xK1jLYOpCt/rmT88LACo/U3Gg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794329083;
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:Received:Message-ID:Date:X-Mailing-List:List-Id:
List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
Precedence:MIME-Version:User-Agent:Reply-To:Subject:To:Cc:References:
From:Content-Language:Organization:In-Reply-To:Content-Type:
Content-Transfer-Encoding;
bh=sxHO/XRSSDGO24lkBwodiv8/f1Z8PZDMLrCuaK/Ihu4=;
b=pqisB7y7LkKxO7313+Rf4gcHzi4BnWHAY3RWfI2/77O6qZg3YGczpwHBWtbcYMjgOSu8
rpw5YCkfiUBP1MjPAVHWvZF6/DG2H6GOF3ejaR0O94UWHWcDoibdeZLvM1+SFkBDAkFLE
AUmZO7L59MdZ5zAKOJYAUvH/Pmu2ssj8/vHEZBOG6vBmLDd4BfnmLird+XJcaJ5Zb2098
tK0txEzVzQiXy2tzSJUmrRGztiLzVb0Yn6PCC/9Wke3El+aA9hxiKPEeKC2KyIbCfyuxh
x0TrnJ+Xgh2IW7uGuyHUJxOmhO/ewvNk81Khf1k28lSmQKdNLbZsa1M+r8t7gUoN72A==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=6wind.com header.i=@6wind.com header.a=rsa-sha256 header.s=google header.b=JLWCgSrI;
dmarc=pass header.from=6wind.com;
spf=pass smtp.mailfrom=6wind.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 88D9F606A330;
Tue, 10 Nov 2026 16:44:43 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=6wind.com header.i=@6wind.com header.a=rsa-sha256 header.s=google header.b=JLWCgSrI
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.43
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794329082;
b=s/pjT9NTdn5VCcSdnxZFv7wq+3Lw6dt6NvRpnoPLaeDMbIbu3x6Y2SgKGtOQUmXTc/1F
C9oyqex3tQ8mSPSsPwymsL2YerwYaKrUGTLfQOhzfICpvxa5xNRrDCDMBloLpbs/i4A+H
eYWq93HbyJOdRPAUNK8VLyNfDXOYOaGwd+NQ5FdqmRUEvE+ikL0Cyz8haBdT9s5wp718p
BFxijsFMCdYI1uWAk9isnArIq+pEEL+z44nDStXh5HvCwgz8j3toLTslpLC4s4WTFIs/x
GTOxEj7Nn85GKiOsDhAdyta7GD/YIPjKfK6qaFfybs8EMfauGtXmtYJOZTfQpRWIL4w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794329082;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
Message-ID:Date:MIME-Version:User-Agent:Reply-To:Subject:To:Cc:
References:From:Content-Language:Organization:In-Reply-To:
Content-Type:Content-Transfer-Encoding;
bh=sxHO/XRSSDGO24lkBwodiv8/f1Z8PZDMLrCuaK/Ihu4=;
b=rR6B2bBnlUIKoR7fmtMGBCqoCiKO2i/5sVvLBZuJhRf3Z2QF8T7zdXuwc6O4opEMUJht
e4QJEfF1tf6Fsk5MzQdylNZpVXZ6Lb9QLpDiqKl1fdCLLDVAtidLDkYr1GktO6pJ2G985
PeU2GJDOSFe72pWQh33fPzLKcsqX5WjU/xuz7yZKFmAXwJzrZcglM8hR3rVnb7y5QNC3x
EXIk62kKQLqdgM1k31QVDb+XpbfI16lMBUkucwpj9m2tflDDRyb2TE2etkpmy3OnFlvsI
8UJVT7wcGmi3a/Bw8AYPtoXrUFljHkeNAJjuv1ktxDSVJRo1cXuMPvmLW6xhni4+xbw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=6wind.com;
spf=pass smtp.mailfrom=6wind.com;
dkim=pass header.d=6wind.com header.i=@6wind.com header.a=rsa-sha256 header.s=google header.b=JLWCgSrI;
arc=none smtp.remote-ip=209.85.128.43
X-Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43])
(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 215B9606A320
for <netdev@vger.kernel.org>; Tue, 10 Nov 2026 16:44:41 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 215B9606A320
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=6wind.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=6wind.com
X-Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4a2119feee8so1719495e9.3
for <netdev@vger.kernel.org>; Tue, 10 Nov 2026 08:44:41 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=6wind.com; s=google; t=1794329080; x=1794933880; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:in-reply-to:organization
:content-language:from:references:cc:to:subject:reply-to:user-agent
:mime-version:date:message-id:from:to:cc:subject:date:message-id
:reply-to:content-type;
bh=sxHO/XRSSDGO24lkBwodiv8/f1Z8PZDMLrCuaK/Ihu4=;
b=JLWCgSrIdZKp+RNAnWKB/Fqv8WAzdkJlqXy/zYWA8AD0tVysl95INoukVUQ39MxcWf
jnsyDGHJJ50Zf80Gxzxys9zUPyNqyjHfGfSpA7b3xXhiPrh/PojI2ieNNRpKxcrhhIXQ
YjpMSSB4eB+vd/VWRUoUgxYXN7JNBXUGWjcQGF3gComsK/PqMdwYHrzCYE2bJ6SCxr1C
LieM95dzYXrWSDo74PAG+f3Zi3YW7Mvp9xXzc+RY+Ej5GVDAwDuHJQ83hjCZR1Bel5Sz
H/qaLCgRCEB1lzaGVg7l4NH4aijphDqgXtIfZ6gJryui2a2lAnD6Br/LiR0e6XuECwA4
PzNQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1794329080; x=1794933880;
h=content-transfer-encoding:content-type:in-reply-to:organization
:content-language:from:references:cc:to:subject:reply-to:user-agent
:mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to:content-type;
bh=sxHO/XRSSDGO24lkBwodiv8/f1Z8PZDMLrCuaK/Ihu4=;
b=rTwP2fSVGB11WNWcQiCaVxUe1XDB5pqzTedMk+k8R9iHOK4gPV5Est43dkVsws/qjP
uZobPzDgLbO8gvbMtiO0qW+nHu7qJ+7sZPckdjIs7dPvFR1JAN71jlsoDOLh9sUubTfe
SAlayJ05mlI64vcS5jsuMlaZNCFRqfjs/9y3MQ/z5shqKosgVo5Ky802c8YUVaAdFefh
3Ezqzw1KAqDcBB/1urf9vU9FGX48J7ejg85ErcQirKJNY2D97aYH/Xqqp2w0L+NQE6+d
z2OaeGvfSKJdyq9g5hews9e6Ajbk/dhszwAMLCLwWrgczG/o9nYWPut2XcEai7RtxNvU
jsAA==
X-Forwarded-Encrypted: i=1; AL+hErGqn6ofOIFysnEEcYuh80RVVNRzylBRDl1f7YZew7Cuo/B73xSBCq8KI2lDyLyw0GkXSX6xLyM=@vger.kernel.org
X-Gm-Message-State: APuU4Z/kyQaewvsS91hBZj0QNmfNW3v1egiItwr8KtxEOVNw1+1ZgCF7
DJmWiA0Kab21jRbeVntgu/cYbH/OuJHDdHuhNNZpGrQIZGDCNfZ72uLXEf4nvsmQJs8=
X-Gm-Gg: AYBFou246NrNQ3YOsKZJQ8nj6VT4WCn/ifDsqhjS61n/CIsJ3FMB8G/tqpfeTIfDMlm
fszhSG9ELtoN7C9pcPIfxWcKvfOWA74nhVjLMD+plaapjIhAFXSXhEFsVniT7YtEK9M//BbidiP
fzcEUdKE70Rd/BsdBVMwQjz82w0lKt30GtKgoA5W5NPpTrtgAkrIKEOHGLqaybiLYC12B5yijK2
cfaNUgz+hlFq7Du8P1bHmbjWXhftpLUvB5tjEsHyLAoqAqIOepaJ02J+RAIh1ir/AptZ1FZrDXq
yinh+bcGRLsu/JXt0BUnC89hhLJIvXfS2AGwdRfN+FE6t2EeqLkVBmVj1v3JB679b+2UT8egWr6
mvmjbP7kyH4riv3Kro+f+aELWbIQJrUzr4G4OT4PW1NXbbIEZ9nociigqjp4EOuvRDpasRJvpx2
g0rky+lsooixQvGoS7oxvIH8boq7OXBg+FJCfxRBzAEexuyixzKDUyL2hZcHHCqEQfCwV3TggkR
rmjYV0kMy0YmQKxvdv0jz2aFn1obsCtBK4KEKPgCZVGqLluSJw4WgZ/Vp+MGBf8wIUGmTUsyqCm
xcCYDgI76CN0wkT1JGZd4q0lKbS3/NJjDYoqjblzeVPt29jKBAlTon2yS63BEfRGxgyQEKFuHaq
eRzap9Q==
X-Received: by 2002:a05:600c:350f:b0:4b2:3c81:103 with SMTP id 5b1f17b1804b1-4ba0233a711mr54346865e9.2.1794329080434;
Tue, 10 Nov 2026 08:44:40 -0800 (PST)
X-Received: from ?IPV6:2a01:e0a:ab7:2110:6a1d:efff:fe52:1959? ([2a01:e0a:ab7:2110:6a1d:efff:fe52:1959])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4ba02242bd9sm68388325e9.15.2026.11.10.08.44.39
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Tue, 10 Nov 2026 08:44:40 -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-User-Agent: Mozilla Thunderbird
X-Reply-To: nicolas.dichtel@6wind.com
X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, kuniyu@google.com,
mschiffer@universe-factory.net
X-Organization: 6WIND
X-In-Reply-To: <20261110153020.9635-1-ilskdw@gmail.com>