[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAl34pi75s8ItSme@pop-os.localdomain>
Date: Wed, 23 Apr 2025 16:29:38 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: Victor Nogueira <victor@...atatu.com>, netdev@...r.kernel.org,
jhs@...atatu.com, jiri@...nulli.us, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, toke@...hat.com,
gerrard.tai@...rlabs.sg, pctammela@...atatu.com
Subject: Re: [PATCH net v2 0/5] net_sched: Adapt qdiscs for reentrant enqueue
cases
On Wed, Apr 23, 2025 at 01:50:50PM -0700, Cong Wang wrote:
> diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
> index fdd79d3ccd8c..000f8138f561 100644
> --- a/net/sched/sch_netem.c
> +++ b/net/sched/sch_netem.c
> @@ -531,21 +531,6 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch,
> return NET_XMIT_DROP;
> }
>
> - /*
> - * If doing duplication then re-insert at top of the
> - * qdisc tree, since parent queuer expects that only one
> - * skb will be queued.
> - */
> - if (skb2) {
> - struct Qdisc *rootq = qdisc_root_bh(sch);
> - u32 dupsave = q->duplicate; /* prevent duplicating a dup... */
> -
> - q->duplicate = 0;
> - rootq->enqueue(skb2, rootq, to_free);
> - q->duplicate = dupsave;
> - skb2 = NULL;
> - }
> -
> qdisc_qstats_backlog_inc(sch, skb);
>
> cb = netem_skb_cb(skb);
> @@ -613,6 +598,21 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch,
> sch->qstats.requeues++;
> }
>
> + /*
> + * If doing duplication then re-insert at top of the
> + * qdisc tree, since parent queuer expects that only one
> + * skb will be queued.
> + */
> + if (skb2) {
> + struct Qdisc *rootq = qdisc_root_bh(sch);
> + u32 dupsave = q->duplicate; /* prevent duplicating a dup... */
> +
> + q->duplicate = 0;
> + rootq->enqueue(skb2, rootq, to_free);
> + q->duplicate = dupsave;
> + skb2 = NULL;
> + }
> +
> finish_segs:
> if (skb2)
> __qdisc_drop(skb2, to_free);
>
Just FYI: I tested this patch, netem duplication still worked, I didn't
see any issue.
Thanks.
Powered by blists - more mailing lists