[PATCH net 0/2] dualpi2: fix queue delays after trimming

From: Zhiqi Zhang

Date: Wed Nov 18 2026 - 01:39:35 EST


Changing DualPI2's queue limits can remove the cached head packet without
refreshing its enqueue timestamp. This leaves an increasing delay on an
empty queue, or the removed head's delay on a partially trimmed queue.
The first patch refreshes both cached timestamps after trimming. The
second adds regression tests through the net selftest framework.

I identified the issue, reviewed the fix, and developed and tested the
regression checks with AI assistance. I used OpenAI Codex for root-cause
analysis, drafting the fix and initial test code, automated validation,
and preparation of the commit messages and this cover letter. I asked
Codex to analyze kernel code, implement and test a fix, check public
reports for duplicates, and follow the kernel contribution process.
The archived results below are from Codex-assisted automated validation.
I found no matching public report or patch in the upstream histories,
Patchwork, lore and GitHub searches performed with Codex as of 2026-11-18.

I used Codex-assisted automated runs of the 11 companion DualPI2
selftests to validate unmodified and fixed arm64 net/main kernels in
QEMU, at the base commit below. Real AF_PACKET traffic was retained with
HFSC ls/ul shaping on a dummy interface in an isolated network namespace.
No source changes or fault injection were used to trigger the bug.
The baseline passed three controls and failed eight trimming cases;
the fixed kernel passed all 11. KASAN, UBSAN and PROVE_LOCKING were
enabled, and the completed runs showed no corresponding diagnostics.
An earlier eight-case standalone reproducer verified the fix on mainline.

I used Codex to build before/after arm64 kernel Images on mainline and
net, compile the modified object with W=1 under debug, allmodconfig and
allyesconfig without new warnings, and build the selftest helper through
its Makefile target with -Wall -Wextra -Werror. Both patches pass
checkpatch --strict, and applying the series to the base
commit reproduces the committed tree exactly.

I also used Codex to complete full arm64 allmodconfig and allyesconfig
builds on mainline at 7ccb044c27720d48175577080b851f047ddcfd1c with the
same fix, using W=1 and CONFIG_WERROR= to allow baseline warnings. Default
strict attempts hit the existing arch/arm64/kernel/sys.c override-init
warning promoted to an error; the same failure was reproduced on the
unmodified net tree.
After the full builds, I used Codex to rebuild the modified object under
both configs with default CONFIG_WERROR and W=1, without warnings.

Zhiqi Zhang (2):
net/sched: dualpi2: refresh head timestamps after trimming
selftests: net: check DualPI2 head timestamps after trimming

MAINTAINERS | 1 +
net/sched/sch_dualpi2.c | 2 +
tools/testing/selftests/net/Makefile | 2 +
tools/testing/selftests/net/config | 2 +
tools/testing/selftests/net/dualpi2_head.c | 304 +++++++++++++++++
tools/testing/selftests/net/dualpi2_head.sh | 350 ++++++++++++++++++++
6 files changed, 661 insertions(+)
create mode 100644 tools/testing/selftests/net/dualpi2_head.c
create mode 100755 tools/testing/selftests/net/dualpi2_head.sh


base-commit: 2a324a58a084c5cfd7e5a2f55e0786bee170a4a5
--
2.54.0 (Apple Git-157)