[patch net-next repost 2/2] mlxsw: spectrum: Propagate extack further for bridge enslavements

2017-10-08 Thread Jiri Pirko
name enp1s0np1.20 type vlan id 20 $ ip link add name br0 type bridge $ ip link set dev enp1s0np1.10 master br0 $ ip link set dev enp1s0np1.20 master br0 Error: spectrum: Can not bridge VLAN uppers of the same port. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Acked-by: David Ahern

[patch net-next v2 3/5] mlxsw: spectrum: router: Export the mlxsw_sp_router_port function

2017-10-09 Thread Jiri Pirko
-by: Nogah Frankel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b

[patch net-next v2 1/5] net: bridge: Notify on bridge device mrouter state changes

2017-10-09 Thread Jiri Pirko
s the switchdev_attr.u.mrouter boolean flag to indicate the current bridge mrouter status. Thus, it only indicates whether the bridge is currently used as an mrouter or not, and does not indicate the exact mrouter state of the bridge (learning, permanent, etc.). Signed-off-by: Yotam Gigi Signed-off-by: Jiri

[patch net-next v2 5/5] mlxsw: spectrum_switchdev: Support bridge mrouter notifications

2017-10-09 Thread Jiri Pirko
port. Signed-off-by: Yotam Gigi Reviewed-by: Nogah Frankel Signed-off-by: Jiri Pirko --- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 65 +- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/driver

[patch net-next v2 4/5] mlxsw: spectrum_switchdev: Add support for router port in SMID entries

2017-10-09 Thread Jiri Pirko
notifications. Signed-off-by: Yotam Gigi Reviewed-by: Nogah Frankel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers

[patch net-next v2 2/5] net: bridge: Export bridge multicast router state

2017-10-09 Thread Jiri Pirko
change in packet RX path, take the multicast_router bridge spinlock to protect the read. Signed-off-by: Yotam Gigi Reviewed-by: Nogah Frankel Reviewed-by: Nikolay Aleksandrov Signed-off-by: Jiri Pirko --- include/linux/if_bridge.h | 5 + net/bridge/br_multicast.c | 12 2 files

[patch net-next v2 0/5] mlxsw: Offload bridge device mrouter

2017-10-09 Thread Jiri Pirko
From: Jiri Pirko Yotam says: Similarly to a bridged port, the bridge device itself can be configured by the user to be an mrouter port. In this case, all multicast traffic should be forwarded to it. Make the mlxsw Spectrum driver offload these directives to the Spectrum hardware. Patches 1 and

[patch net-next 1/4] net: sched: make tc_action_ops->get_dev return dev and avoid passing net

2017-10-10 Thread Jiri Pirko
From: Jiri Pirko Return dev directly, NULL if not possible. That is enough. Makes no sense to pass struct net * to get_dev op, as there is only one net possible, the one the action was created in. So just store it in mirred priv and use directly. Rename the mirred op callback function. Signed

[patch net-next 4/4] net: sched: remove unused tcf_exts_get_dev helper and cls_flower->egress_dev

2017-10-10 Thread Jiri Pirko
From: Jiri Pirko The helper and the struct field ares no longer used by any code, so remove them. Signed-off-by: Jiri Pirko --- include/net/pkt_cls.h | 3 --- net/sched/cls_api.c | 22 -- 2 files changed, 25 deletions(-) diff --git a/include/net/pkt_cls.h b/include/net

[patch net-next 3/4] net: sched: convert cls_flower->egress_dev users to tc_setup_cb_egdev infra

2017-10-10 Thread Jiri Pirko
From: Jiri Pirko The only user of cls_flower->egress_dev is mlx5. So do the conversion there alongside with the code originating the call in cls_flower function fl_hw_replace_filter to the newly introduced egress device callback infrastucture. Signed-off-by: Jiri Pirko --- drivers/

[patch net-next 2/4] net: sched: introduce per-egress action device callbacks

2017-10-10 Thread Jiri Pirko
From: Jiri Pirko Introduce infrastructure that allows drivers to register callbacks that are called whenever tc would offload inserted rule and specified device acts as tc action egress device. Signed-off-by: Jiri Pirko --- include/net/act_api.h | 34 + include/net/pkt_cls.h | 2

[patch net-next 0/4] net: sched: get rid of cls_flower->egress_dev

2017-10-10 Thread Jiri Pirko
From: Jiri Pirko Introduction of cls_flower->egress_dev was a workaround. Turned out to be a bit ugly hack. So replace it with more generic and reusable infrastructure. This is a dependency of shared block introduction that will be send as a follow-up patchsets group. Jiri Pirko (4):

Re: [patch net-next 2/4] net: sched: introduce per-egress action device callbacks

