[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aGSSF7K/M81Pjbyz@pop-os.localdomain>
Date: Tue, 1 Jul 2025 18:57:43 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: netdev@...r.kernel.org
Cc: jhs@...atatu.com, will@...lsroot.io, stephen@...workplumber.org,
Savino Dicanosa <savy@...t3mfailure.io>
Subject: Re: [Patch net 1/2] netem: Fix skb duplication logic to prevent
infinite loops
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.
Powered by blists - more mailing lists