Re: [PATCH net 2/2] tcp: Add KUnit tests for bind fastreuse caches
From: Eric Dumazet
Date: Sun Oct 25 2026 - 07:08:56 EST
Le dim. 25 oct. 2026 à 10:01, Zhewei Yuan <yzwlhm@xxxxxxxxx> 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@xxxxxxxxx>
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