From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: jhs@mojatatu.com, will@willsroot.io, stephen@networkplumber.org,
Savino Dicanosa <savy@syst3mfailure.io>
Subject: Re: [Patch net 1/2] netem: Fix skb duplication logic to prevent infinite loops
Date: Tue, 1 Jul 2025 18:57:43 -0700 [thread overview]
Message-ID: <aGSSF7K/M81Pjbyz@pop-os.localdomain> (raw)
In-Reply-To: <20250701231306.376762-2-xiyou.wangcong@gmail.com>
On Tue, Jul 01, 2025 at 04:13:05PM -0700, Cong Wang wrote:
> diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
> index fdd79d3ccd8c..33de9c3e4d1b 100644
> --- a/net/sched/sch_netem.c
> +++ b/net/sched/sch_netem.c
> @@ -460,7 +460,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch,
> skb->prev = NULL;
>
> /* Random duplication */
> - if (q->duplicate && q->duplicate >= get_crandom(&q->dup_cor, &q->prng))
> + if (tc_skb_cb(skb)->duplicate &&
Oops, this is clearly should be !duplicate... It was lost during my
stupid copy-n-paste... Sorry for this mistake.
I will send v2 after waiting for other feedback.
Thanks.
next prev parent reply other threads:[~2025-07-02 1:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 23:13 [Patch net 0/2] netem: Fix skb duplication logic to prevent infinite loops Cong Wang
2025-07-01 23:13 ` [Patch net 1/2] " Cong Wang
2025-07-02 1:57 ` Cong Wang [this message]
2025-07-02 14:12 ` Jamal Hadi Salim
2025-07-02 15:04 ` Jamal Hadi Salim
2025-07-02 15:06 ` Jamal Hadi Salim
2025-07-02 15:20 ` William Liu
2025-07-05 0:48 ` Cong Wang
2025-07-05 13:52 ` Jamal Hadi Salim
2025-07-06 14:59 ` William Liu
2025-07-07 20:49 ` Jamal Hadi Salim
2025-07-07 21:26 ` Jakub Kicinski
2025-07-08 13:18 ` Jamal Hadi Salim
2025-07-07 19:40 ` Cong Wang
2025-07-07 20:24 ` Jamal Hadi Salim
2025-07-01 23:13 ` [Patch net 2/2] selftests/tc-testing: Add a nested netem duplicate test 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=aGSSF7K/M81Pjbyz@pop-os.localdomain \
--to=xiyou.wangcong@gmail.com \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=savy@syst3mfailure.io \
--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