netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch v3 net 0/4] netem: Fix skb duplication logic and prevent infinite loops
@ 2025-07-13 21:47 Cong Wang
  2025-07-13 21:47 ` [Patch v3 net 1/4] net_sched: Implement the right netem duplication behavior Cong Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Cong Wang @ 2025-07-13 21:47 UTC (permalink / raw)
  To: netdev; +Cc: jhs, will, stephen, Cong Wang

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-07-15 18:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-13 21:47 [Patch v3 net 0/4] netem: Fix skb duplication logic and prevent infinite loops Cong Wang
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

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).