From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Subject: [Patch net v7 0/9] netem: Fix skb duplication logic and prevent infinite loops
Date: Tue, 13 Jan 2026 11:06:25 -0800 [thread overview]
Message-ID: <20260113190634.681734-1-xiyou.wangcong@gmail.com> (raw)
This patchset fixes the infinite loops due to duplication in netem, the
real root cause of this problem is enqueuing to the root qdisc, which is
now changed to enqueuing to the same qdisc. This is more reasonable,
more intuitive from users' perspective, less error-prone and more elegant
from kernel developers' perspective.
Please see more details in patch 4/9 which contains two pages of detailed
explanation including why it is safe and better.
This reverts the offending commits from William which clearly broke
mq+netem use cases, as reported by two users.
All the TC test cases pass with this patchset.
---
v7: Fixed a typo in subject
Fixed a missing qdisc_tree_reduce_backlog()
Added a new selftest for backlog validation
v6: Dropped the init_user_ns check patch
Reordered the qfq patch
Rebased to the latest -net branch
v5: Reverted the offending commits
Added a init_user_ns check (4/9)
Rebased to the latest -net branch
v4: Added a fix for qfq qdisc (2/6)
Updated 1/6 patch description
Added a patch to update the enqueue reentrant behaviour tests
v3: Fixed the root cause of enqueuing to root
Switched back to netem_skb_cb safely
Added two more test cases
v2: Fixed a typo
Improved tdc selftest to check sent bytes
Cong Wang (9):
net_sched: Check the return value of qfq_choose_next_agg()
Revert "net/sched: Restrict conditions for adding duplicating netems
to qdisc tree"
Revert "selftests/tc-testing: Add tests for restrictions on netem
duplication"
net_sched: Implement the right netem duplication behavior
selftests/tc-testing: Add a nested netem duplicate test
selftests/tc-testing: Add a test case for prio with netem duplicate
selftests/tc-testing: Add a test case for mq with netem duplicate
selftests/tc-testing: Update test cases with netem duplicate
selftests/tc-testing: Add a test case for HTB with netem
net/sched/sch_netem.c | 67 ++------
net/sched/sch_qfq.c | 2 +
.../tc-testing/tc-tests/infra/qdiscs.json | 148 ++++++++++++++----
.../tc-testing/tc-tests/qdiscs/netem.json | 90 ++---------
4 files changed, 155 insertions(+), 152 deletions(-)
--
2.34.1
next reply other threads:[~2026-01-13 19:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 19:06 Cong Wang [this message]
2026-01-13 19:06 ` [Patch net v7 1/9] net_sched: Check the return value of qfq_choose_next_agg() Cong Wang
2026-01-13 19:06 ` [Patch net v7 2/9] Revert "net/sched: Restrict conditions for adding duplicating netems to qdisc tree" Cong Wang
2026-01-13 19:06 ` [Patch net v7 3/9] Revert "selftests/tc-testing: Add tests for restrictions on netem duplication" Cong Wang
2026-01-13 19:06 ` [Patch net v7 4/9] net_sched: Implement the right netem duplication behavior Cong Wang
2026-01-13 19:06 ` [Patch net v7 5/9] selftests/tc-testing: Add a nested netem duplicate test Cong Wang
2026-01-13 19:06 ` [Patch net v7 6/9] selftests/tc-testing: Add a test case for prio with netem duplicate Cong Wang
2026-01-13 19:06 ` [Patch net v7 7/9] selftests/tc-testing: Add a test case for mq " Cong Wang
2026-01-13 19:06 ` [Patch net v7 8/9] selftests/tc-testing: Update test cases " Cong Wang
2026-01-13 19:06 ` [Patch net v7 9/9] selftests/tc-testing: Add a test case for HTB with netem Cong Wang
2026-01-16 2:33 ` [Patch net v7 0/9] netem: Fix skb duplication logic and prevent infinite loops Jakub Kicinski
2026-01-18 3:55 ` Cong Wang
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=20260113190634.681734-1-xiyou.wangcong@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox