All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhenrong (Daniel) Gu" <zrgu@stu.xjtu.edu.cn>
To: Julian Anastasov <ja@ssi.bg>
Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
	Xing Feng <xingfeng@stu.xjtu.edu.cn>,
	Peng Zhang <p-zhang@xjtu.edu.cn>
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	[thread overview]
Message-ID: <awWHfO0EgdLoOxLi@fxxowodeMacBook-Pro.local> (raw)
In-Reply-To: <a5aa2a54-d8ea-bbe1-3a72-d672d6fd92c4@ssi.bg>

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


  reply	other threads:[~2026-11-24 12:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 15:38 [BUG] ipvs: new connection on a reused port goes to the previous real server during conn_tab resize Zhenrong (Daniel) Gu
2026-11-18 15:26 ` Julian Anastasov
2026-11-19 11:39   ` Zhenrong (Daniel) Gu
2026-11-20  4:55     ` Julian Anastasov
2026-11-24 12:47       ` Zhenrong (Daniel) Gu [this message]
2026-11-25  5:04         ` Julian Anastasov
2026-11-25  6:22           ` Zhenrong (Daniel) Gu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=awWHfO0EgdLoOxLi@fxxowodeMacBook-Pro.local \
    --to=zrgu@stu.xjtu.edu.cn \
    --cc=ja@ssi.bg \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=p-zhang@xjtu.edu.cn \
    --cc=xingfeng@stu.xjtu.edu.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.