From: Cong Wang <xiyou.wangcong@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Victor Nogueira <victor@mojatatu.com>,
netdev@vger.kernel.org, jhs@mojatatu.com, jiri@resnulli.us,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
toke@redhat.com, gerrard.tai@starlabs.sg, pctammela@mojatatu.com
Subject: Re: [PATCH net v2 0/5] net_sched: Adapt qdiscs for reentrant enqueue cases
Date: Wed, 23 Apr 2025 16:29:38 -0700 [thread overview]
Message-ID: <aAl34pi75s8ItSme@pop-os.localdomain> (raw)
In-Reply-To: <aAlSqk9UBMNu6JnJ@pop-os.localdomain>
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.
next prev parent reply other threads:[~2025-04-23 23:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 10:24 [PATCH net v2 0/5] net_sched: Adapt qdiscs for reentrant enqueue cases Victor Nogueira
2025-04-16 10:24 ` [PATCH net v2 1/5] net_sched: drr: Fix double list add in class with netem as child qdisc Victor Nogueira
2025-04-23 0:44 ` Jakub Kicinski
2025-04-23 14:41 ` Victor Nogueira
2025-04-16 10:24 ` [PATCH net v2 2/5] net_sched: hfsc: Fix a UAF vulnerability " Victor Nogueira
2025-04-16 10:24 ` [PATCH net v2 3/5] net_sched: ets: Fix double list add " Victor Nogueira
2025-04-16 10:24 ` [PATCH net v2 4/5] net_sched: qfq: " Victor Nogueira
2025-04-16 10:24 ` [PATCH net v2 5/5] selftests: tc-testing: Add TDC tests that exercise reentrant enqueue behaviour Victor Nogueira
2025-04-17 16:07 ` [PATCH net v2 0/5] net_sched: Adapt qdiscs for reentrant enqueue cases Jakub Kicinski
2025-04-17 21:49 ` Victor Nogueira
2025-04-22 11:34 ` Paolo Abeni
2025-04-17 19:23 ` Cong Wang
2025-04-17 22:13 ` Victor Nogueira
2025-04-22 11:21 ` Paolo Abeni
2025-04-23 20:50 ` Cong Wang
2025-04-23 23:29 ` Cong Wang [this message]
2025-04-24 0:24 ` Jakub Kicinski
2025-04-24 15:22 ` Jamal Hadi Salim
2025-04-24 15:40 ` Jamal Hadi Salim
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=aAl34pi75s8ItSme@pop-os.localdomain \
--to=xiyou.wangcong@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gerrard.tai@starlabs.sg \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pctammela@mojatatu.com \
--cc=toke@redhat.com \
--cc=victor@mojatatu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox