Re: [PATCHv3 net-next 4/7] net: sched: cls: add extack support for tcf_exts_validate

2018-01-18 Thread Jiri Pirko
>Furthermore the tcf_exts_validate will call action init callback which >prepares the TC action subsystem for extack support. > >Cc: David Ahern <dsah...@gmail.com> >Signed-off-by: Alexander Aring <ar...@mojatatu.com> Acked-by: Jiri Pirko <j...@mellanox.com>

Re: [PATCHv3 net-next 2/7] net: sched: cls_api: handle generic cls errors

2018-01-18 Thread Jiri Pirko
-by: Alexander Aring <ar...@mojatatu.com> Acked-by: Jiri Pirko <j...@mellanox.com>

Re: [PATCHv3 net-next 1/7] net: sched: cls: fix code style issues

2018-01-18 Thread Jiri Pirko
Thu, Jan 18, 2018 at 05:20:49PM CET, ar...@mojatatu.com wrote: >This patch changes some code style issues pointed out by checkpatch >inside the TC cls subsystem. > >Signed-off-by: Alexander Aring <ar...@mojatatu.com> Acked-by: Jiri Pirko <j...@mellanox.com>

Re: [patch net-next v2] net: sched: silence uninitialized parent variable warning in tc_dump_tfilter

2018-01-18 Thread Jiri Pirko
Thu, Jan 18, 2018 at 04:36:58PM CET, da...@davemloft.net wrote: >From: Jiri Pirko <j...@resnulli.us> >Date: Thu, 18 Jan 2018 16:14:49 +0100 > >> @@ -1317,6 +1317,13 @@ static int tc_dump_tfilter(struct sk_buff *skb, >> struct netlink_callback *cb) >>

[patch net-next v2] net: sched: silence uninitialized parent variable warning in tc_dump_tfilter

