Article View: linux.kernel.netdev
Article #21758Re: [BUG] ipvs: new connection on a reused port goes to the previous real server during conn_tab resize
From: "Zhenrong (Daniel) Gu"
Date: Tue, 24 Nov 2026 12:47
Date: Tue, 24 Nov 2026 12:47
50 lines
10359 bytes
10359 bytes
Hello Julian,
On Fri, Nov 20, 2026 at 06:55:07AM +0200, Julian Anastasov wrote:
> Appending a RFC version for testing. It is for the net
> tree because it contains all recent fixes for IPVS.
>
> [PATCH RFC net] ipvs: fix connection reuse with the resizable hash tables
Thanks for the patch. We tested it on the net tree (af6737b90,
7.4.0-rc3) in a KVM guest with 8 vCPUs, using the reproducer from the
report:
mode kernel reused-port misrouted answered failed
connections connections > 100 ms
force net 13289 413 333 35 reset
force net+RFC 15634 0 0 0
grow net 15584 7 5 1 reset
grow net+RFC 15678 0 0 0
noresize net 7841 0 0 0
noresize net+RFC 7834 0 0 0
(force: 60 s, conn_lfactor written every 100 ms; grow: 60 s, all
defaults; noresize: 30 s, conn_lfactor=8.)
With the patch no packet of a reused-port connection went to another
real server than its SYN, and the client saw no delayed or failed
exchanges.
To check for regressions we also ran, on both kernels:
- tools/testing/selftests/net/netfilter/ipvs.sh: PASS on both.
- Rolling updates with drained and deleted real servers, and reused
ports with conn_reuse_mode=0, in a NAT setup with kube-proxy's
sysctls: same results on both kernels.
- Master/backup sync with reused-port traffic and forced resizes: the
backup's entries for the reused ports matched the master's on 20 of
20 ports with the patch, 22 of 30 without.
- Persistent service (-p 60) with reused ports and forced resizes:
every connection reached the same real server, on both kernels.
We did not construct the case of a late packet from the old real
server (e.g. a retransmitted FIN) after its connection was marked
reused.
Tested-by: Zhenrong (Daniel) Gu <zrgu@stu.xjtu.edu.cn>
Thanks,
Zhenrong Gu
Technical Details
Message-ID:
<awWHfO0EgdLoOxLi@fxxowodeMacBook-Pro.local>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-370335-linux-kernel-netdev=dewy.ruReferences:
<avx0_13w3xGNdZP8@fxxowodeMacBook-Pro.local> <d876f5ef-982a-0ddb-5e75-3434453c2ccf@ssi.bg> <av7f6F123V2WDd_u@fxxowodeMacBook-Pro.local> <a5aa2a54-d8ea-bbe1-3a72-d672d6fd92c4@ssi.bg>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-370335-linux-kernel-netdev=dewy.ru
From: zrgu@stu.xjtu.edu.cn ("Zhenrong (Daniel) Gu")
Newsgroups: linux.kernel.netdev
Subject: Re: [BUG] ipvs: new connection on a reused port goes to the previous
real server during conn_tab resize
Date: Tue, 24 Nov 2026 07:47:56 -0500
Organization: Usenet Network
Message-ID: <awWHfO0EgdLoOxLi@fxxowodeMacBook-Pro.local>
References: <avx0_13w3xGNdZP8@fxxowodeMacBook-Pro.local>
<d876f5ef-982a-0ddb-5e75-3434453c2ccf@ssi.bg>
<av7f6F123V2WDd_u@fxxowodeMacBook-Pro.local>
<a5aa2a54-d8ea-bbe1-3a72-d672d6fd92c4@ssi.bg>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
logging-data="4135992"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:/gK/1r943yALQbLjuJ/TEWWAepA= sha256:6zzZguFnVeZeb2JFvleGRxOifxg0/x+/rTtt9w+fSFU=
sha1:mNddBs656SYnPc2YYmSWr8HqC80= sha256:Q/chR0L7hrAZ+11uH8iOUZpsfJSLINT7EyFLT9Bo1is=
Content-Disposition: inline
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 88C00125E15; Tue, 24 Nov 2026 15:48:36 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=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] autolearn=ham autolearn_force=no
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 h7Ns6YYKgF2K;
Tue, 24 Nov 2026 15:48:31 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-370335-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=stu.xjtu.edu.cn
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 7503C125E14; Tue, 24 Nov 2026 15:48: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 DB29A39E09; Tue, 24 Nov 2026 12:48:18 +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=1795524498;
b=m53RYveY5vTZ2eWipRmSv/9/rS542U0zK1szyKuVgaDPEwA3vj3rolVQq6fF/CfYZL5W
jjUo1di9QGBx+9N9k4KchKi8ow+0dEdclz3yLft86F8ZASDX78wXvy7i7gYy/hifghbt7
bzNt+LEkRH0HQMkJeu2HahqewmncgcSWT84vRmXb7OtD/wW/pO/S9VKtjtvCbO7T/bfhS
UvIn9aWg12BqIM6EoamWA3UHhcmiJTzMOidQlo0zVPhqk2n205YC2mf1TlGa3jSKA38uN
MlKTQqeGz/AyQHzqTSMOQERowGJ57FrEjvqA+t0BAt96L9Rs3ozBvYRmwTfMJ3i8hmQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795524498;
h=X-Original-To:Received:DMARC-Filter:Received:Date:From:To:Cc:Subject:
Message-ID:References:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To:X-CM-TRANSID:
X-Coremail-Antispam:X-CM-SenderInfo;
bh=/PWd18l0eDqXOlcuoD9UjIb4JghxABihIehp2sykkVE=;
b=m/OWDp5x5PJGdbKskkXRnR9APY1dvwukVzFFUrkz/dbboPGH1eMb/Xwz1gL12tcUMchb
PlLE2hmF+jVs/u8jEMey9jWNujviRrLqJ50cyJq3lIxtmAwiVud19jpYqny/v/mNkIC1H
bveKCAOKLIhGXuLpArQ475GKy6Z/luTBp8Y05SVPLNldzPDCZ1SQ2Zu9tCqJVhLOAcx+H
u/1LKOUB++alhncoXhg2jJGGfxCAZOEo1jSMV1iDDMDIJ91uHi7Dnz06Pf1Rkm7TalEY2
IhC9Tp8NeRgvgEI0YVN27eF7kAsRB9kEka6087O99RtgIfN6AzaoGC9iD14qNxCACuA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dmarc=pass header.from=stu.xjtu.edu.cn;
spf=pass smtp.mailfrom=stu.xjtu.edu.cn;
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 BD472606A321;
Tue, 24 Nov 2026 12:48:18 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=13.75.44.102
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1795524498;
b=LZnmwe3mTD6pq9xlrHAoiIy5ndkbxPzK89dVr1N5Z94bX2FLqwwdQFOPo0/yM0ZkCQAd
gBjyGSFJQ0ozc9tmgFR4Gg+mEWCuZ85ee/MFO9rNK+0VEYfh3jKHVmFIaPcuKgL/TB9i1
mdu8wH8Kz2YifO4TOYUQEspBpooYPcsa/FsHN+TfYgEFOJiMjaONiZ/XsmUhh3S0xfEXB
eL8TgXsaRml1glrdT5KtmEWYtvZKsG2xZVn0Arz58gs9e8KM56jK8UmzQE08pi9e3qgjV
xDf6VdWnZVozQ+kuut5EnMVePFze4QlTGIQ19iBNUL979CDoiLLIgIKkMhEZSgMf9Qw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795524498;
h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References:
MIME-Version:Content-Type:Content-Disposition:In-Reply-To:
X-CM-TRANSID:X-Coremail-Antispam:X-CM-SenderInfo;
bh=/PWd18l0eDqXOlcuoD9UjIb4JghxABihIehp2sykkVE=;
b=LxjTU9V+TRWK30wirVLSHnee5miwILpmfVt2PPUqDdkQfRNyu2GJrWLa1YlD3D9Hyht0
64W4QQin+6UwpRMzx5jcUGGKN6QGlPeKGV79JSg+DIwZpgOk39rcCgTQ1YzI+DsYeK9Ah
MkGSluDfdRc3YRIAceKdO3lPkMcF8FpbR6tQ2DJVWTfxS+HAewxB8lWvEqC6gJSkE6nY0
t5F/oElUtF9Dk613V2uMycDcS6F/vt3Ltf3cPx5b5RfV4lV98X3ScWhKCTFLURprYRLoi
OVR1gdto+0rbLrjEUxy6onAwEnXDyIPN8wmxgDV2xIBOg+rvlZgEGN8HM2CrMjOuw2Q==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=stu.xjtu.edu.cn;
spf=pass smtp.mailfrom=stu.xjtu.edu.cn;
arc=none smtp.remote-ip=13.75.44.102
X-Received: from azure-sdnproxy.icoremail.net (azure-sdnproxy.icoremail.net [13.75.44.102])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DB22606A32C;
Tue, 24 Nov 2026 12:48:13 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2DB22606A32C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=stu.xjtu.edu.cn
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=stu.xjtu.edu.cn
X-Received: from fxxowodeMacBook-Pro.local (unknown [10.181.177.214])
by app2 (Coremail) with SMTP id NAGowADHd5SChwVrDrZ9AA--.16351S2;
Tue, 24 Nov 2026 20:48:04 +0800 (CST)
X-Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
Xing Feng <xingfeng@stu.xjtu.edu.cn>,
Peng Zhang <p-zhang@xjtu.edu.cn>
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: <a5aa2a54-d8ea-bbe1-3a72-d672d6fd92c4@ssi.bg>
X-CM-TRANSID: NAGowADHd5SChwVrDrZ9AA--.16351S2
X-Coremail-Antispam: 1UD129KBjvJXoW7tFyUArWDtr1xtFWxWr4xXrb_yoW8ArW8pF
WqkryYyw47JFyfWwsYkw4UCr18AFs3Xw15Xrn0ga42g390grnavFWFga4DJayUZrZ3ur1j
vFWYqwsIv3Z8AaUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2
9KBjDU0xBIdaVrnRJUUUvl1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1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