2017-10-10 Thread Jiri Pirko
Tue, Oct 10, 2017 at 03:31:59PM CEST, david.lai...@aculab.com wrote: >From: Jiri Pirko >> Sent: 10 October 2017 08:30 >> Introduce infrastructure that allows drivers to register callbacks that >> are called whenever tc would offload inserted rule and specified device >&g

Re: [patch net-next 2/4] net: sched: introduce per-egress action device callbacks

2017-10-10 Thread Jiri Pirko
Tue, Oct 10, 2017 at 05:12:34PM CEST, david.lai...@aculab.com wrote: >From: Jiri Pirko >> Sent: 10 October 2017 15:32 >> To: David Laight >> Cc: netdev@vger.kernel.org; da...@davemloft.net; j...@mojatatu.com; >> xiyou.wangc...@gmail.com; >> sae...@mella

Re: [patch net-next 0/4] net: sched: get rid of cls_flower->egress_dev

2017-10-10 Thread Jiri Pirko
Tue, Oct 10, 2017 at 07:24:21PM CEST, gerlitz...@gmail.com wrote: >Jiri, > >FWIW, as I reported to you earlier, I was playing with tc encap/decap rules >on 4.14-rc+ (net) before >applying any patch of this series, and something is messy w.r.t to decap >rules. I don't see >them removed at all when u

Re: [patch net-next 3/4] net: sched: convert cls_flower->egress_dev users to tc_setup_cb_egdev infra

2017-10-10 Thread Jiri Pirko
Tue, Oct 10, 2017 at 10:08:23PM CEST, gerlitz...@gmail.com wrote: >On Tue, Oct 10, 2017 at 10:30 AM, Jiri Pirko wrote: >> The only user of cls_flower->egress_dev is mlx5. > >but nfp supports decap action offload too and from the flower code >stand point, I guess they are both

Re: [patch net-next 1/4] net: sched: make tc_action_ops->get_dev return dev and avoid passing net

2017-10-10 Thread Jiri Pirko
Tue, Oct 10, 2017 at 07:44:53PM CEST, xiyou.wangc...@gmail.com wrote: >On Tue, Oct 10, 2017 at 12:30 AM, Jiri Pirko wrote: >> -static int tcf_mirred_device(const struct tc_action *a, struct net *net, >> -struct net_device **mirred_dev) >> +sta

Re: [patch net-next 0/4] net: sched: get rid of cls_flower->egress_dev

2017-10-10 Thread Jiri Pirko
Tue, Oct 10, 2017 at 11:46:22PM CEST, gerlitz...@gmail.com wrote: >On Wed, Oct 11, 2017 at 12:13 AM, Jiri Pirko wrote: >> Tue, Oct 10, 2017 at 07:24:21PM CEST, gerlitz...@gmail.com wrote: > >> Or, as I replied to you earlier, the issue you describe is totally >> unrelated

Re: [next-queue PATCH v5 3/5] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-10 Thread Jiri Pirko
Wed, Oct 11, 2017 at 02:43:58AM CEST, vinicius.go...@intel.com wrote: >This queueing discipline implements the shaper algorithm defined by >the 802.1Q-2014 Section 8.6.8.2 and detailed in Annex L. > >It's primary usage is to apply some bandwidth reservation to user >defined traffic classes, which a

Re: [next-queue PATCH v5 4/5] net/sched: Add support for HW offloading for CBS

2017-10-11 Thread Jiri Pirko
Wed, Oct 11, 2017 at 02:43:59AM CEST, vinicius.go...@intel.com wrote: >This adds support for offloading the CBS algorithm to the controller, >if supported. Oh, so you have it as a separate patch, yet some bits left in the previous one... > >Signed-off-by: Vinicius Costa Gomes >--- > net/sched/s

[patch net-next v2 3/4] net: sched: convert cls_flower->egress_dev users to tc_setup_cb_egdev infra

2017-10-11 Thread Jiri Pirko
From: Jiri Pirko The only user of cls_flower->egress_dev is mlx5. So do the conversion there alongside with the code originating the call in cls_flower function fl_hw_replace_filter to the newly introduced egress device callback infrastucture. Signed-off-by: Jiri Pirko --- drivers/

[patch net-next v2 0/4] net: sched: get rid of cls_flower->egress_dev

2017-10-11 Thread Jiri Pirko
From: Jiri Pirko Introduction of cls_flower->egress_dev was a workaround. Turned out to be a bit ugly hack. So replace it with more generic and reusable infrastructure. This is a dependency of shared block introduction that will be send as a follow-up patchsets group. --- v1->v2: -

[patch net-next v2 1/4] net: sched: make tc_action_ops->get_dev return dev and avoid passing net

2017-10-11 Thread Jiri Pirko
From: Jiri Pirko Return dev directly, NULL if not possible. That is enough. Makes no sense to pass struct net * to get_dev op, as there is only one net possible, the one the action was created in. So just store it in mirred priv and use directly. Rename the mirred op callback function. Signed

