[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210917060859.637dd9c0@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 17 Sep 2021 06:08:59 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: David Miller <davem@...emloft.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Jiri Pirko <jiri@...nulli.us>,
Eric Dumazet <edumazet@...gle.com>,
Matthew Massey <matthewmassey@...com>,
Dave Taht <dave.taht@...il.com>
Subject: Re: [PATCH net-next 1/3] net: sched: update default qdisc
visibility after Tx queue cnt changes
On Thu, 16 Sep 2021 22:46:42 -0700 Cong Wang wrote:
> On Wed, Sep 15, 2021 at 12:36 PM Jakub Kicinski <kuba@...nel.org> wrote:
> > On Wed, 15 Sep 2021 09:31:08 -0700 Cong Wang wrote:
> > > Don't we need to flip the device with dev_deactivate()+dev_activate()?
> > > It looks like the only thing this function resets is qdisc itself, and only
> > > partially.
> >
> > We're only making the qdiscs visible, there should be
> > no datapath-visible change.
>
> Isn't every qdisc under mq visible to datapath?
>
> Packets can be pending in qdisc's, and qdisc's can be scheduled
> in TX softirq, so essentially we need to flip the device like other
By visible I mean tc qdisc dump shows them. I'm adding/removing
the qdiscs to netdev->qdisc_hash. That's only used by control
paths to dump or find qdiscs by handle.
> > > This is nearly identical to mqprio_change_real_num_tx(), can we reuse
> > > it?
> >
> > Indeed, I was a little unsure where best to place the helper.
> > Since mq is always built if mqprio is my instinct would be to
> > export mq_change_real_num_tx and use it in mqprio. But I didn't
> > see any existing exports (mq_attach(), mq_queue_get() are also
> > identical and are not shared) so I just copy&pasted the logic.
>
> What about net/sched/sch_generic.c?
>
> > LMK if (a) that's fine; (b) I should share the new code;
> > (c) I should post a patch to share all the code that's identical;...
>
> I think you can put the code in net/sched/sch_generic.c and export
> it for mqprio (mq is built-in so can just call it).
Will do, thanks!
Powered by blists - more mailing lists