๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7186

Re: [PATCH net 2/2] tcp: Add KUnit tests for bind fastreuse caches

#7186
From: Eric Dumazet
Date: Sun, 25 Oct 2026 11:08
43 lines
10299 bytes
Le dim. 25 oct. 2026 ร  10:01, Zhewei Yuan <yzwlhm@gmail.com> a รฉcrit :
>
> Add eight KUnit cases using real TCP binds in isolated network namespaces.
> Six check the tb/tb2 reuse caches for SO_REUSEADDR, SO_REUSEPORT and both,
> with explicit or automatic ports. Two guard against reinitialization
> when an owner or another address bucket already exists.
>
> The six first-bind cases fail before the fix and all eight pass after
> it, using matching tests/configs; both conflict guards pass before and
> after.
>
> Run with:
>
>   ./tools/testing/kunit/kunit.py run --arch=x86_64 \
>     --kunitconfig=net/ipv4/.kunitconfig --jobs=8 --timeout=120 \
>     inet_csk_fastreuse
>
> Codex assisted with test development and review, following requests for
> real binds, cache inspection, automatic ports and conflict preservation.
>
> Signed-off-by: Zhewei Yuan <yzwlhm@gmail.com>

I do not think we want this LLM stuff.

300 lines, a new Kconfig option and a .kunitconfig, all to peek at
tb->fastreuse and tb2->fastreuseport. These are implementation
details, and this test will break the next time someone touches bhash.

Bind conflict behavior is already covered by selftests
(reuseaddr_conflict, bind_wildcard, reuseport_addr_any...),
and they keep passing with or without patch 1, since the bug only
causes extra conflict scans.

If you really want coverage of the performance issue, a selftest in
tools/testing/selftests/net would be better, targeting net-next.

Also, please keep the changelogs and cover letters short.