[patch net-next v2 2/4] net: sched: introduce per-egress action device callbacks

2017-10-11 Thread Jiri Pirko
From: Jiri Pirko Introduce infrastructure that allows drivers to register callbacks that are called whenever tc would offload inserted rule and specified device acts as tc action egress device. Signed-off-by: Jiri Pirko --- v1->v2: - take rtnl for register/unregister --- include/net/act_ap

[patch net-next v2 4/4] net: sched: remove unused tcf_exts_get_dev helper and cls_flower->egress_dev

2017-10-11 Thread Jiri Pirko
From: Jiri Pirko The helper and the struct field ares no longer used by any code, so remove them. Signed-off-by: Jiri Pirko --- include/net/pkt_cls.h | 3 --- net/sched/cls_api.c | 22 -- 2 files changed, 25 deletions(-) diff --git a/include/net/pkt_cls.h b/include/net

Re: [jkirsher/next-queue PATCH v4 0/6] tc-flower based cloud filters in i40e

2017-10-11 Thread Jiri Pirko
Wed, Oct 11, 2017 at 02:24:12AM CEST, amritha.namb...@intel.com wrote: >This patch series enables configuring cloud filters in i40e >using the tc-flower classifier. The classification function >of the filter is to match a packet to a class. cls_flower is >extended to offload classid to hardware. Th

Re: [E] Re: [PATCH net-next 1/2] net sched act_vlan: Change stats update to use per-core stats

2017-10-11 Thread Jiri Pirko
Wed, Oct 11, 2017 at 02:35:50PM CEST, manish.ku...@verizon.com wrote: >Hi Jamal, Yes, that's an indentation mismatch - I put in one tab too many. >Shall fix before commit. No top-posting please! > >Thanks, > >-Manish > >-Original Message- >From: Jamal Hadi Salim [mailto:j...@mojatatu.co

Re: [PATCH net-next 2/2] net sched act_vlan: VLAN action rewrite to use RCU lock/unlock and update

2017-10-11 Thread Jiri Pirko
Wed, Oct 11, 2017 at 04:33:39AM CEST, kurup.man...@gmail.com wrote: >Using a spinlock in the VLAN action causes performance issues when the VLAN >action is used on multiple cores. Rewrote the VLAN action to use RCU read >locking for reads and updates instead. > >Signed-off-by: Manish Kurup >--- >

Re: [PATCH net-next 1/2] net sched act_vlan: Change stats update to use per-core stats

