Re: [PATCH net-next 0/7] net: sched: prepare for more Qdisc offloads

2018-11-08 Thread David Miller
From: Jakub Kicinski 
Date: Wed,  7 Nov 2018 17:33:33 -0800

> This series refactors the "switchdev" Qdisc offloads a little.  We have
> a few Qdiscs which can be fully offloaded today to the forwarding plane
> of switching devices.
> 
> First patch adds a helper for handing statistic dumps, the code seems
> to be copy pasted between PRIO and RED.  Second patch removes unnecessary
> parameter from RED offload function.  Third patch makes the MQ offload
> use the dump helper which helps it behave much like PRIO and RED when
> it comes to the TCQ_F_OFFLOADED flag.  Patch 4 adds a graft helper,
> similar to the dump helper.
> 
> Patch 5 is unrelated to offloads, qdisc_graft() code seemed ripe for a
> small refactor - no functional changes there.
> 
> Last two patches move the qdisc_put() call outside of the sch_tree_lock
> section for RED and PRIO.  The child Qdiscs will get removed from the
> hierarchy under the lock, but having the put (and potentially destroy)
> called outside of the lock helps offload which may choose to sleep,
> and it should generally lower the Qdisc change impact.

Series applied, thanks Jakub.


Re: [PATCH net-next 0/7] net: sched: prepare for more Qdisc offloads

2018-11-08 Thread Toke Høiland-Jørgensen
Jakub Kicinski  writes:

> On Thu, 08 Nov 2018 12:48:27 +0100, Toke Høiland-Jørgensen wrote:
>> Jakub Kicinski  writes:
>> > Hi!
>> >
>> > This series refactors the "switchdev" Qdisc offloads a little.  We have
>> > a few Qdiscs which can be fully offloaded today to the forwarding plane
>> > of switching devices.
>> >
>> > First patch adds a helper for handing statistic dumps, the code seems
>> > to be copy pasted between PRIO and RED.  
>> 
>> Hi Jakub
>> 
>> I didn't know there was offload capabilities for AQMs, that's cool! Do
>> you have any plans to add offloads for any of the modern AQMs (CoDel or
>> PIE)?
>
> I'd really like to add CoDel offload, but it's not a plan at this
> point :(

Right, too bad. Well, here's hoping that you'll get the chance in the
not too distant future :)

-Toke


Re: [PATCH net-next 0/7] net: sched: prepare for more Qdisc offloads

2018-11-08 Thread Jakub Kicinski
On Thu, 08 Nov 2018 12:48:27 +0100, Toke Høiland-Jørgensen wrote:
> Jakub Kicinski  writes:
> > Hi!
> >
> > This series refactors the "switchdev" Qdisc offloads a little.  We have
> > a few Qdiscs which can be fully offloaded today to the forwarding plane
> > of switching devices.
> >
> > First patch adds a helper for handing statistic dumps, the code seems
> > to be copy pasted between PRIO and RED.  
> 
> Hi Jakub
> 
> I didn't know there was offload capabilities for AQMs, that's cool! Do
> you have any plans to add offloads for any of the modern AQMs (CoDel or
> PIE)?

I'd really like to add CoDel offload, but it's not a plan at this
point :(


Re: [PATCH net-next 0/7] net: sched: prepare for more Qdisc offloads

2018-11-08 Thread Toke Høiland-Jørgensen
Jakub Kicinski  writes:

> Hi!
>
> This series refactors the "switchdev" Qdisc offloads a little.  We have
> a few Qdiscs which can be fully offloaded today to the forwarding plane
> of switching devices.
>
> First patch adds a helper for handing statistic dumps, the code seems
> to be copy pasted between PRIO and RED.

Hi Jakub

I didn't know there was offload capabilities for AQMs, that's cool! Do
you have any plans to add offloads for any of the modern AQMs (CoDel or
PIE)?

-Toke


[PATCH net-next 0/7] net: sched: prepare for more Qdisc offloads

2018-11-07 Thread Jakub Kicinski
Hi!

This series refactors the "switchdev" Qdisc offloads a little.  We have
a few Qdiscs which can be fully offloaded today to the forwarding plane
of switching devices.

First patch adds a helper for handing statistic dumps, the code seems
to be copy pasted between PRIO and RED.  Second patch removes unnecessary
parameter from RED offload function.  Third patch makes the MQ offload
use the dump helper which helps it behave much like PRIO and RED when
it comes to the TCQ_F_OFFLOADED flag.  Patch 4 adds a graft helper,
similar to the dump helper.

Patch 5 is unrelated to offloads, qdisc_graft() code seemed ripe for a
small refactor - no functional changes there.

Last two patches move the qdisc_put() call outside of the sch_tree_lock
section for RED and PRIO.  The child Qdiscs will get removed from the
hierarchy under the lock, but having the put (and potentially destroy)
called outside of the lock helps offload which may choose to sleep,
and it should generally lower the Qdisc change impact.

Jakub Kicinski (7):
  net: sched: add an offload dump helper
  net: sched: red: remove unnecessary red_dump_offload_stats parameter
  net: sched: set TCQ_F_OFFLOADED flag for MQ
  net: sched: add an offload graft helper
  net: sched: refactor grafting Qdiscs with a parent
  net: sched: red: delay destroying child qdisc on replace
  net: sched: prio: delay destroying child qdiscs on change

 include/net/sch_generic.h | 24 
 net/sched/sch_api.c   | 78 ---
 net/sched/sch_mq.c|  9 ++---
 net/sched/sch_prio.c  | 47 ---
 net/sched/sch_red.c   | 29 +--
 5 files changed, 107 insertions(+), 80 deletions(-)

-- 
2.17.1