[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM0EoMki518j_geesnGwh2jk51Z5BGRGootTGQq3HcP79y2ygQ@mail.gmail.com>
Date: Thu, 24 Apr 2025 11:22:40 -0400
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Cong Wang <xiyou.wangcong@...il.com>, Paolo Abeni <pabeni@...hat.com>,
Victor Nogueira <victor@...atatu.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>, Jiri Pirko <jiri@...nulli.us>,
David Miller <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Toke Høiland-Jørgensen <toke@...hat.com>,
Gerrard Tai <gerrard.tai@...rlabs.sg>, Pedro Tammela <pctammela@...atatu.com>
Subject: Re: [PATCH net v2 0/5] net_sched: Adapt qdiscs for reentrant enqueue cases
On Wed, Apr 23, 2025 at 8:24 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Wed, 23 Apr 2025 16:29:38 -0700 Cong Wang wrote:
> > > + /*
> > > + * 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.
>
> Does it still work if you have another layer of qdiscs in the middle?
> It works if say DRR is looking at the netem directly as its child when
> it does:
>
> first = cl->qdisc->q.qlen
>
> but there may be another layer, the cl->qdisc may be something that
> hasn't incremented its qlen, and something that has netem as its child.
Very strong feeling it wont work in that scenario. We can double check.
Regardless - even if it did - what Victor sent is still a fix. Seems
DRR had that bug originally. And then in the true tradition of
TheLinuxWay(tm) was cutnpasted into HFSC and then the others followed.
cheers,
jamal
Powered by blists - more mailing lists