2017-10-11 Thread Jiri Pirko
skb_pull_rcsum(skb, skb->mac_len); >@@ -172,7 +174,7 @@ static int tcf_vlan_init(struct net *net, struct nlattr >*nla, > > if (!exists) { > ret = tcf_idr_create(tn, parm->index, est, a, >- &act_vlan_ops, bind, false); >+ &act_vlan_ops, bind, true); Please fix this indent nit as pointed out by Jamal. Feel free to add my tag: Acked-by: Jiri Pirko Thanks!

Re: [jkirsher/next-queue PATCH v4 0/6] tc-flower based cloud filters in i40e

2017-10-11 Thread Jiri Pirko
Wed, Oct 11, 2017 at 07:46:27PM CEST, alexander.du...@gmail.com wrote: >On Wed, Oct 11, 2017 at 5:56 AM, Jiri Pirko wrote: >> Wed, Oct 11, 2017 at 02:24:12AM CEST, amritha.namb...@intel.com wrote: >>>This patch series enables configuring cloud filters in i40e >>>usi

Re: [PATCH net-next 2/2] net sched act_vlan: VLAN action rewrite to use RCU lock/unlock and update

2017-10-11 Thread Jiri Pirko
Wed, Oct 11, 2017 at 06:27:07PM CEST, xiyou.wangc...@gmail.com wrote: >On Tue, Oct 10, 2017 at 7:33 PM, Manish Kurup wrote: [...] >> @@ -187,16 +196,33 @@ static int tcf_vlan_init(struct net *net, struct >> nlattr *nla, >> >> v = to_vlan(*a); >> >> - spin_lock_bh(&v->tcf_lock); >

Re: [patch net-next 1/4] net: sched: make tc_action_ops->get_dev return dev and avoid passing net

2017-10-11 Thread Jiri Pirko
Wed, Oct 11, 2017 at 06:34:51PM CEST, xiyou.wangc...@gmail.com wrote: >On Tue, Oct 10, 2017 at 2:19 PM, Jiri Pirko wrote: >> Tue, Oct 10, 2017 at 07:44:53PM CEST, xiyou.wangc...@gmail.com wrote: >>>On Tue, Oct 10, 2017 at 12:30 AM, Jiri Pirko wrote: >>>> -stat

Re: [jkirsher/next-queue PATCH v4 0/6] tc-flower based cloud filters in i40e

2017-10-11 Thread Jiri Pirko
Wed, Oct 11, 2017 at 10:46:52PM CEST, da...@davemloft.net wrote: >From: Jiri Pirko >Date: Wed, 11 Oct 2017 22:38:32 +0200 > >> Wed, Oct 11, 2017 at 07:46:27PM CEST, alexander.du...@gmail.com wrote: >>>On Wed, Oct 11, 2017 at 5:56 AM, Jiri Pirko wrote: >>>>

Re: [jkirsher/next-queue PATCH v4 0/6] tc-flower based cloud filters in i40e

2017-10-11 Thread Jiri Pirko
Wed, Oct 11, 2017 at 11:19:29PM CEST, da...@davemloft.net wrote: >From: Jiri Pirko >Date: Wed, 11 Oct 2017 22:58:30 +0200 > >> Well if I see classid, I expect it should refer to qdisc instance. So >> far, this has been always a case. But for some drivers, this would mean

Re: [jkirsher/next-queue PATCH v4 0/6] tc-flower based cloud filters in i40e

2017-10-12 Thread Jiri Pirko
Thu, Oct 12, 2017 at 09:05:10AM CEST, alexander.du...@gmail.com wrote: >On Wed, Oct 11, 2017 at 1:58 PM, Jiri Pirko wrote: >> Wed, Oct 11, 2017 at 10:46:52PM CEST, da...@davemloft.net wrote: >>>From: Jiri Pirko >>>Date: Wed, 11 Oct 2017 22:38:32 +0200 >>>

Re: [RFC 1/3] devlink: Add config parameter get/set operations

2017-10-12 Thread Jiri Pirko
Thu, Oct 12, 2017 at 03:34:20PM CEST, steven.l...@broadcom.com wrote: >Add support for config parameter get/set commands. Initially used by >bnxt driver, but other drivers can use the same, or new, attributes. >The config_get() and config_set() operations operate as expected, but >note that the dri

Re: [RFC 1/3] devlink: Add config parameter get/set operations

2017-10-12 Thread Jiri Pirko
Thu, Oct 12, 2017 at 03:34:20PM CEST, steven.l...@broadcom.com wrote: >+ >+ /* When config doesn't take effect until next reboot (config >+ * just changed NVM which isn't read until boot, for example), >+ * this attribute should be set by the driver. >+ */ >+ DEVLINK_ATT

Re: [RFC 0/3] Adding config get/set to devlink

2017-10-12 Thread Jiri Pirko
Thu, Oct 12, 2017 at 04:35:10PM CEST, ro...@cumulusnetworks.com wrote: >On Thu, Oct 12, 2017 at 6:34 AM, Steve Lin wrote: >> Adds a devlink command for getting & setting device configuration >> parameters, and enumerates a bunch of those parameters as devlink >> attributes. Also introduces an att

Re: [RFC 0/3] Adding config get/set to devlink

2017-10-12 Thread Jiri Pirko
Thu, Oct 12, 2017 at 04:46:24PM CEST, ro...@cumulusnetworks.com wrote: >On Thu, Oct 12, 2017 at 7:40 AM, Jiri Pirko wrote: >> Thu, Oct 12, 2017 at 04:35:10PM CEST, ro...@cumulusnetworks.com wrote: >>>On Thu, Oct 12, 2017 at 6:34 AM, Steve Lin wrote: >>>> Adds

[patch net-next 21/34] mlx5e: Convert ndo_setup_tc offloads to block callbacks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for flower offloads to block callbacks. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c

[patch net-next 34/34] net: sched: allow ingress and clsact qdiscs to share filter blocks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Benefit from the previously introduced shared filter blocks infrastructure and allow ingress and clsact qdisc instances to share filter blocks. The block index is coming from userspace as qdisc option. Signed-off-by: Jiri Pirko --- include/uapi/linux/pkt_sched.h | 12

[patch net-next 26/34] nfp: flower: Convert ndo_setup_tc offloads to block callbacks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for flower offloads to block callbacks. Signed-off-by: Jiri Pirko --- .../net/ethernet/netronome/nfp/flower/offload.c| 56 ++ 1 file changed, 48 insertions

[patch net-next 00/34] net: sched: allow qdiscs to share filter block instances

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko First of all, I would like to apologize for big patchset. However after couple of hours trying to figure out how to cut it, I found out it is actually not possible. I would have to add some interface in one patchset and only use it in second, which is forbidden. Also, I would

[patch net-next 07/34] net: sched: cls_u32: use block instead of q in tc_u_common

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko tc_u_common is now per-q. With blocks, it has to be converted to be per-block. Signed-off-by: Jiri Pirko --- net/sched/cls_u32.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 094d224..b6d4606

[patch net-next 30/34] net: sched: remove unused classid field from tc_cls_common_offload

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko It is no longer used by the drivers, so remove it. Signed-off-by: Jiri Pirko --- include/net/pkt_cls.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 2e73832..1c8ef4f 100644 --- a/include/net/pkt_cls.h +++ b/include

[patch net-next 04/34] net: sched: teach tcf_bind/unbind_filter to use block->q

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Whenever the block->q is set, it can be used instead of tp->q as it contains the same value. When it is not set, which can't happen now but it might happen with the follow-up shared blocks introduction, the class is not set in the result. That would lead to a c

[patch net-next 02/34] net: sched: introduce support for multiple filter chain pointers registration

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko So far, there was possible only to register a single filter chain pointer to block->chain[0]. However, when the blocks will get shareable, we need to allow multiple filter chain pointers registration. Signed-off-by: Jiri Pirko --- include/net/pkt_sched.h | 7 + incl

[patch net-next 32/34] net: sched: introduce block mechanism to handle netif_keep_dst calls

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Couple of classifiers call netif_keep_dst directly on q->dev. That is not possible to do directly for shared blocke where multiple qdiscs are owning the block. So introduce a infrastructure to keep track of the block owners in list and use this list to implement block variant

[patch net-next 12/34] net: sched: add block bind/unbind notification to drivers

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Introduce new type of ndo_setup_tc message to propage binding/unbinding of a block to binder. Signed-off-by: Jiri Pirko --- include/linux/netdevice.h | 1 + include/net/pkt_cls.h | 21 +++-- include/net/sch_generic.h | 1 + net/sched/cls_api.c | 33

[patch net-next 33/34] net: sched: remove classid and q fields from tcf_proto

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Both are no longer used, so remove them. Signed-off-by: Jiri Pirko --- include/net/sch_generic.h | 2 -- net/sched/cls_api.c | 7 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 17c908a

[patch net-next 31/34] net: sched: remove unused is_classid_clsact_ingress/egress helpers

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko These helpers are no longer in use by drivers, so remove them. Signed-off-by: Jiri Pirko --- include/net/pkt_sched.h | 13 - 1 file changed, 13 deletions(-) diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 2d234af..b8ecafc 100644 --- a/include

[patch net-next 29/34] net: sched: avoid ndo_setup_tc calls for TC_SETUP_CLS*

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko All drivers are converted to use block callbacks for TC_SETUP_CLS*. So it is now safe to remove the calls to ndo_setup_tc from cls_* Signed-off-by: Jiri Pirko --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 -- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c

[patch net-next 28/34] dsa: Convert ndo_setup_tc offloads to block callbacks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for matchall offloads to block callbacks. Signed-off-by: Jiri Pirko --- net/dsa/slave.c | 64 +++-- 1 file changed, 53 insertions

[patch net-next 15/34] net: sched: use tc_setup_cb_call to call per-block callbacks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Extend the tc_setup_cb_call entrypoint function originally used only for action egress devices callbacks to call per-block callbacks as well. Signed-off-by: Jiri Pirko --- include/net/pkt_cls.h | 4 ++-- net/sched/cls_api.c| 21 ++--- net/sched

[patch net-next 25/34] mlx5e_rep: Convert ndo_setup_tc offloads to block callbacks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for flower offloads to block callbacks. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 44 1 file changed, 38 insertions

[patch net-next 27/34] nfp: bpf: Convert ndo_setup_tc offloads to block callbacks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for bpf offloads to block callbacks. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/netronome/nfp/bpf/main.c| 53 +++- drivers/net/ethernet/netronome/nfp

[patch net-next 24/34] ixgbe: Convert ndo_setup_tc offloads to block callbacks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for u32 offloads to block callbacks. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 45 +++ 1 file changed, 39 insertions

[patch net-next 23/34] cxgb4: Convert ndo_setup_tc offloads to block callbacks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for flower and u32 offloads to block callbacks. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 45 + 1 file changed, 39

[patch net-next 16/34] net: sched: cls_matchall: call block callbacks for offload

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Use the newly introduced callbacks infrastructure and call block callbacks alongside with the existing per-netdev ndo_setup_tc. Signed-off-by: Jiri Pirko --- net/sched/cls_matchall.c | 72 ++-- 1 file changed, 45 insertions(+), 27

[patch net-next 22/34] bnxt: Convert ndo_setup_tc offloads to block callbacks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for flower offloads to block callbacks. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 37 +++ drivers/net/ethernet/broadcom/bnxt

[patch net-next 18/34] net: sched: cls_u32: call block callbacks for offload

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Use the newly introduced callbacks infrastructure and call block callbacks alongside with the existing per-netdev ndo_setup_tc. Signed-off-by: Jiri Pirko --- net/sched/cls_u32.c | 72 ++--- 1 file changed, 52 insertions(+), 20

[patch net-next 17/34] net: sched: cls_u32: swap u32_remove_hw_knode and u32_remove_hw_hnode

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- net/sched/cls_u32.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index b6d4606..f407f13 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c @@ -462,7 +462,7

[patch net-next 20/34] mlxsw: spectrum: Convert ndo_setup_tc offloads to block callbacks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for matchall and flower offloads to block callbacks. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 82 +++--- 1 file changed, 60

[patch net-next 13/34] net: sched: introduce per-block callbacks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Introduce infrastructure that allows drivers to register callbacks that are called whenever tc would offload inserted rule for a specific block. Signed-off-by: Jiri Pirko --- include/net/pkt_cls.h | 81 include/net/sch_generic.h | 1

[patch net-next 14/34] net: sched: use extended variants of block get and put in ingress and clsact qdiscs

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Use previously introduced extended variants of block get and put functions. This allows to specify a binder types specific to clsact ingress/egress which is useful for drivers to distinguish who actually got the block. Signed-off-by: Jiri Pirko --- include/net/pkt_cls.h

[patch net-next 19/34] net: sched: cls_bpf: call block callbacks for offload

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Use the newly introduced callbacks infrastructure and call block callbacks alongside with the existing per-netdev ndo_setup_tc. Signed-off-by: Jiri Pirko --- net/sched/cls_bpf.c | 40 1 file changed, 32 insertions(+), 8 deletions

[patch net-next 11/34] net: sched: propagate q and parent from caller down to tcf_fill_node

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko The callers have this info, they will pass it down to tcf_fill_node. Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 55 ++--- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/net/sched/cls_api.c b/net/sched

[patch net-next 08/34] net: sched: avoid usage of tp->q in tcf_classify

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Use block index in the messages instead. Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 2d0f18f..b1bcc8b 100644 --- a/net/sched/cls_api.c +++ b/net

[patch net-next 05/34] net: sched: ematch: obtain net pointer from blocks

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Instead of using tp->q, use block to get the net pointer. Signed-off-by: Jiri Pirko --- net/sched/ematch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 03b677b..1331a4c 100644 --- a/net/sched/ematch.c ++

[patch net-next 09/34] net: sched: tcindex, fw, flow: use tcf_block_q helper to get struct Qdisc

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Use helper to get q pointer per block. Signed-off-by: Jiri Pirko --- net/sched/cls_flow.c| 7 +-- net/sched/cls_fw.c | 5 - net/sched/cls_tcindex.c | 5 - 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/net/sched/cls_flow.c b/net/sched

[patch net-next 01/34] net: sched: store Qdisc pointer in struct block

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Prepare for removal of tp->q and store Qdisc pointer in the block structure. Signed-off-by: Jiri Pirko --- include/net/pkt_cls.h | 4 ++-- include/net/sch_generic.h | 1 + net/sched/cls_api.c | 3 ++- net/sched/sch_atm.c | 4 ++-- net/sched/sch_cbq.c

[patch net-next 03/34] net: sched: introduce shared filter blocks infrastructure

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Allow qdiscs to share filter blocks among them. Each qdisc type has to use block get/put modifications that enable sharing. Shared blocks are tracked within each net namespace and identified by u32 value. This value is auto-generated in case user did not pass it from userspace

[patch net-next 06/34] net: core: use dev->ingress_queue instead of tp->q

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko In sch_handle_egress and sch_handle_ingress, don't use tp->q and use dev->ingress_queue which stores the same pointer instead. Signed-off-by: Jiri Pirko --- net/core/dev.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git

[patch net-next 10/34] net: sched: use tcf_block_q helper to get q pointer for sch_tree_lock

2017-10-12 Thread Jiri Pirko
From: Jiri Pirko Use tcf_block_q helper to get q pointer to be used for direct call of sch_tree_lock/unlock instead of tcf_tree_lock/unlock. Signed-off-by: Jiri Pirko --- include/net/sch_generic.h | 3 --- net/sched/sch_api.c | 6 -- 2 files changed, 4 insertions(+), 5 deletions

Re: [patch net-next 00/34] net: sched: allow qdiscs to share filter block instances

2017-10-12 Thread Jiri Pirko
Thu, Oct 12, 2017 at 07:21:48PM CEST, da...@davemloft.net wrote: > >Jiri I'm not looking at a 34 patch set, it's too large. > >Break this up into groups of a dozen or so patches each, no >more. Submit them one at a time and wait for each series >to be fully reviewed and integrated before moving on

Re: [patch net-next 00/34] net: sched: allow qdiscs to share filter block instances

2017-10-12 Thread Jiri Pirko
Thu, Oct 12, 2017 at 11:37:30PM CEST, dsah...@gmail.com wrote: >On 10/12/17 11:17 AM, Jiri Pirko wrote: >> So back to the example. First, we create 2 qdiscs. Both will share >> block number 22. "22" is just an identification. If we don't pass any >> block nu

Re: [patch net-next 06/34] net: core: use dev->ingress_queue instead of tp->q

2017-10-12 Thread Jiri Pirko
Thu, Oct 12, 2017 at 11:45:43PM CEST, dan...@iogearbox.net wrote: >On 10/12/2017 07:17 PM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> In sch_handle_egress and sch_handle_ingress, don't use tp->q and use >> dev->ingress_queue which stores the same point

Re: [RFC 1/3] devlink: Add config parameter get/set operations

2017-10-13 Thread Jiri Pirko
Thu, Oct 12, 2017 at 08:12:48PM CEST, andrew.gospoda...@broadcom.com wrote: >On Thu, Oct 12, 2017 at 04:03:17PM +0200, Jiri Pirko wrote: >> Thu, Oct 12, 2017 at 03:34:20PM CEST, steven.l...@broadcom.com wrote: >> >Add support for config parameter get/set commands. Initially used

Re: [RFC 0/3] Adding config get/set to devlink

2017-10-13 Thread Jiri Pirko
Thu, Oct 12, 2017 at 10:12:31PM CEST, steven.l...@broadcom.com wrote: >On Thu, Oct 12, 2017 at 3:20 PM, Florian Fainelli wrote: >> On 10/12/2017 12:06 PM, David Miller wrote: >>> From: Florian Fainelli >>> Date: Thu, 12 Oct 2017 08:43:59 -0700 >>> Once we move ethtool (or however we name its

Re: [RFC 0/3] Adding config get/set to devlink

2017-10-13 Thread Jiri Pirko
Thu, Oct 12, 2017 at 11:53:56PM CEST, ro...@cumulusnetworks.com wrote: >On Thu, Oct 12, 2017 at 12:20 PM, Florian Fainelli >wrote: >> On 10/12/2017 12:06 PM, David Miller wrote: >>> From: Florian Fainelli >>> Date: Thu, 12 Oct 2017 08:43:59 -0700 >>> Once we move ethtool (or however we name

Re: [patch net-next 00/34] net: sched: allow qdiscs to share filter block instances

2017-10-13 Thread Jiri Pirko
Fri, Oct 13, 2017 at 08:31:53AM CEST, da...@davemloft.net wrote: >From: Jiri Pirko >Date: Fri, 13 Oct 2017 08:21:01 +0200 > >> Thu, Oct 12, 2017 at 07:21:48PM CEST, da...@davemloft.net wrote: >>> >>>Jiri I'm not looking at a 34 patch set, it's too l

[patch net-next 0/9] net: sched: remove some tp->q usage

2017-10-13 Thread Jiri Pirko
From: Jiri Pirko In order to prepare for block sharing, tcf_proto instances need to be independent on particular qdisc instances. This patchset takes care of removal of couple occurrences of tp->q usage. Jiri Pirko (9): net: sched: store Qdisc pointer in struct block net: sched: store

[patch net-next 7/9] net: sched: tcindex, fw, flow: use tcf_block_q helper to get struct Qdisc

2017-10-13 Thread Jiri Pirko
From: Jiri Pirko Use helper to get q pointer per block. Signed-off-by: Jiri Pirko --- net/sched/cls_flow.c| 7 +-- net/sched/cls_fw.c | 5 - net/sched/cls_tcindex.c | 5 - 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/net/sched/cls_flow.c b/net/sched

[patch net-next 8/9] net: sched: use tcf_block_q helper to get q pointer for sch_tree_lock

2017-10-13 Thread Jiri Pirko
From: Jiri Pirko Use tcf_block_q helper to get q pointer to be used for direct call of sch_tree_lock/unlock instead of tcf_tree_lock/unlock. Signed-off-by: Jiri Pirko --- include/net/sch_generic.h | 3 --- net/sched/sch_api.c | 6 -- 2 files changed, 4 insertions(+), 5 deletions

[patch net-next 1/9] net: sched: store Qdisc pointer in struct block

2017-10-13 Thread Jiri Pirko
From: Jiri Pirko Prepare for removal of tp->q and store Qdisc pointer in the block structure. Signed-off-by: Jiri Pirko --- include/net/pkt_cls.h | 4 ++-- include/net/sch_generic.h | 1 + net/sched/cls_api.c | 3 ++- net/sched/sch_atm.c | 4 ++-- net/sched/sch_cbq.c

[patch net-next 9/9] net: sched: propagate q and parent from caller down to tcf_fill_node

2017-10-13 Thread Jiri Pirko
From: Jiri Pirko The callers have this info, they will pass it down to tcf_fill_node. Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 55 ++--- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/net/sched/cls_api.c b/net/sched

[patch net-next 6/9] net: sched: cls_u32: use block instead of q in tc_u_common

2017-10-13 Thread Jiri Pirko
From: Jiri Pirko tc_u_common is now per-q. With blocks, it has to be converted to be per-block. Signed-off-by: Jiri Pirko --- net/sched/cls_u32.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 094d224..b6d4606

[patch net-next 5/9] net: sched: ematch: obtain net pointer from blocks

2017-10-13 Thread Jiri Pirko
From: Jiri Pirko Instead of using tp->q, use block to get the net pointer. Signed-off-by: Jiri Pirko --- net/sched/ematch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 03b677b..1331a4c 100644 --- a/net/sched/ematch.c ++

[patch net-next 3/9] net: sched: introduce tcf_block_q and tcf_block_dev helpers

2017-10-13 Thread Jiri Pirko
From: Jiri Pirko These helpers allows to get a q and netdev pointers for given block easily. Signed-off-by: Jiri Pirko --- include/net/pkt_cls.h | 21 + 1 file changed, 21 insertions(+) diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 772dfa8..01ffda5

[patch net-next 4/9] net: sched: teach tcf_bind/unbind_filter to use block->q

2017-10-13 Thread Jiri Pirko
From: Jiri Pirko Whenever the block->q is set, it can be used instead of tp->q as it contains the same value. When it is not set, which can't happen now but it might happen with the follow-up shared blocks introduction, the class is not set in the result. That would lead to a c

[patch net-next 2/9] net: sched: store net pointer in block and introduce qdisc_net helper

2017-10-13 Thread Jiri Pirko
From: Jiri Pirko Store net pointer in the block structure. Along the way, introduce qdisc_net helper which allows to easily obtain net pointer for qdisc instance. Signed-off-by: Jiri Pirko --- include/net/pkt_sched.h | 7 +++ include/net/sch_generic.h | 1 + net/sched/cls_api.c

Re: [patch net-next 00/34] net: sched: allow qdiscs to share filter block instances

2017-10-13 Thread Jiri Pirko
Fri, Oct 13, 2017 at 04:20:38PM CEST, dsah...@gmail.com wrote: >On 10/13/17 12:26 AM, Jiri Pirko wrote: >> Thu, Oct 12, 2017 at 11:37:30PM CEST, dsah...@gmail.com wrote: >>> On 10/12/17 11:17 AM, Jiri Pirko wrote: >>>> So back to the example. First, we create 2 qdis

Re: [patch net-next 06/34] net: core: use dev->ingress_queue instead of tp->q

2017-10-14 Thread Jiri Pirko
Sun, Oct 15, 2017 at 01:18:54AM CEST, dan...@iogearbox.net wrote: >On 10/13/2017 08:30 AM, Jiri Pirko wrote: >> Thu, Oct 12, 2017 at 11:45:43PM CEST, dan...@iogearbox.net wrote: >> > On 10/12/2017 07:17 PM, Jiri Pirko wrote: >> > > From: Jiri Pirko >>

Re: [PATCH net] net/sched: cls_flower: Set egress_dev mark when calling into the HW driver

2017-10-16 Thread Jiri Pirko
ever the ingress device is >different from the hw device since this is exactly the condition under >which we're calling into the HW driver through the egress port net-device. > >Fixes: de4784ca030f ('net: sched: get rid of struct tc_to_netdev') >Signed-off-by: Or Gerlitz >Signed-off-by: Roi Dayan Acked-by: Jiri Pirko

[patch net-next 3/5] mlxsw: spectrum: Support decap-only IP-in-IP tunnels

2017-10-16 Thread Jiri Pirko
f-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 ++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 105 +++-- 3 files changed, 109

[patch net-next 0/5] mlxsw: GRE: Offload decap without encap

2017-10-16 Thread Jiri Pirko
From: Jiri Pirko Petr says: The current code doesn't offload GRE decapsulation unless there's a corresponding encapsulation route as well. While not strictly incorrect (when encap route is absent, the decap route traps traffic to CPU and the kernel handles it), it's a miss

[patch net-next 5/5] mlxsw: spectrum: Drop refcounting of IPIP entries

2017-10-16 Thread Jiri Pirko
unlinks the IPIP entry from a next hop. Thus no dangling pointers are left behind for the brief window after netdevice is gone, but routes not yet. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko --- .../net/ethernet/mellanox/mlxsw/spectrum_ipip.h| 1 - .../net

[patch net-next 2/5] mlxsw: spectrum_router: Move mlxsw_sp_netdev_ipip_type()

2017-10-16 Thread Jiri Pirko
From: Petr Machata Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko --- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw

[patch net-next 4/5] mlxsw: spectrum: Support IPIP overlay VRF migration

2017-10-16 Thread Jiri Pirko
sure that the loopback is updated as necessary. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 +- .../net/ethernet/mellanox/mlxsw

[patch net-next 1/5] mlxsw: spectrum: Move netdevice NB to struct mlxsw_sp

2017-10-16 Thread Jiri Pirko
sp or router data structures from the handler is inconvenient. Therefore move the netdevice notifier blocks from global scope to struct mlxsw_sp to allow retrieval from the notifier block pointer itself. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko --- driver

<    5   6   7   8   9   10   11   12   13   14   >