mbox series

[net-next,0/6] net: sched: sch: introduce extack support

Message ID 20171206160845.6646-1-aring@mojatatu.com
Headers show
Series net: sched: sch: introduce extack support | expand

Message

Alexander Aring Dec. 6, 2017, 4:08 p.m. UTC
Hi,

this patch series basically add support for extack in common qdisc handling.
Additional it adds extack pointer to common qdisc callback handling this
offers per qdisc implementation to setting the extack message for each
failure over netlink.

The extack message will be set deeper in qdisc functions but going not
deeper as net core api. For qdisc module callback handling, the extack
will not be set. This will be part of per qdisc extack handling.

I also want to prepare patches to handle extack per qdisc module...
so there will come a lot of more patches, just cut them down to make
it reviewable.

There are some above 80-chars width warnings, which I ignore because
it looks more ugly otherwise.

This patch-series based on patches by David Ahren which gave me some
hints how to deal with extack support.

Cc: David Ahern <dsahern@gmail.com>

- Alex

Alexander Aring (6):
  net: sched: sch_api: handle generic qdisc errors
  net: sched: sch: add extack for init callback
  net: sched: sch: add extack for change qdisc ops
  net: sched: sch: add extack to change class
  net: sched: sch: add extack for block callback
  net: sched: sch: add extack for graft callback

 include/net/sch_generic.h |  15 ++--
 net/sched/cls_api.c       |   4 +-
 net/sched/sch_api.c       | 204 ++++++++++++++++++++++++++++++++--------------
 net/sched/sch_atm.c       |   3 +-
 net/sched/sch_cbq.c       |  10 ++-
 net/sched/sch_cbs.c       |   8 +-
 net/sched/sch_choke.c     |   8 +-
 net/sched/sch_codel.c     |   8 +-
 net/sched/sch_drr.c       |  12 ++-
 net/sched/sch_dsmark.c    |  12 ++-
 net/sched/sch_fifo.c      |   5 +-
 net/sched/sch_fq.c        |   8 +-
 net/sched/sch_fq_codel.c  |  11 ++-
 net/sched/sch_generic.c   |   8 +-
 net/sched/sch_gred.c      |   6 +-
 net/sched/sch_hfsc.c      |  14 ++--
 net/sched/sch_hhf.c       |   8 +-
 net/sched/sch_htb.c       |  10 ++-
 net/sched/sch_ingress.c   |  12 ++-
 net/sched/sch_mq.c        |   5 +-
 net/sched/sch_mqprio.c    |   5 +-
 net/sched/sch_multiq.c    |  13 +--
 net/sched/sch_netem.c     |  10 ++-
 net/sched/sch_pie.c       |   8 +-
 net/sched/sch_plug.c      |   6 +-
 net/sched/sch_prio.c      |  13 +--
 net/sched/sch_qfq.c       |  12 ++-
 net/sched/sch_red.c       |  10 ++-
 net/sched/sch_sfb.c       |  16 ++--
 net/sched/sch_sfq.c       |   6 +-
 net/sched/sch_tbf.c       |  10 ++-
 net/sched/sch_teql.c      |   3 +-
 32 files changed, 321 insertions(+), 162 deletions(-)

Comments

Cong Wang Dec. 6, 2017, 7:10 p.m. UTC | #1
On Wed, Dec 6, 2017 at 8:08 AM, Alexander Aring <aring@mojatatu.com> wrote:
> Hi,
>
> this patch series basically add support for extack in common qdisc handling.
> Additional it adds extack pointer to common qdisc callback handling this
> offers per qdisc implementation to setting the extack message for each
> failure over netlink.
>
> The extack message will be set deeper in qdisc functions but going not
> deeper as net core api. For qdisc module callback handling, the extack
> will not be set. This will be part of per qdisc extack handling.
>
> I also want to prepare patches to handle extack per qdisc module...
> so there will come a lot of more patches, just cut them down to make
> it reviewable.
>
> There are some above 80-chars width warnings, which I ignore because
> it looks more ugly otherwise.
>
> This patch-series based on patches by David Ahren which gave me some
> hints how to deal with extack support.
>
> Cc: David Ahern <dsahern@gmail.com>

Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
David Miller Dec. 6, 2017, 8:40 p.m. UTC | #2
From: Alexander Aring <aring@mojatatu.com>
Date: Wed,  6 Dec 2017 11:08:39 -0500