pw-bot: cr
Technical Details
Message-ID: <CAL4WiiqSB3+u57zR0VmZ8CH8Tk2zgV9te3+GTVq+BmEJGh1O2A@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351535-linux-kernel-netdev=dewy.ru
References: <20261025090048.27870-1-yzwlhm@gmail.com> <20261025090048.27870-3-yzwlhm@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351535-linux-kernel-netdev=dewy.ru
From: edumazet@kernel.org (Eric Dumazet)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 2/2] tcp: Add KUnit tests for bind fastreuse caches
Date: Sun, 25 Oct 2026 12:08:17 +0100
Organization: Usenet Network
Message-ID: <CAL4WiiqSB3+u57zR0VmZ8CH8Tk2zgV9te3+GTVq+BmEJGh1O2A@mail.gmail.com>
References: <20261025090048.27870-1-yzwlhm@gmail.com> <20261025090048.27870-3-yzwlhm@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="995394"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:8RMBZrJUsizWK8lK1Ra0EwMz45g= sha256:+1oHMoOfkI1/3oAUsyeY4UDWQm6UgY6G1vay2gdLl14=
	sha1:rhoTvc9AhyhTm0i3OZ7cMTudYes= sha256:ZhlQrIFPXBNHSvD7MPvEo0UvNDJ/hCNIQOJ+4fO5I7k=
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 2CD86125B2F; Sun, 25 Oct 2026 14:08:56 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.739
X-Spam-Status: No, score=-3.739 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	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-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
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 x8HZzujGu3FL;
	Sun, 25 Oct 2026 14:08:53 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-351535-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id ED6F7125B2D; Sun, 25 Oct 2026 14:08:44 +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 BEFC230F3F; Sun, 25 Oct 2026 11:08:31 +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=1792926511;
	b=NTpOzdPsgTm5FJXMLIjGPPm1Z2Uf74kTswYtUqWgW7M1BRT3EAy8X5YMpPLziCHS0HJy
	 lAIC13sFqRXiqRZftkCXowc94U4p3e/kLPJe+WgRAAPzew+6YSfYoB3nd6EaYdv9V3OGP
	 MsMsLY2RypjDneM8mBs69SgX20t2r70+BK+Sgkju1gZ3U2Tg/BS/7umP3rg+xyLb38yln
	 kmMpASZXkWsc64LEXozM4qlTts2Y01sE/gRv6jibs3wHz/TUMZ77/9+UBt4+fqmWK9Bhg
	 KNrWeBDX0kf5kkCgL+UDygCT+Nb8d8dS+TzQOTGp2+zgfAtCicntHMRxmTenNa+wAVQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792926511;
	h=X-Original-To:Received:Received:DKIM-Signature:Received:
	 X-Gm-Message-State: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-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:Subject:To:Cc:
	 Content-Type:Content-Transfer-Encoding;
	bh=wEzkguLKY1rpIgRrc4H7ztH83Nki19t4+s0LVafzaNo=;
	b=RmAELbMDw6A0oZJwSHtdq7pyhzVKsX2yydahbeyJN+DOG3BhAvsjGHj++8fLFnWPayLj
	 owlP2FDfh15mGhi0uHG1OqzOXYLDdBseOYeKuWRKal+MRH/LDBYU2/q6a+17ISwObThPG
	 Itn62aqTb1S7P//9GPIOMz9sbJl1MYqH5UEvbfd5+dKv4zZRkjrWUUw4dtLUwy+Vrr7+1
	 LYVBXYA5YfFYWcUGZqr7WEP5zwPdHLmq3mjrdZxSSuRpzk1+xV+ej2wSQzsk2PqJU9w1/
	 AJNPQ/MyfJffMlfS9RTBaDT/98O1IEF+eNGznVHp1PQ5BtDT/jv0DYe9PGNPQvxYxfg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mPxuPQgM;
	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 8D512606A325;
	Sun, 25 Oct 2026 11:08:31 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mPxuPQgM
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792926510;
	b=yv8WR4FG19Jeyki4WR2kY3GNa7IYINVt6/Y75aFOy9lmDQT607VwApuubmAa+BOBBeaz
	 wtWLrZmLPPFJUm1m8epIHBSbZZjQoMGFCNH1lGP3cISYJdACtKO9xovhJ3XdLQpW66Gwa
	 L0mLE3/cQpDMiiudZv8MFZKLDSniOzAFAxKB7b94/w8Nq/wNAoUhiSD1UySsWpkzjaN7J
	 BzSI5H8KH1eiMvQ5G0bijCD1e5gHjwpOqgrNWof1A4+2dYj9mKst084+O/GqjKF4Lx2Yy
	 4Z/7v8xe2jJ95/94X4rm5U4VDY1pB7evJON4J2E8rrVeR0e12jGRauefinOZ5NlCBOw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792926510;
	h=Received:DKIM-Signature:Received:X-Gm-Message-State:X-Received:
	 MIME-Version:References:In-Reply-To:From:Date:
	 X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:Subject:To:Cc:
	 Content-Type:Content-Transfer-Encoding;
	bh=wEzkguLKY1rpIgRrc4H7ztH83Nki19t4+s0LVafzaNo=;
	b=pMtnO/Z/XOMfTe9h2jdNRxGgyeQg59E1AxTni89HPC+2+op6EePY8F47GLckquFdNJGZ
	 seGzrgRnf3ygHnV7/BAFm1fijDhPKqYgCBll+zhbM+x1F12I90IsQB+uMB4LIt6GK+JHn
	 PlxOg2XgwElku9L2jVUnNfE6qfC9EZ1tiS+GmUdhshGRyvEX9I8S/C0Vqmoc9eSwDGeqy
	 USGIDUXydB3gEbA9hVQrI2a/L3rCZwYANITjntV1q0VIxgKYHuozd1d5QIBmEg5NaUJpc
	 84APk+MjI/DQZZKxoPIZ2J2CQYcVF89RhRHTfvDhcKkH3P03pr+PwgD5crrcyBEZsVA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mPxuPQgM;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 702EA606A31A
	for <netdev@vger.kernel.org>; Sun, 25 Oct 2026 11:08:30 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 045331F01828
	for <netdev@vger.kernel.org>; Sun, 25 Oct 2026 11:08:30 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792926510;
	bh=wEzkguLKY1rpIgRrc4H7ztH83Nki19t4+s0LVafzaNo=;
	h=References:In-Reply-To:From:Date:Subject:To:Cc;
	b=mPxuPQgMxfEDZTdMPkDxxdWwNa6PrJx/NVFqZmuB3SPbUZVeekbuEiPHJYsHtaWSt
	 QPFXyMH0oxP2hakIPiZicfu7/QNidspSa7tL6xzgG5tXj/jCHOE8OV6RQs6DfNE2iE
	 gCzCtFk0hPR2neN9dMqV0i3ys43OKIbx/ipK0sJenJxBhO3QmoJX/uxFv7OWwNXoG/
	 ZhKuG1IAEKE4Kv8UIVu4dMscjRVnODjDSGOwCcKNY5QME456FNfpBnPsDbNixVp1Jb
	 4EOnW+kKqRd1RwhkI8DIFetyHX0xcCUtrF/wgzSdOn7KrlfqKxd5g0zWxmzGjzuEco
	 ggnRPovzVz5fA==
X-Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-483c607ccb4so1169026fac.0
        for <netdev@vger.kernel.org>; Sun, 25 Oct 2026 04:08:29 -0700 (PDT)
X-Gm-Message-State: AFq9FYLT2JgYmOmI9Q/UXAU+vVDtPKwojkJqqqj0NC82qjwvGfq7SU1j
	R6mxeGbF6TUKEV4leM7o6z3uw2jesSv9l0cZpxcTeigqJco6PkHjQh3A1IaZngt2ARaHbjuQ53G
	RQUMQOE3GieSc3ednO7AfFJFYZPz3IYU=
X-Received: by 2002:a05:6870:c255:b0:49d:d2cd:67f3 with SMTP id
 586e51a60fabf-4a83f5e6e35mr2538036fac.49.1792926509339; Sun, 25 Oct 2026
 04:08:29 -0700 (PDT)
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: <20261025090048.27870-3-yzwlhm@gmail.com>
X-Gmail-Original-Message-ID: <CAL4WiiqSB3+u57zR0VmZ8CH8Tk2zgV9te3+GTVq+BmEJGh1O2A@mail.gmail.com>
X-Gm-Features: AclHuK9cDAKvvJ8ZEXqhScsj1KYIKsa5DRpjovDC98NpIPSRlhcjT4sZpye_5Ys
X-Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, 
	"David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, 
	Simon Horman <horms@kernel.org>, Neal Cardwell <ncardwell@google.com>, 
	Kuniyuki Iwashima <kuniyu@google.com>