Re: [PATCH net 0/6] net/sched: Fix packet loops in mirred and netem
From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: 2026-01-14 16:34:06
Also in:
netfilter-devel
On Tue, Jan 13, 2026 at 3:10 PM Cong Wang [off-list ref] wrote:
On Sun, Jan 11, 2026 at 8:40 AM Jamal Hadi Salim [off-list ref] wrote:quoted
We introduce a 2-bit global skb->ttl counter.Patch #1 describes how we puti together those bits. Patches #2 and patch #5 use these bits. I added Fixes tags to patch #1 in case it is useful for backporting. Patch #3 and #4 revert William's earlier netem commits. Patch #6 introduces tdc test cases.3 reasons why this patchset should be rejected: 1) It increases sk_buff size potentially by 1 byte with minimal config
All distro vendors turn all options. So no change in size happens. Regardless, it's a non-arguement there is no way to resolve the mirred issue without global state. It's a twofer - fixing mirred and netem.
2) Infinite loop is the symptom caused by enqueuing to the root qdisc, fixing the infinite loop itself is fixing the symptom and covering up the root cause deeper.
The behavior of sending to the root has been around for ~20 years. I just saw your patches - do you mind explaining why you didnt Cc me on them?
3) Using skb->ttl makes netem duplication behavior less predictable for users. With a TTL-based approach, the duplication depth is limited by a kernel-internal constant that is invisible to userspace. Users configuring nested netem hierarchies cannot determine from tc commands alone whether their packets will be duplicated at each stage or silently pass through when TTL is exhausted.
The patch is not using the ttl as a counter for netem, it's being treated as boolean (just like your patch is doing). We are only using this as a counter for the mirred loop use case.
NACKed-by: Cong Wang [off-list ref]
Calm down please. cheers jamal