> this patch series basically add support for extack in common qdisc handling.
> Additional it adds extack pointer to common qdisc callback handling this
> offers per qdisc implementation to setting the extack message for each
> failure over netlink.
> 
> The extack message will be set deeper in qdisc functions but going not
> deeper as net core api. For qdisc module callback handling, the extack
> will not be set. This will be part of per qdisc extack handling.
> 
> I also want to prepare patches to handle extack per qdisc module...
> so there will come a lot of more patches, just cut them down to make
> it reviewable.
> 
> There are some above 80-chars width warnings, which I ignore because
> it looks more ugly otherwise.
> 
> This patch-series based on patches by David Ahren which gave me some
> hints how to deal with extack support.
> 
> Cc: David Ahern <dsahern@gmail.com>

Only add the plumbing when you have actual extack messages you are
adding as an example use case.

Thank you.
Alexander Aring Dec. 6, 2017, 10:34 p.m. UTC | #3
Hi,

On Wed, Dec 6, 2017 at 3:40 PM, David Miller <davem@davemloft.net> wrote:
> From: Alexander Aring <aring@mojatatu.com>
> Date: Wed,  6 Dec 2017 11:08:39 -0500
>
>> this patch series basically add support for extack in common qdisc handling.
>> Additional it adds extack pointer to common qdisc callback handling this
>> offers per qdisc implementation to setting the extack message for each
>> failure over netlink.
>>
>> The extack message will be set deeper in qdisc functions but going not
>> deeper as net core api. For qdisc module callback handling, the extack
>> will not be set. This will be part of per qdisc extack handling.
>>
>> I also want to prepare patches to handle extack per qdisc module...
>> so there will come a lot of more patches, just cut them down to make
>> it reviewable.
>>
>> There are some above 80-chars width warnings, which I ignore because
>> it looks more ugly otherwise.
>>
>> This patch-series based on patches by David Ahren which gave me some
>> hints how to deal with extack support.
>>
>> Cc: David Ahern <dsahern@gmail.com>
>
> Only add the plumbing when you have actual extack messages you are
> adding as an example use case.
>

I did not understand. I have a lot of patches which make use of these
changes. Do you want me to submit me these in one shot (patch-series)?
I was hoping to making it in smaller patch-series for easier review.

- Alex
David Miller Dec. 6, 2017, 10:36 p.m. UTC | #4
From: Alexander Aring <aring@mojatatu.com>
Date: Wed, 6 Dec 2017 17:34:08 -0500

> Hi,
> 
> On Wed, Dec 6, 2017 at 3:40 PM, David Miller <davem@davemloft.net> wrote:
>> From: Alexander Aring <aring@mojatatu.com>
>> Date: Wed,  6 Dec 2017 11:08:39 -0500
>>
>>> this patch series basically add support for extack in common qdisc handling.
>>> Additional it adds extack pointer to common qdisc callback handling this
>>> offers per qdisc implementation to setting the extack message for each
>>> failure over netlink.
>>>
>>> The extack message will be set deeper in qdisc functions but going not
>>> deeper as net core api. For qdisc module callback handling, the extack
>>> will not be set. This will be part of per qdisc extack handling.
>>>
>>> I also want to prepare patches to handle extack per qdisc module...
>>> so there will come a lot of more patches, just cut them down to make
>>> it reviewable.
>>>
>>> There are some above 80-chars width warnings, which I ignore because
>>> it looks more ugly otherwise.
>>>
>>> This patch-series based on patches by David Ahren which gave me some
>>> hints how to deal with extack support.
>>>
>>> Cc: David Ahern <dsahern@gmail.com>
>>
>> Only add the plumbing when you have actual extack messages you are
>> adding as an example use case.
>>
> 
> I did not understand. I have a lot of patches which make use of these
> changes. Do you want me to submit me these in one shot (patch-series)?
> I was hoping to making it in smaller patch-series for easier review.

Submit one plumbing patch alongside the changes that actually add
messages in those code paths.

This patch series did plumbing in many spots, one patch at a time,
but added no users except in the initial path.

That's what I don't like.