From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: jhs@mojatatu.com, will@willsroot.io, stephen@networkplumber.org,
Cong Wang <xiyou.wangcong@gmail.com>
Subject: [Patch v3 net 0/4] netem: Fix skb duplication logic and prevent infinite loops
Date: Sun, 13 Jul 2025 14:47:44 -0700 [thread overview]
Message-ID: <20250713214748.1377876-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 predictable from users' perspective, and more elegant.
Please see more details in patch 1/4 which contains two pages of
detailed explanation including why it is safe and better.
This replaces the patches from William, with much less code and without
any workaround. More importantly, this does not break any use case at
all.
---
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 (4):
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 piro with netem duplicate
selftests/tc-testing: Add a test case for mq with netem duplicate
net/sched/sch_netem.c | 26 ++++----
.../tc-testing/tc-tests/infra/qdiscs.json | 59 +++++++++++++++++++
.../tc-testing/tc-tests/qdiscs/netem.json | 25 ++++++++
3 files changed, 99 insertions(+), 11 deletions(-)
--
2.34.1
next reply other threads:[~2025-07-13 21:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-13 21:47 Cong Wang [this message]
2025-07-13 21:47 ` [Patch v3 net 1/4] net_sched: Implement the right netem duplication behavior Cong Wang
2025-07-13 22:01 ` Cong Wang
2025-07-13 22:12 ` Stephen Hemminger
2025-07-15 17:48 ` Cong Wang
2025-07-14 2:30 ` William Liu
2025-07-15 18:03 ` Cong Wang
2025-07-15 18:41 ` William Liu
2025-07-13 21:47 ` [Patch v3 net 2/4] selftests/tc-testing: Add a nested netem duplicate test Cong Wang
2025-07-13 21:47 ` [Patch v3 net 3/4] selftests/tc-testing: Add a test case for piro with netem duplicate Cong Wang
2025-07-13 21:47 ` [Patch v3 net 4/4] selftests/tc-testing: Add a test case for mq " 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=20250713214748.1377876-1-xiyou.wangcong@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=will@willsroot.io \
/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;
as well as URLs for NNTP newsgroup(s).