2018-01-18 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> When tcm->tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK, parent is still passed down but the value is never used. Compiler does not recognize it and issues a warning. Silence it down initializing parent to 0. Fixes: 7960d1daf278 ("net: sched: u

[patch net] mlxsw: spectrum_router: Free LPM tree upon failure

2018-01-18 Thread Jiri Pirko
router, since its reference count never transitions from 1 to 0. Fix that by taking a reference before binding the tree. Fixes: fc922bb0dd94 ("mlxsw: spectrum_router: Use one LPM tree for all virtual routers") Signed-off-by: Ido Schimmel <ido...@mellanox.com> Signed-off-by: Jiri Pi

Re: [PATCH] [net-next] net: sched: avoid uninitialized variable use

2018-01-18 Thread Jiri Pirko
Thu, Jan 18, 2018 at 03:19:14PM CET, a...@arndb.de wrote: >On Thu, Jan 18, 2018 at 2:49 PM, Jiri Pirko <j...@resnulli.us> wrote: >> Thu, Jan 18, 2018 at 02:17:28PM CET, a...@arndb.de wrote: >>>gcc has identified a code path in which we pass uninitialized >>>data i

Re: [PATCH] [net-next] net: sched: avoid uninitialized variable use

2018-01-18 Thread Jiri Pirko
Thu, Jan 18, 2018 at 02:17:28PM CET, a...@arndb.de wrote: >gcc has identified a code path in which we pass uninitialized >data into tc_dump_tfilter(): > >net/sched/cls_api.c: In function 'tc_dump_tfilter': >net/sched/cls_api.c:1268:8: error: 'parent' may be used uninitialized in this >function

[patch net-next] mlxsw: spectrum: Upper-bound supported FW version

2018-01-18 Thread Jiri Pirko
upper bound the version to prevent compatibility issues between current driver and some possible future fw. Signed-off-by: Yuval Mintz <yuv...@mellanox.com> Reviewed-by: Ido Schimmel <ido...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- drivers/net/ethernet/m

Re: [PATCH net+iproute2 0/2] nbyte, cmp and text filter fixups

2018-01-18 Thread Jiri Pirko
Thu, Jan 18, 2018 at 11:32:33AM CET, w.bumil...@proxmox.com wrote: >The iproute2 part allows the the actual use of the already existing >quoted string parsing. Makes no sense to send iproute2 patch which is not related with the kernel ones in the same set. Please send it separatelly. > >The

[patch net-next] net: sched: silence uninitialized parent variable warning in tc_dump_tfilter

2018-01-18 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> When tcm->tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK, parent is still passed down but the value is never used. Compiler does not recognize it and issues a warning. Silence it down initializing parent to 0. Reported-by: David Miller <da...@davemloft.n

Re: [RFC PATCH net-next 02/12] selftests: forwarding: Add a test for FDB learning

2018-01-17 Thread Jiri Pirko
Thu, Jan 18, 2018 at 08:16:54AM CET, ido...@idosch.org wrote: >On Wed, Jan 17, 2018 at 04:15:04PM -0800, David Ahern wrote: >> How about the attached - make ping, ping6 and mz variables? Default to >> ping and mausezahn but let users update that name if necessary. Comments >> in the sample config

Re: [PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread Jiri Pirko
Thu, Jan 18, 2018 at 12:06:57AM CET, f.faine...@gmail.com wrote: >From: David Decotigny > >Expose the number of times the link has been going UP or DOWN, and >update the "carrier_changes" counter to be the sum of these two events. >While at it, also update the sysfs-class-net

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

2018-01-17 Thread Jiri Pirko
Wed, Jan 17, 2018 at 10:33:32PM CET, da...@davemloft.net wrote: >From: Jiri Pirko <j...@resnulli.us> >Date: Wed, 17 Jan 2018 21:18:07 +0100 > >> Odd. I don't see this warning with: >> gcc version 6.4.1 20170727 (Red Hat 6.4.1-1) (GCC) > >Yeah, for reference I'm u

Re: [RFC PATCH net-next 02/12] selftests: forwarding: Add a test for FDB learning

2018-01-17 Thread Jiri Pirko
Wed, Jan 17, 2018 at 11:59:10PM CET, ro...@cumulusnetworks.com wrote: >On Wed, Jan 17, 2018 at 2:46 PM, Roopa Prabhu <ro...@cumulusnetworks.com> >wrote: >> On Wed, Jan 17, 2018 at 1:01 PM, Jiri Pirko <j...@resnulli.us> wrote: >>> Wed, Jan 17, 2018 at 09:48:

Re: [RFC PATCH net-next 02/12] selftests: forwarding: Add a test for FDB learning

2018-01-17 Thread Jiri Pirko
Wed, Jan 17, 2018 at 09:48:54PM CET, dsah...@gmail.com wrote: >On 1/15/18 11:18 AM, Ido Schimmel wrote: >> diff --git a/tools/testing/selftests/forwarding/lib.sh >> b/tools/testing/selftests/forwarding/lib.sh >> index bb423371f4de..264bf0af4c4d 100644 >> ---

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

2018-01-17 Thread Jiri Pirko
Wed, Jan 17, 2018 at 09:18:07PM CET, j...@resnulli.us wrote: >Wed, Jan 17, 2018 at 09:03:38PM CET, da...@davemloft.net wrote: >>From: David Miller <da...@davemloft.net> >>Date: Wed, 17 Jan 2018 14:55:35 -0500 (EST) >> >>> From: Jiri Pirko <j...@resnulli.

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

2018-01-17 Thread Jiri Pirko
Wed, Jan 17, 2018 at 09:03:38PM CET, da...@davemloft.net wrote: >From: David Miller <da...@davemloft.net> >Date: Wed, 17 Jan 2018 14:55:35 -0500 (EST) > >> From: Jiri Pirko <j...@resnulli.us> >> Date: Wed, 17 Jan 2018 11:46:44 +0100 >> >>> Currently

Re: [PATCH][devlink-next] devlink: make functions a couple of new functions static

2018-01-17 Thread Jiri Pirko
Wed, Jan 17, 2018 at 12:23:03PM CET, colin.k...@canonical.com wrote: >From: Colin Ian King > >The functions devlink_resource_find and devlink_resource_validate_children >are local to the source and do not need to be in global scope, so make >them static. > >Cleans up

Re: [PATCH net-next] devlink: Make some functions static

2018-01-17 Thread Jiri Pirko
_validate_children' was not declared. Should it be > static? > >Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> Acked-by: Jiri Pirko <j...@mellanox.com>

Re: [PATCH iproute2] devlink: Ignore unknown attributes

2018-01-17 Thread Jiri Pirko
Wed, Jan 17, 2018 at 02:28:00PM CET, arka...@mellanox.com wrote: >In case of extending the UAPI old packages would break. > >Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Acked-by: Jiri Pirko <j...@mellanox.com>

[patch net-next v11 08/13] net: sched: introduce ingress/egress block index attributes for qdisc

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Introduce two new attributes to be used for qdisc creation and dumping. One for ingress block, one for egress block. Introduce a set of ops that qdisc which supports block sharing would implement. Passing block indexes in qdisc change is not support

Re: [PATCH net-next v2] net: sched: red: don't reset the backlog on every stat dump

2018-01-17 Thread Jiri Pirko
eues 14 > >Recently RED offload was added. We need to make sure drivers don't >depend on resetting the stats. This means backlog should be treated >like any other statistic: > > total_stat = new_hw_stat - prev_hw_stat; > >Adjust mlxsw. > >Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Acked-by: Jiri Pirko <j...@mellanox.com>

[patch iproute2 net-next v11 2/4] tc: introduce tc_qdisc_block_exists helper

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> This hepler used qdisc dump to list all qdisc and find if block index in question is used by any of them. That means the block with specified index exists. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- tc/tc_

[patch iproute2 net-next v11 4/4] tc: implement ingress/egress block index attributes for qdiscs

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> During qdisc creation it is possible to specify shared block for bot ingress and egress. Pass this values to kernel according to the command line options. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- man/man8/tc.8 | 6 +- tc/tc_

[patch net-next v11 12/13] mlxsw: spectrum_acl: Implement TC block sharing

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Benefit from the prepared TC and in-driver ACL infrastructure and introduce block sharing offload. For that, a new struct "block" is introduced in spectrum_acl in order to hold a list of specific block-port bindings. Signed-off-b

[patch net-next v11 05/13] net: sched: remove classid and q fields from tcf_proto

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Both are no longer used, so remove them. Signed-off-by: Jiri Pirko <j...@mellanox.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> Acked-by: David Ahern <dsah...@gmail.com> --- include/net/sch_generic.h | 2 -- net/sched/cls_ap

[patch iproute2 net-next v11 3/4] tc: introduce support for block-handle for filter operations

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> So far, qdisc was the only handle that could be used to manipulate filters. Kernel added support for using block to manipulate it. So add the support to use block index to manipulate filters. The magic TCM_IFINDEX_MAGIC_BLOCK indicates the block

[patch net-next v11 10/13] mlxsw: spectrum_acl: Reshuffle code around mlxsw_sp_acl_ruleset_create/destroy

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> In order to prepare for follow-up changes, make the bind/unbind helpers very simple. That required move of ht insertion/removal and bind/unbind calls into mlxsw_sp_acl_ruleset_create/destroy. Signed-off-by: Jiri Pirko <j...@mellanox.com> Acked-by:

[patch iproute2 net-next v11 1/4] include: update rtnetlink header according to kernel

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- include/uapi/linux/rtnetlink.h | 12 1 file changed, 12 insertions(+) diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 13bf56f..aba8b18 100644 --- a/

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

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> 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 <j...@mellanox.c

[patch net-next v11 11/13] mlxsw: spectrum_acl: Don't store netdev and ingress for ruleset unbind

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Instead, pass netdev and ingress flag to ruleset unbind op. Signed-off-by: Jiri Pirko <j...@mellanox.com> Acked-by: David Ahern <dsah...@gmail.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 +- drivers/net/ether

[patch net-next v11 06/13] net: sched: keep track of offloaded filters and check tc offload feature

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> During block bind, we need to check tc offload feature. If it is disabled yet still the block contains offloaded filters, forbid the bind. Also forbid to register callback for a block that already contains offloaded filters, as the play back is not sup

[patch net-next v11 01/13] net: sched: introduce support for multiple filter chain pointers registration

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> 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 <j...@mellano

[patch net-next v11 07/13] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> As the tcm_ifindex with value TCM_IFINDEX_MAGIC_BLOCK is invalid ifindex, use it to indicate that we work with block, instead of qdisc. So if tcm_ifindex is set to TCM_IFINDEX_MAGIC_BLOCK, tcm_parent is used to carry block_index. If the block

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

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Currently the filters added to qdiscs are independent. So for example if you have 2 netdevices and you create ingress qdisc on both and you want to add identical filter rules both, you need to add them twice. This patchset makes this easier and mainly

[patch net-next v11 13/13] mlxsw: spectrum_acl: Pass mlxsw_sp_port down to ruleset bind/unbind ops

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> No need to convert from mlxsw_sp_port to net_device and back again. Signed-off-by: Jiri Pirko <j...@mellanox.com> Acked-by: David Ahern <dsah...@gmail.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 +++-- drivers/net/ether

[patch net-next v11 03/13] net: sched: avoid usage of tp->q in tcf_classify

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Use block index in the messages instead. Signed-off-by: Jiri Pirko <j...@mellanox.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> Acked-by: David Ahern <dsah...@gmail.com> --- net/sched/cls_api.c | 5 +++-- 1 file changed, 3 in

[patch net-next v11 04/13] net: sched: introduce block mechanism to handle netif_keep_dst calls

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> 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

[patch net-next v11 02/13] net: sched: introduce shared filter blocks infrastructure

2018-01-17 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Allow qdiscs to share filter blocks among them. Each qdisc type has to use block get/put extended modifications that enable sharing. Shared blocks are tracked within each net namespace and identified by u32 index. This index is passed from user

Re: [patch net-next v10 02/13] net: sched: introduce shared filter blocks infrastructure

2018-01-17 Thread Jiri Pirko
Wed, Jan 17, 2018 at 01:03:15AM CET, xiyou.wangc...@gmail.com wrote: >On Tue, Jan 16, 2018 at 7:33 AM, Jiri Pirko <j...@resnulli.us> wrote: >> static int __init tc_filter_init(void) >> { >> + int err; >> + >> tc_filter_wq = alloc_ord

[patch iproute2 net-next v10 2/4] tc: introduce tc_qdisc_block_exists helper

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> This hepler used qdisc dump to list all qdisc and find if block index in question is used by any of them. That means the block with specified index exists. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- tc/tc_

[patch iproute2 net-next v10 4/4] tc: implement ingress/egress block index attributes for qdiscs

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> During qdisc creation it is possible to specify shared block for bot ingress and egress. Pass this values to kernel according to the command line options. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- man/man8/tc.8 | 6 +- tc/tc_

[patch iproute2 net-next v10 3/4] tc: introduce support for block-handle for filter operations

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> So far, qdisc was the only handle that could be used to manipulate filters. Kernel added support for using block to manipulate it. So add the support to use block index to manipulate filters. The magic TCM_IFINDEX_MAGIC_BLOCK indicates the block

[patch iproute2 net-next v10 1/4] include: update rtnetlink header according to kernel

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- include/uapi/linux/rtnetlink.h | 12 1 file changed, 12 insertions(+) diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 13bf56f..aba8b18 100644 --- a/

[patch net-next v10 06/13] net: sched: keep track of offloaded filters and check tc offload feature

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> During block bind, we need to check tc offload feature. If it is disabled yet still the block contains offloaded filters, forbid the bind. Also forbid to register callback for a block that already contains offloaded filters, as the play back is not sup

[patch net-next v10 13/13] mlxsw: spectrum_acl: Pass mlxsw_sp_port down to ruleset bind/unbind ops

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> No need to convert from mlxsw_sp_port to net_device and back again. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 +++-- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 4 ++--

[patch net-next v10 01/13] net: sched: introduce support for multiple filter chain pointers registration

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> 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 <j...@mellanox.com

[patch net-next v10 03/13] net: sched: avoid usage of tp->q in tcf_classify

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Use block index in the messages instead. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- 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 9b45950..31

[patch net-next v10 12/13] mlxsw: spectrum_acl: Implement TC block sharing

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Benefit from the prepared TC and in-driver ACL infrastructure and introduce block sharing offload. For that, a new struct "block" is introduced in spectrum_acl in order to hold a list of specific block-port bindings. Signed-off-b

[patch net-next v10 11/13] mlxsw: spectrum_acl: Don't store netdev and ingress for ruleset unbind

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Instead, pass netdev and ingress flag to ruleset unbind op. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 9 -- .../ether

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

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> 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 <j...@mellanox.com>

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

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Currently the filters added to qdiscs are independent. So for example if you have 2 netdevices and you create ingress qdisc on both and you want to add identical filter rules both, you need to add them twice. This patchset makes this easier and mainly

[patch net-next v10 04/13] net: sched: introduce block mechanism to handle netif_keep_dst calls

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> 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

[patch net-next v10 10/13] mlxsw: spectrum_acl: Reshuffle code around mlxsw_sp_acl_ruleset_create/destroy

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> In order to prepare for follow-up changes, make the bind/unbind helpers very simple. That required move of ht insertion/removal and bind/unbind calls into mlxsw_sp_acl_ruleset_create/destroy. Signed-off-by: Jiri Pirko <j...@mellanox.com> ---

[patch net-next v10 08/13] net: sched: introduce ingress/egress block index attributes for qdisc

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Introduce two new attributes to be used for qdisc creation and dumping. One for ingress block, one for egress block. Introduce a set of ops that qdisc which supports block sharing would implement. Passing block indexes in qdisc change is not support

[patch net-next v10 02/13] net: sched: introduce shared filter blocks infrastructure

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Allow qdiscs to share filter blocks among them. Each qdisc type has to use block get/put extended modifications that enable sharing. Shared blocks are tracked within each net namespace and identified by u32 index. This index is passed from user

[patch net-next v10 05/13] net: sched: remove classid and q fields from tcf_proto

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Both are no longer used, so remove them. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- 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

[patch net-next v10 07/13] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> As the tcm_ifindex with value TCM_IFINDEX_MAGIC_BLOCK is invalid ifindex, use it to indicate that we work with block, instead of qdisc. So if tcm_ifindex is set to TCM_IFINDEX_MAGIC_BLOCK, tcm_parent is used to carry block_index. If the block

Re: [patch net-next v9 07/13] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-16 Thread Jiri Pirko
Tue, Jan 16, 2018 at 02:33:41PM CET, j...@resnulli.us wrote: >From: Jiri Pirko <j...@mellanox.com> > >As the tcm_ifindex 0 is invalid ifindex, reuse it to indicate that we >work with block, instead of qdisc. So if tcm_ifindex is 0, tcm_parent is >used to carry block_index.

[patch iproute2 net-next v9 1/4] include: update rtnetlink header according to kernel

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- include/uapi/linux/rtnetlink.h | 12 1 file changed, 12 insertions(+) diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 13bf56f..aba8b18 100644 --- a/

[patch iproute2 net-next v9 4/4] tc: implement ingress/egress block index attributes for qdiscs

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- tc/tc_qdisc.c | 36 1 file changed, 36 insertions(+) diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c index 3f91558..9f06d37 100644 --- a/tc/tc_qdisc.c +++ b/t

[patch iproute2 net-next v9 2/4] tc: introduce tc_qdisc_block_exists helper

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> This hepler used qdisc dump to list all qdisc and find if block index in question is used by any of them. That means the block with specified index exists. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- tc/tc_

[patch iproute2 net-next v9 3/4] tc: introduce support for block-handle for filter operations

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- tc/tc_filter.c | 105 +++-- 1 file changed, 88 insertions(+), 17 deletions(-) diff --git a/tc/tc_filter.c b/tc/tc_filter.c index 7dd123a..b2

[patch net-next v9 03/13] net: sched: avoid usage of tp->q in tcf_classify

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Use block index in the messages instead. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- 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 9b45950..31

[patch net-next v9 04/13] net: sched: introduce block mechanism to handle netif_keep_dst calls

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> 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

[patch net-next v9 10/13] mlxsw: spectrum_acl: Reshuffle code around mlxsw_sp_acl_ruleset_create/destroy

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> In order to prepare for follow-up changes, make the bind/unbind helpers very simple. That required move of ht insertion/removal and bind/unbind calls into mlxsw_sp_acl_ruleset_create/destroy. Signed-off-by: Jiri Pirko <j...@mellanox.com> ---

[patch net-next v9 07/13] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> As the tcm_ifindex 0 is invalid ifindex, reuse it to indicate that we work with block, instead of qdisc. So if tcm_ifindex is 0, tcm_parent is used to carry block_index. If the block is set to be shared between at least 2 qdiscs, it is forbidden

[patch net-next v9 08/13] net: sched: introduce ingress/egress block index attributes for qdisc

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Introduce two new attributes to be used for qdisc creation and dumping. One for ingress block, one for egress block. Introduce a set of ops that qdisc which supports block sharing would implement. Passing block indexes in qdisc change is not support

[patch net-next v9 12/13] mlxsw: spectrum_acl: Implement TC block sharing

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Benefit from the prepared TC and in-driver ACL infrastructure and introduce block sharing offload. For that, a new struct "block" is introduced in spectrum_acl in order to hold a list of specific block-port bindings. Signed-off-b

[patch net-next v9 01/13] net: sched: introduce support for multiple filter chain pointers registration

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> 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 <j...@mellanox.com

[patch net-next v9 13/13] mlxsw: spectrum_acl: Pass mlxsw_sp_port down to ruleset bind/unbind ops

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> No need to convert from mlxsw_sp_port to net_device and back again. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 +++-- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 4 ++--

[patch net-next v9 05/13] net: sched: remove classid and q fields from tcf_proto

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Both are no longer used, so remove them. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- 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

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

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> 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 <j...@mellanox.com>

[patch net-next v9 11/13] mlxsw: spectrum_acl: Don't store netdev and ingress for ruleset unbind

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Instead, pass netdev and ingress flag to ruleset unbind op. Signed-off-by: Jiri Pirko <j...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 9 -- .../ether

[patch net-next v9 02/13] net: sched: introduce shared filter blocks infrastructure

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Allow qdiscs to share filter blocks among them. Each qdisc type has to use block get/put extended modifications that enable sharing. Shared blocks are tracked within each net namespace and identified by u32 index. This index is passed from user

[patch net-next v9 06/13] net: sched: keep track of offloaded filters and check tc offload feature

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> During block bind, we need to check tc offload feature. If it is disabled yet still the block contains offloaded filters, forbid the bind. Also forbid to register callback for a block that already contains offloaded filters, as the play back is not sup

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

2018-01-16 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Currently the filters added to qdiscs are independent. So for example if you have 2 netdevices and you create ingress qdisc on both and you want to add identical filter rules both, you need to add them twice. This patchset makes this easier and mainly

Re: [PATCH bpf-next v2 09/11] nfp: bpf: use extack support to improve debugging

2018-01-16 Thread Jiri Pirko
Tue, Jan 16, 2018 at 03:08:43AM CET, jakub.kicin...@netronome.com wrote: >From: Quentin Monnet > >Use the recently added extack support for eBPF offload in the driver. > >Signed-off-by: Quentin Monnet >Reviewed-by: Jakub Kicinski

Re: [PATCH bpf-next v2 02/11] net: sched: prepare extack support for offload via tc_cls_common_offload

2018-01-16 Thread Jiri Pirko
Tue, Jan 16, 2018 at 03:08:36AM CET, jakub.kicin...@netronome.com wrote: >From: Quentin Monnet > >Prepare for extack support for hardware offload of classifiers. In order >to achieve this, a pointer to a struct netlink_ext_ack is added to the >struct

Re: [RFC PATCH net-next 00/12] selftests: forwarding: Add VRF-based tests

2018-01-15 Thread Jiri Pirko
Mon, Jan 15, 2018 at 09:14:56PM CET, dsah...@gmail.com wrote: >On 1/15/18 12:18 PM, Ido Schimmel wrote: >> One of the nice things about network namespaces is that they allow one >> to easily create and test complex environments. >> >> Unfortunately, these namespaces can not be used with actual

Re: [patch iproute2 net-next v8 2/3] tc: introduce support for block-handle for filter operations

2018-01-15 Thread Jiri Pirko
Mon, Jan 15, 2018 at 06:46:00PM CET, dsah...@gmail.com wrote: >On 1/12/18 8:49 AM, Jiri Pirko wrote: >> From: Jiri Pirko <j...@mellanox.com> >> >> Signed-off-by: Jiri Pirko <j...@mellanox.com> >> --- >> tc/tc_filter.c | 127 >> +

Re: [patch net-next v8 08/14] net: sched: add rt netlink message type for block get

2018-01-15 Thread Jiri Pirko
Mon, Jan 15, 2018 at 06:44:41PM CET, dsah...@gmail.com wrote: >On 1/15/18 10:27 AM, Jiri Pirko wrote: >> Mon, Jan 15, 2018 at 06:21:44PM CET, dsah...@gmail.com wrote: >>> On 1/15/18 10:08 AM, David Ahern wrote: >>>> On 1/15/18 10:03 AM, Jiri Pirko wrote: >>>

Re: [patch net-next v8 08/14] net: sched: add rt netlink message type for block get

2018-01-15 Thread Jiri Pirko
Mon, Jan 15, 2018 at 06:21:44PM CET, dsah...@gmail.com wrote: >On 1/15/18 10:08 AM, David Ahern wrote: >> On 1/15/18 10:03 AM, Jiri Pirko wrote: >>> Mon, Jan 15, 2018 at 05:56:31PM CET, dsah...@gmail.com wrote: >>>> On 1/12/18 8:46 AM, Jiri Pirko wrote: >>>

Re: [patch net-next v8 08/14] net: sched: add rt netlink message type for block get

2018-01-15 Thread Jiri Pirko
Mon, Jan 15, 2018 at 05:56:31PM CET, dsah...@gmail.com wrote: >On 1/12/18 8:46 AM, Jiri Pirko wrote: >> From: Jiri Pirko <j...@mellanox.com> >> >> Add simple block get operation which primary purpose is to check the >> block existence by block index. &g

Re: [PATCH net-next] mlxsw: spectrum: qdiscs: Make function mlxsw_sp_qdisc_prio_unoffload static

2018-01-15 Thread Jiri Pirko
Yongjun <weiyongj...@huawei.com> Acked-by: Jiri Pirko <j...@mellanox.com> Thanks.

[patch net-next v3 05/11] mlxsw: pci: Add support for performing bus reset

2018-01-15 Thread Jiri Pirko
lanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/core.h | 1 + drivers/net/ethernet/mellanox/mlxsw/pci.c | 53 ++ 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/mellan

[patch net-next v3 07/11] mlxsw: spectrum_dpipe: Connect dpipe tables to resources

2018-01-15 Thread Jiri Pirko
llanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 81 ++ 1 file changed, 69 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c b/drivers/net/ethernet/mell

[patch net-next v3 01/11] devlink: Add per devlink instance lock

2018-01-15 Thread Jiri Pirko
which protects the internal members which are the sb/dpipe/ resource/ports. By introducing this lock the global devlink port lock can be discarded. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- include/net/devlink.h | 1 +

[patch net-next v3 06/11] mlxsw: spectrum: Register KVD resources with devlink

2018-01-15 Thread Jiri Pirko
From: Arkadi Sharshevsky <arka...@mellanox.com> Register the KVD resources with devlink. The KVD is a memory resource which is subdivided into three partitions which are the linear, hash single and hash double. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: J

[patch net-next v3 02/11] devlink: Add support for resource abstraction

2018-01-15 Thread Jiri Pirko
n some cases the sizes of some resources can be changed, yet for those changes to take place a hot driver reload may be needed. The reload capability will be introduced in the next patch. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com>

[patch net-next v3 10/11] mlxsw: core: Add support for reload

2018-01-15 Thread Jiri Pirko
driver is left in a partially initialized state. Special care is taken during the driver removal in order to properly handle this state. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- drivers/net/ethernet/mellanox

[patch net-next v3 08/11] mlxsw: spectrum: Add support for getting kvdl occupancy

2018-01-15 Thread Jiri Pirko
From: Arkadi Sharshevsky <arka...@mellanox.com> Add support for getting the kvdl occupancy through the resource interface. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/s

[patch net-next v3 03/11] devlink: Add support for reload

2018-01-15 Thread Jiri Pirko
From: Arkadi Sharshevsky <arka...@mellanox.com> Add support for performing driver hot reload. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- include/net/devlink.h| 1 + include/uapi/linux/devlink.h |

[patch net-next v3 09/11] mlxsw: pci: Add support for getting resource through devlink

2018-01-14 Thread Jiri Pirko
lanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/core.c | 16 drivers/net/ethernet/mellanox/mlxsw/core.h | 9 drivers/net/ethernet/mellanox/mlxsw/pci.c | 40 +- drivers/net/ethernet/mellanox/mlx

[patch net-next v3 04/11] devlink: Add relation between dpipe and resource

2018-01-14 Thread Jiri Pirko
ovided for each table. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- include/net/devlink.h| 17 + include/uapi/linux/devlink.h | 2 ++ net/core/devlink.c | 37

[patch net-next v3 11/11] mlxsw: documentation: Add resources ABI documentation

2018-01-14 Thread Jiri Pirko
From: Arkadi Sharshevsky <arka...@mellanox.com> Add resources ABI documentation. Signed-off-by: Arkadi Sharhsevsky <arka...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- Documentation/ABI/testing/devlink-resource-mlxsw | 33

[patch net-next v3 00/11] Add support for resource abstraction

2018-01-14 Thread Jiri Pirko
From: Jiri Pirko <j...@mellanox.com> Arkadi says: Many of the ASIC's internal resources are limited and are shared between several hardware procedures. For example, unified hash-based memory can be used for many lookup purposes, like FDB and LPM. In many cases the user can provide a partit

[patch net-next v2 1/5] mlxsw: reg: add rdpm register

2018-01-14 Thread Jiri Pirko
z <yuv...@mellanox.com> Signed-off-by: Nogah Frankel <nog...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/item.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/reg.h | 37 ++ 2 files changed, 38 insertions

[patch net-next v2 3/5] net: sch: prio: Add offload ability to PRIO qdisc

2018-01-14 Thread Jiri Pirko
l <nog...@mellanox.com> Reviewed-by: Yuval Mintz <yuv...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- include/linux/netdevice.h | 1 + include/net/pkt_cls.h | 25 net/sched/sch_prio.c | 59

<    2   3   4   5   6   7   8   9   10   11   >