From: Simon Horman <horms@kernel.org>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
netdev@vger.kernel.org, will@willsroot.io,
stephen@networkplumber.org,
Savino Dicanosa <savy@syst3mfailure.io>
Subject: Re: [Patch v2 net 1/2] netem: Fix skb duplication logic to prevent infinite loops
Date: Tue, 8 Jul 2025 20:11:24 +0100 [thread overview]
Message-ID: <20250708191124.GB452973@horms.kernel.org> (raw)
In-Reply-To: <CAM0EoMmToF2ihqsSGEDyG3NAcy4rjO5pzXjShD2ac7VrjDNwvA@mail.gmail.com>
On Tue, Jul 08, 2025 at 09:19:50AM -0400, Jamal Hadi Salim wrote:
> On Tue, Jul 8, 2025 at 9:18 AM Simon Horman <horms@kernel.org> wrote:
> >
> > On Mon, Jul 07, 2025 at 12:50:14PM -0700, Cong Wang wrote:
> > > This patch refines the packet duplication handling in netem_enqueue() to ensure
> > > that only newly cloned skbs are marked as duplicates. This prevents scenarios
> > > where nested netem qdiscs with 100% duplication could cause infinite loops of
> > > skb duplication.
> > >
> > > By ensuring the duplicate flag is properly managed, this patch maintains skb
> > > integrity and avoids excessive packet duplication in complex qdisc setups.
> > >
> > > Now we could also get rid of the ugly temporary overwrite of
> > > q->duplicate.
> > >
> > > Fixes: 0afb51e72855 ("[PKT_SCHED]: netem: reinsert for duplication")
> > > Reported-by: William Liu <will@willsroot.io>
> > > Reported-by: Savino Dicanosa <savy@syst3mfailure.io>
> > > Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> >
> > Reviewed-by: Simon Horman <horms@kernel.org>
>
> Simon,
> This patch wont work - see the sample config i presented.
Sorry, I convinced myself it would.
But it seems I was wrong.
next prev parent reply other threads:[~2025-07-08 19:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 19:50 [Patch v2 net 0/2] netem: Fix skb duplication logic to prevent infinite loops Cong Wang
2025-07-07 19:50 ` [Patch v2 net 1/2] " Cong Wang
2025-07-08 13:18 ` Simon Horman
2025-07-08 13:19 ` Jamal Hadi Salim
2025-07-08 19:11 ` Simon Horman [this message]
2025-07-08 15:56 ` William Liu
2025-07-08 16:06 ` Jakub Kicinski
2025-07-07 19:50 ` [Patch v2 net 2/2] selftests/tc-testing: Add a nested netem duplicate test Cong Wang
2025-07-08 13:19 ` Simon Horman
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=20250708191124.GB452973@horms.kernel.org \
--to=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=savy@syst3mfailure.io \
--cc=stephen@networkplumber.org \
--cc=will@willsroot.io \
--cc=xiyou.wangcong@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.