netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: "Duyck, Alexander H" <alexander.h.duyck@intel.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	"leonro@mellanox.com" <leonro@mellanox.com>,
	"idosch@mellanox.com" <idosch@mellanox.com>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	"ast@kernel.org" <ast@kernel.org>,
	"jhs@mojatatu.com" <jhs@mojatatu.com>,
	"saeedm@mellanox.com" <saeedm@mellanox.com>,
	"mlxsw@mellanox.com" <mlxsw@mellanox.com>,
	"john.hurley@netronome.com" <john.hurley@netronome.com>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>,
	"jakub.kicinski@netronome.com" <jakub.kicinski@netronome.com>,
	"ganeshgr@chelsio.com" <ganeshgr@chelsio.com>,
	"simon.horman@netronome.com" <simon.horman@netronome.com>,
	"michael.chan@broadcom.com" <michael.chan@broadcom.com>,
Subject: Re: [patch net-next 01/20] net: sched: add block bind/unbind notif. and extended block_get/put
Date: Wed, 18 Oct 2017 08:59:25 +0200	[thread overview]
Message-ID: <20171018065925.GA2028@nanopsycho> (raw)
In-Reply-To: <1508271733.11655.3.camel@intel.com>

Tue, Oct 17, 2017 at 10:22:16PM CEST, alexander.h.duyck@intel.com wrote:
>On Tue, 2017-10-17 at 22:05 +0200, Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@mellanox.com>
>> 
>> Introduce new type of ndo_setup_tc message to propage binding/unbinding
>> of a block to driver. Call this ndo whenever qdisc gets/puts a block.
>> Alongside with this, there's need to propagate binder type from qdisc
>> code down to the notifier. So introduce extended variants of
>> block_get/put in order to pass this info.
>> 
>> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
>> ---
>>  include/linux/netdevice.h |  1 +
>>  include/net/pkt_cls.h     | 40 +++++++++++++++++++++++++++++++++
>>  net/sched/cls_api.c       | 56 ++++++++++++++++++++++++++++++++++++++++++++---
>>  3 files changed, 94 insertions(+), 3 deletions(-)
>> 
>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>> index 31bb301..062a4f5 100644
>> --- a/include/linux/netdevice.h
>> +++ b/include/linux/netdevice.h
>> @@ -771,6 +771,7 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
>>  
>>  enum tc_setup_type {
>>  	TC_SETUP_MQPRIO,
>> +	TC_SETUP_BLOCK,
>>  	TC_SETUP_CLSU32,
>>  	TC_SETUP_CLSFLOWER,
>>  	TC_SETUP_CLSMATCHALL,
>
>I'm not a big fan of adding this to the middle of the enum. It will
>make it harder for people that have to backport changes and such since
>it is reordering values that are passed as a part of the kabi between
>drivers and the kernel.

I put it where I think it fits. I never think about backport while
working on upstream kernel. I believe it is a bad practise if you do so.
But in this case, the backport is trivial, I don't see any problem with
that.


>
>Also does this patch set really need to be 20 patches long? Seems like
>you could have done this as a set of 8 and another of 12 since you need
>about 8 patches to get to the point where you start pulling the code
>out of the drivers.

Yeah, basically I can cut the patchset in any place. But I wanted to
show the whole change. If there was more drivers using this, I would
have to add patches. Cutting it in half just because of the amount feels
wrong, it's half way through there :/ If you insist, I can cut it. I can
even squash multiple patches to one. But that also feels wrong :/

  reply	other threads:[~2017-10-18  6:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 20:05 [patch net-next 00/20] net: sched: convert cls ndo_setup_tc offload calls to per-block callbacks Jiri Pirko
2017-10-17 20:05 ` [patch net-next 01/20] net: sched: add block bind/unbind notif. and extended block_get/put Jiri Pirko
2017-10-17 20:22   ` Duyck, Alexander H
2017-10-18  6:59     ` Jiri Pirko [this message]
2017-10-19 12:23   ` David Miller
2017-10-19 13:13     ` Jiri Pirko
2017-10-17 20:05 ` [patch net-next 02/20] net: sched: use extended variants of block_get/put in ingress and clsact qdiscs Jiri Pirko
2017-10-17 20:05 ` [patch net-next 03/20] net: sched: introduce per-block callbacks Jiri Pirko
2017-10-17 20:05 ` [patch net-next 04/20] net: sched: use tc_setup_cb_call to call " Jiri Pirko
2017-10-17 20:06 ` [patch net-next 05/20] net: sched: cls_matchall: call block callbacks for offload Jiri Pirko
2017-10-17 20:06 ` [patch net-next 06/20] net: sched: cls_u32: swap u32_remove_hw_knode and u32_remove_hw_hnode Jiri Pirko
2017-10-17 20:06 ` [patch net-next 07/20] net: sched: cls_u32: call block callbacks for offload Jiri Pirko
2017-10-17 20:06 ` [patch net-next 08/20] net: sched: cls_bpf: " Jiri Pirko
2017-10-17 20:06 ` [patch net-next 09/20] mlxsw: spectrum: Convert ndo_setup_tc offloads to block callbacks Jiri Pirko
2017-10-17 20:06 ` [patch net-next 10/20] mlx5e: " Jiri Pirko
2017-10-17 20:06 ` [patch net-next 11/20] bnxt: " Jiri Pirko
2017-10-17 20:06 ` [patch net-next 12/20] cxgb4: " Jiri Pirko
2017-10-17 20:06 ` [patch net-next 13/20] ixgbe: " Jiri Pirko
2017-10-17 20:06 ` [patch net-next 14/20] mlx5e_rep: " Jiri Pirko
2017-10-17 20:06 ` [patch net-next 15/20] nfp: flower: " Jiri Pirko
2017-10-17 20:06 ` [patch net-next 16/20] nfp: bpf: " Jiri Pirko
2017-10-17 20:06 ` [patch net-next 17/20] dsa: " Jiri Pirko
2017-10-17 20:06 ` [patch net-next 18/20] net: sched: avoid ndo_setup_tc calls for TC_SETUP_CLS* Jiri Pirko
2017-10-17 20:06 ` [patch net-next 19/20] net: sched: remove unused classid field from tc_cls_common_offload Jiri Pirko
2017-10-17 20:06 ` [patch net-next 20/20] net: sched: remove unused is_classid_clsact_ingress/egress helpers Jiri Pirko

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=20171018065925.GA2028@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=alexander.h.duyck@intel.com \
    --cc=andrew@lunn.ch \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=f.fainelli@gmail.com \
    --cc=ganeshgr@chelsio.com \
    --cc=idosch@mellanox.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jhs@mojatatu.com \
    --cc=john.hurley@netronome.com \
    --cc=leonro@mellanox.com \
    --cc=michael.chan@broadcom.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=simon.horman@netronome.com \
    --cc=xiyou.wangcong@gmail.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;
as well as URLs for NNTP newsgroup(s).