Re: [PATCH] mlxsw: core: Fix an error handling path in \'mlxsw_core_bus_device_register()\'

2018-05-10 Thread Arkadi Sharshevsky
Hi Dan, I will fix the error path. Regarding the goto label this is the convention in the driver. Thanks, Arkadi

[PATCH net] devlink: Remove redundant free on error path

2018-03-18 Thread Arkadi Sharshevsky
The current code performs unneeded free. Remove the redundant skb freeing during the error path. Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)") Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- net/core/devlink.c | 16 1 file chang

[PATCH net-next] devlink: Change dpipe/resource get privileges

2018-03-08 Thread Arkadi Sharshevsky
Let dpipe/resource be retrieved by unprivileged users. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Acked-by: Jiri Pirko <j...@mellanox.com> --- net/core/devlink.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/core/devlink.c b/net/co

[PATCH net] team: Fix double free in error path

2018-03-08 Thread Arkadi Sharshevsky
;team: implement multipart netlink messages for options transfers") Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Acked-by: Jiri Pirko <j...@mellanox.com> --- drivers/net/team/team.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/team/tea

[PATCH net-next] selftests: Extend the tc action test for action mirror

2018-03-04 Thread Arkadi Sharshevsky
Currently the tc action test is used only to test mirred redirect action. This patch extends it for mirred mirror. Signed-off-by: Jiri Pirko <j...@mellanox.com> Reviewed-by: Ido Schimmel <ido...@mellanox.com> Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- tools

[PATCH iproute2] devlink: Fix error reporting

2018-02-28 Thread Arkadi Sharshevsky
The current code doesn't set errno in case of extended ack. Fixes: 049c58539f5d ("devlink: mnlg: Add support for extended ack") Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Acked-by: Jiri Pirko <j...@mellanox.com> --- devlink/mnlg.c | 6 +++--- 1 file chang

[PATCH net-next] devlink: Fix resource coverity errors

2018-02-26 Thread Arkadi Sharshevsky
Fix resource coverity errors. Fixes: d9f9b9a4d05f ("devlink: Add support for resource abstraction") Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Acked-by: Jiri Pirko <j...@mellanox.com> --- net/core/devlink.c | 37 + 1 file

Re: [net-next PATCH 2/2] mlxsw: spectrum_kvdl: avoid uninitialized variable warning

2018-02-25 Thread Arkadi Sharshevsky
.c > @@ -270,6 +270,8 @@ static int mlxsw_sp_kvdl_part_init(struct mlxsw_sp > *mlxsw_sp, > case MLXSW_SP_KVDL_PART_LARGE_CHUNKS: > resource_id = MLXSW_SP_RESOURCE_KVD_LINEAR_LARGE_CHUNKS; > break; > + default: > + return -EINVAL; >

Re: [net-next PATCH 1/2] mlxsw: spectrum_kvdl: use div_u64() for 64-bit division

2018-02-25 Thread Arkadi Sharshevsky
> *mlxsw_sp, > resource_size = info->end_index - info->start_index + 1; > } > > - nr_entries = resource_size / info->alloc_size; > + nr_entries = div_u64(resource_size, info->alloc_size); > usage_size = BITS_TO_LONGS(nr_entries) * sizeof(u

Re: [PATCH iproute2 0/7] Add support for devlink resource abstraction

2018-02-22 Thread Arkadi Sharshevsky
On 02/15/2018 05:41 AM, David Ahern wrote: > On 2/14/18 1:55 AM, Arkadi Sharshevsky wrote: >> Add support for devlink resource abstraction. >> >> Arkadi Sharshevsky (7): >> devlink: Change empty line indication with indentations >> devlink: mnlg: Add supp

Re: [PATCH iproute2 2/7] devlink: mnlg: Add support for extended ack

2018-02-15 Thread Arkadi Sharshevsky
On 02/14/2018 05:12 PM, Stephen Hemminger wrote: > On Wed, 14 Feb 2018 10:55:17 +0200 > Arkadi Sharshevsky <arka...@mellanox.com> wrote: > >> +static mnl_cb_t mnlg_cb_array[NLMSG_MIN_TYPE] = { >> +[NLMSG_NOOP]= mnlg_cb_noop, >> +[NLMSG_ERROR] = m

[PATCH iproute2 2/7] devlink: mnlg: Add support for extended ack

2018-02-14 Thread Arkadi Sharshevsky
Add support for extended ack. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Acked-by: Jiri Pirko <j...@mellanox.com> --- devlink/mnlg.c | 53 ++-- include/libnetlink.h | 1 + lib/libnetlink.c | 4 ++-- 3 files

[PATCH iproute2 4/7] devlink: Add support for hot reload

2018-02-14 Thread Arkadi Sharshevsky
Add support for hot reload. It should be used in order for resource updates to take place. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Acked-by: Jiri Pirko <j...@mellanox.com> --- devlink/devlink.c | 29 + 1 file changed, 29 insertions(+)

[PATCH iproute2 5/7] devlink: Move dpipe context from heap to stack

2018-02-14 Thread Arkadi Sharshevsky
Move dpipe context to stack instead of dynamically. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Acked-by: Jiri Pirko <j...@mellanox.com> --- devlink/devlink.c | 67 ++- 1 file changed, 27 insertions(+), 40 deletions(-)

[PATCH iproute2 3/7] devlink: Add support for devlink resource abstraction

2018-02-14 Thread Arkadi Sharshevsky
children (sum of its children sizes doesn't exceed the parent's size). In order for the changes to take place hot reload is needed. The hot reload through devlink will be introduced in the following patch. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Acked-by: Jiri Pirko <j...@mel

[PATCH iproute2 1/7] devlink: Change empty line indication with indentations

2018-02-14 Thread Arkadi Sharshevsky
Currently multi-line objects are separated by new-lines. This patch changes this behavior by using indentations for separation. Signed-off-by: Arkadi Sharhsevsky Acked-by: Jiri Pirko --- devlink/devlink.c | 23 --- 1 file changed, 16

[PATCH iproute2 0/7] Add support for devlink resource abstraction

2018-02-14 Thread Arkadi Sharshevsky
Add support for devlink resource abstraction. Arkadi Sharshevsky (7): devlink: Change empty line indication with indentations devlink: mnlg: Add support for extended ack devlink: Add support for devlink resource abstraction devlink: Add support for hot reload devlink: Move dpipe context

[PATCH iproute2 6/7] devlink: Add support for resource/dpipe relation

2018-02-14 Thread Arkadi Sharshevsky
Dpipe - Each dpipe table can have one resource which is mapped to it. The resource is presented via its full path. Furthermore, the number of units consumed by single table entry is presented. Resource - Each resource presents the dpipe tables that use it. Signed-off-by: Arkadi Sharshevsky <a

[PATCH iproute2 7/7] devlink: Update man pages and add resource man

2018-02-14 Thread Arkadi Sharshevsky
Add resource man, and update dev manual for reload command. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Acked-by: Jiri Pirko <j...@mellanox.com> --- man/man8/devlink-dev.8 | 15 + man/man8/devlink-resource.8 | 78 +++

[PATCH iproute2] devlink: Ignore unknown attributes

2018-01-17 Thread Arkadi Sharshevsky
In case of extending the UAPI old packages would break. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- devlink/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index 39cda06..c9d1838 100644 --- a/devlink/dev

Re: [PATCH net-next] mlxsw: spectrum: Make function mlxsw_sp_kvdl_part_occ() static

2018-01-17 Thread Arkadi Sharshevsky
..@huawei.com> Acked-by: Arkadi Sharshevsky <arka...@mellanox.com> > --- > drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c > b/drivers/net

Re: [patch net-next v2 00/10] Add support for resource abstraction

2018-01-04 Thread Arkadi Sharshevsky
On 01/04/2018 05:58 PM, David Ahern wrote: > On 1/4/18 2:24 AM, Arkadi Sharshevsky wrote: >>> Again, my comments all stem from user experience. >>> >>> Can you explain what "double_word" means for a unit? I would expect a >>> units to be kB or c

Re: [patch net-next v2 00/10] Add support for resource abstraction

2018-01-04 Thread Arkadi Sharshevsky
On 01/04/2018 04:28 AM, David Ahern wrote: > On 1/3/18 11:05 AM, Arkadi Sharshevsky wrote: >> >> >> On 01/02/2018 08:05 PM, David Ahern wrote: >>> On 1/1/18 7:58 AM, Arkadi Sharshevsky wrote: >>>> >>>> Just to summarize the current fixes req

Re: [patch net-next v2 00/10] Add support for resource abstraction

2018-01-03 Thread Arkadi Sharshevsky
On 01/03/2018 08:29 PM, David Ahern wrote: > On 1/3/18 11:17 AM, Jiri Pirko wrote: >> Wed, Jan 03, 2018 at 07:14:16PM CET, d...@cumulusnetworks.com wrote: >>> On 1/3/18 11:05 AM, Arkadi Sharshevsky wrote: >>>> As I stated this is a user-space bug which I fixed, and

Re: [patch net-next v2 00/10] Add support for resource abstraction

2018-01-03 Thread Arkadi Sharshevsky
On 01/02/2018 08:05 PM, David Ahern wrote: > On 1/1/18 7:58 AM, Arkadi Sharshevsky wrote: >> >> Just to summarize the current fixes required: >> >> 1. ERIF dpipe table size is reporting wrong size. More precisely the >>ERIF table does not take rifs, so i

Re: [patch net-next v2 00/10] Add support for resource abstraction

2018-01-01 Thread Arkadi Sharshevsky
uld be mapped to dpipe tables and not to resources directly: kernel_fdb--> dpipe_fdb -->/kvd/hash_single. > Arkadi Sharshevsky (10): > devlink: Add per devlink instance lock > devlink: Add support for resource abstraction > devlink: Add support for reload > devlink

Re: [patch net-next v2 00/10] Add support for resource abstraction

2018-01-01 Thread Arkadi Sharshevsky
On 12/31/2017 05:46 PM, David Ahern wrote: > On 12/31/17 3:52 AM, Arkadi Sharshevsky wrote: >>> [1] This is allowed by the current patch set and perhaps it should not be: >>> >>> $ ip ro ls vrf vrf1101 >>> unreachable default metric 8192 >>> 11.2.5

Re: [patch net-next v2 00/10] Add support for resource abstraction

2017-12-31 Thread Arkadi Sharshevsky
On 12/30/2017 11:15 PM, David Ahern wrote: > On 12/28/17 1:21 AM, Yuval Mintz wrote: >> I think it goes the other way around. The dpipe tables are the ones that >> can be translated to functionality; The resources are internal and >> HW-specific >> representing the possible internal division of

Re: [patch net-next v2 00/10] Add support for resource abstraction

2017-12-29 Thread Arkadi Sharshevsky
On 12/28/2017 06:33 PM, David Ahern wrote: > On 12/28/17 10:23 AM, Jiri Pirko wrote: >>> So there are 4 tables exported to userspace: >>> >>> 1. mlxsw_erif table which is not in any of the kvd regions (no >>> resource path is given) and it has a size of 1000. Does >>> mlxsw_erif mean a rif as

Re: [patch net-next v2 00/10] Add support for resource abstraction

2017-12-27 Thread Arkadi Sharshevsky
On 12/27/2017 06:34 PM, David Ahern wrote: > On 12/27/17 2:09 AM, Jiri Pirko wrote: >> Wed, Dec 27, 2017 at 05:05:09AM CET, d...@cumulusnetworks.com wrote: >>> On 12/26/17 5:23 AM, Jiri Pirko wrote: From: Jiri Pirko Many of the ASIC's internal resources are

Re: [patch net-next 02/10] devlink: Add support for resource abstraction

2017-12-25 Thread Arkadi Sharshevsky
On 12/20/2017 09:43 PM, David Miller wrote: > From: Jiri Pirko <j...@resnulli.us> > Date: Wed, 20 Dec 2017 12:58:13 +0100 > >> From: Arkadi Sharshevsky <arka...@mellanox.com> >> >> Add support for hardware resource abstraction over devlink. Each resour

Re: [patch net-next RFC v2 08/11] mlxsw: spectrum_dpipe: Connect dpipe tables to resources

2017-11-28 Thread Arkadi Sharshevsky
On 11/27/2017 06:12 PM, David Ahern wrote: > On 11/23/17 6:40 AM, Arkadi Sharshevsky wrote: >> >> >> On 11/19/2017 05:58 PM, David Ahern wrote: >>> On 11/19/17 2:16 AM, Arkadi Sharshevsky wrote: >>>> >>>> >>>> On 11/18/2017 09:19

Re: [patch net-next RFC v2 08/11] mlxsw: spectrum_dpipe: Connect dpipe tables to resources

2017-11-23 Thread Arkadi Sharshevsky
On 11/19/2017 05:58 PM, David Ahern wrote: > On 11/19/17 2:16 AM, Arkadi Sharshevsky wrote: >> >> >> On 11/18/2017 09:19 PM, David Ahern wrote: >>> On 11/14/17 9:18 AM, Jiri Pirko wrote: >>>> From: Arkadi Sharshevsky <arka...@mellanox.com> >

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

2017-11-23 Thread Arkadi Sharshevsky
[...] + + resource = devlink_resource_find(devlink, NULL, resource_id); + if (!resource) + return -EINVAL; + + if (!resource->resource_ops->size_validate) + return -EINVAL; >>> >>> genl_info has extack; please add user messages for the above

Re: [patch net-next RFC v2 09/11] mlxsw: spectrum: Add support for getting kvdl occupancy

2017-11-19 Thread Arkadi Sharshevsky
On 11/18/2017 09:21 PM, David Ahern wrote: > On 11/14/17 9:18 AM, Jiri Pirko wrote: >> From: Arkadi Sharshevsky <arka...@mellanox.com> >> >> Add support for getting the kvdl occupancy through the resource interface. >> > > Do you intend to add occ_ge

Re: [patch net-next RFC v2 08/11] mlxsw: spectrum_dpipe: Connect dpipe tables to resources

2017-11-19 Thread Arkadi Sharshevsky
On 11/18/2017 09:19 PM, David Ahern wrote: > On 11/14/17 9:18 AM, Jiri Pirko wrote: >> From: Arkadi Sharshevsky <arka...@mellanox.com> >> >> Connect current dpipe tables to resources. The tables are connected >> in the following fashion: >> 1. IPv4 host

Re: [patch net-next RFC v2 07/11] mlxsw: spectrum: Register KVD resources with devlink

2017-11-19 Thread Arkadi Sharshevsky
On 11/18/2017 09:18 PM, David Ahern wrote: > On 11/14/17 9:18 AM, Jiri Pirko wrote: >> diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c >> b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c >> index d02c130..f0cbd67 100644 >> --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c >> +++

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

2017-11-19 Thread Arkadi Sharshevsky
On 11/18/2017 08:34 PM, David Ahern wrote: > On 11/14/17 9:18 AM, Jiri Pirko wrote: >> diff --git a/include/net/devlink.h b/include/net/devlink.h >> index 4d2c6fc..960e80a 100644 >> --- a/include/net/devlink.h >> +++ b/include/net/devlink.h > ... > >> @@ -469,6 +523,32 @@

Re: [patch net-next RFC v2 00/11] Add support for resource abstraction

2017-11-18 Thread Arkadi Sharshevsky
On 11/17/2017 09:58 PM, David Ahern wrote: > On 11/14/17 9:18 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> 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

Re: [patch net-next RFC v2 03/11] devlink: Add support for reload

2017-11-15 Thread Arkadi Sharshevsky
On 11/15/2017 10:03 AM, Jakub Kicinski wrote: > On Tue, 14 Nov 2017 17:18:44 +0100, Jiri Pirko wrote: >> +static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info >> *info) >> +{ >> +struct devlink *devlink = info->user_ptr[0]; >> +int err; >> + >> +if

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

2017-11-15 Thread Arkadi Sharshevsky
On 11/15/2017 09:59 AM, Jakub Kicinski wrote: > On Tue, 14 Nov 2017 17:18:43 +0100, Jiri Pirko wrote: >> From: Arkadi Sharshevsky <arka...@mellanox.com> >> >> Add support for hardware resource abstraction over devlink. Each resource >> is identified via id, fu

Re: [patch net-next RFC v2 07/11] mlxsw: spectrum: Register KVD resources with devlink

2017-11-15 Thread Arkadi Sharshevsky
On 11/15/2017 02:15 AM, David Ahern wrote: > On 11/14/17 9:18 AM, Jiri Pirko wrote: >> +static int >> +mlxsw_sp_resource_kvd_size_validate(struct devlink *devlink, u64 size, >> +struct list_head *resource_list, >> +struct

Re: [patch net-next RFC 1/7] devlink: Add support for resource abstraction

2017-10-29 Thread Arkadi Sharshevsky
On 10/25/2017 06:26 PM, David Ahern wrote: > On 10/24/17 3:22 AM, Jiri Pirko wrote: >> diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h >> index 0cbca96..9db1d70 100644 >> --- a/include/uapi/linux/devlink.h >> +++ b/include/uapi/linux/devlink.h >> @@ -69,6 +69,8 @@ enum

Re: devlink dump of mlxsw_adj table triggers a panic

2017-10-08 Thread Arkadi Sharshevsky
On 10/05/2017 02:57 AM, David Ahern wrote: > The following devlink command on a 2700 triggers a panic every time. > Kernel is net-next at 26873308b21654b6e0785b9f9e2c5414d37a4c4c > > $ devlink dpipe table dump pci/:03:00.0 name mlxsw_adj > devlink answers: No buffer space available > > >

[PATCH iproute2 3/4] devlink: Update devlink UAPI file

2017-09-07 Thread Arkadi Sharshevsky
Update devlink UAPI file. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- include/linux/devlink.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include/linux/devlink.h b/include/linux/devlink.h i

[PATCH iproute2 1/4] devlink: Make match/action parsing more flexible

2017-09-07 Thread Arkadi Sharshevsky
This patch decouples the match/action parsing from printing. This is done as a preparation for adding the ability to print global header values, for example print IPv4 address, which require special formatting. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: Jiri Pi

[PATCH iproute2 4/4] devlink: Add support for protocol IPv4/IPv6/Ethernet special formats

2017-09-07 Thread Arkadi Sharshevsky
Add support for protocol IPv4/IPv6/Ethernet special formats. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- devlink/devlink.c | 75 ++- 1 file changed, 74 insertions(+)

[PATCH iproute2 0/4] Add support for dpipe's global header formatting

2017-09-07 Thread Arkadi Sharshevsky
Some dpipe's global header values need special formatting, for example Ethernet and IP addresses. This patchset adds support for IPv4/6 and Ethernet's special format. Arkadi Sharshevsky (4): devlink: Make match/action parsing more flexible devlink: Add support for special format protocol

[PATCH iproute2 2/4] devlink: Add support for special format protocol headers

2017-09-07 Thread Arkadi Sharshevsky
In case of global header (protocol header), the header:field ids are used to perform lookup for special format printer. In case no printer existence fallback to plain value printing. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: Jiri Pirko <j...@mel

Re: [patch net-next 0/8] mlxsw: Add IPv6 host dpipe table

2017-08-31 Thread Arkadi Sharshevsky
On 08/30/2017 08:26 PM, Andrew Lunn wrote: > On Wed, Aug 30, 2017 at 02:02:58PM +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Arkadi says: >> >> This patchset adds IPv6 host dpipe table support. This will provide the >> ability to observe the hardware offloaded IPv6

Re: mlxsw and rtnl lock

2017-08-29 Thread Arkadi Sharshevsky
On 08/29/2017 11:04 PM, David Ahern wrote: > On 8/29/17 12:10 AM, Arkadi Sharshevsky wrote: >> >> >> On 08/28/2017 09:00 PM, David Ahern wrote: >>> On 8/26/17 11:04 AM, Ido Schimmel wrote: >>>> Regarding the silent abort, that's intentional. You can

Re: mlxsw and rtnl lock

2017-08-29 Thread Arkadi Sharshevsky
On 08/28/2017 09:00 PM, David Ahern wrote: > On 8/26/17 11:04 AM, Ido Schimmel wrote: >> Regarding the silent abort, that's intentional. You can look at the same >> code in v4.9 - when the chain was still blocking - and you'll see that >> we didn't propagate the error even then. This was

Re: [PATCH net-next v2 00/10] net: dsa: add generic debugfs interface

2017-08-29 Thread Arkadi Sharshevsky
On 08/29/2017 03:50 PM, Andrew Lunn wrote: > On Tue, Aug 29, 2017 at 08:25:23AM +0200, Jiri Pirko wrote: >> Mon, Aug 28, 2017 at 10:08:34PM CEST, and...@lunn.ch wrote: I see this overlaps a lot with DPIPE. Why won't you use that to expose your hw state? >>> >>> We took a look at dpipe

Re: mlxsw and rtnl lock

2017-08-29 Thread Arkadi Sharshevsky
On 08/28/2017 09:00 PM, David Ahern wrote: > On 8/26/17 11:04 AM, Ido Schimmel wrote: >> Regarding the silent abort, that's intentional. You can look at the same >> code in v4.9 - when the chain was still blocking - and you'll see that >> we didn't propagate the error even then. This was

Re: [PATCH net] bridge: check for null fdb->dst before notifying switchdev drivers

2017-08-27 Thread Arkadi Sharshevsky
On 08/27/2017 07:13 AM, Roopa Prabhu wrote: > From: Roopa Prabhu > > current switchdev drivers dont seem to support offloading fdb > entries pointing to the bridge device which have fdb->dst > not set to any port. This patch adds a NULL fdb->dst check in > the

Re: [patch net-next 11/12] mlxsw: spectrum_dpipe: Add support for IPv4 host table dump

2017-08-27 Thread Arkadi Sharshevsky
On 08/25/2017 10:51 PM, David Ahern wrote: > On 8/25/17 2:26 AM, Arkadi Sharshevsky wrote: >> >> >> On 08/24/2017 10:26 PM, David Ahern wrote: >>> On 8/23/17 11:40 PM, Jiri Pirko wrote: >>>> +static int >>>> +mlxsw_sp_

Re: [net-next:master 1324/1341] drivers/net//ethernet/mellanox/mlxsw/spectrum_dpipe.c:323:9: error: too few arguments to function 'devlink_dpipe_table_register'

2017-08-25 Thread Arkadi Sharshevsky
On 08/25/2017 04:11 AM, David Miller wrote: > From: kbuild test robot > Date: Fri, 25 Aug 2017 08:03:28 +0800 > >> All errors (new ones prefixed by >>): >> >>drivers/net//ethernet/mellanox/mlxsw/spectrum_dpipe.c: In function >> 'mlxsw_sp_dpipe_erif_table_init':

Re: [patch net-next 11/12] mlxsw: spectrum_dpipe: Add support for IPv4 host table dump

2017-08-25 Thread Arkadi Sharshevsky
On 08/24/2017 10:26 PM, David Ahern wrote: > On 8/23/17 11:40 PM, Jiri Pirko wrote: >> +static int >> +mlxsw_sp_dpipe_table_host_entries_get(struct mlxsw_sp *mlxsw_sp, >> + struct devlink_dpipe_entry *entry, >> + bool

Re: Driver profiles RFC

2017-08-09 Thread Arkadi Sharshevsky
On 08/08/2017 07:08 PM, Roopa Prabhu wrote: > On Tue, Aug 8, 2017 at 6:15 AM, Arkadi Sharshevsky <arka...@mellanox.com> > wrote: >> Drivers may require driver specific information during the init stage. >> For example, memory based shared resource which should be segment

Re: Driver profiles RFC

2017-08-08 Thread Arkadi Sharshevsky
On 08/08/2017 04:54 PM, Andrew Lunn wrote: > On Tue, Aug 08, 2017 at 04:15:41PM +0300, Arkadi Sharshevsky wrote: >> Drivers may require driver specific information during the init stage. >> For example, memory based shared resource which should be segmented for >> dif

Driver profiles RFC

2017-08-08 Thread Arkadi Sharshevsky
Drivers may require driver specific information during the init stage. For example, memory based shared resource which should be segmented for different ASIC processes, such as FDB and LPM lookups. The current mlxsw implementation assumes some default values, which are const and cannot be changed

[PATCH net-next v3 10/13] net: dsa: Remove redundant MDB dump support

2017-08-06 Thread Arkadi Sharshevsky
Currently the MDB HW database is synced with the bridge's one, thus, There is no need to support special dump functionality. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- include/net/dsa.h | 4 net/dsa/dsa_priv.h | 2 -- net/dsa/port.c | 11 --- net/dsa/s

[PATCH net-next v3 09/13] net: dsa: Remove support for MDB dump from DSA's drivers

2017-08-06 Thread Arkadi Sharshevsky
This is done as a preparation before removing support for MDB dump from DSA core. The MDBs are synced with the bridge and thus there is no need for special dump operation support. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- drivers/net/dsa/microchip/ksz_common.

[PATCH net-next v3 02/13] net: dsa: Remove prepare phase for FDB

2017-08-06 Thread Arkadi Sharshevsky
in the following patches, will provide the ability to notify back the bridge about successful offload. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> --- d

[PATCH net-next v3 07/13] net: dsa: Remove support for vlan dump from DSA's drivers

2017-08-06 Thread Arkadi Sharshevsky
This is done as a preparation before removing support for vlan dump from DSA core. The vlans are synced with the bridge and thus there is no need for special dump operation support. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- drivers/net/dsa/b53/b53_common.c

[PATCH net-next v3 12/13] net: bridge: Remove FDB deletion through switchdev object

2017-08-06 Thread Arkadi Sharshevsky
At this point no driver supports FDB add/del through switchdev object but rather via notification chain, thus, it is removed. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/b

[PATCH net-next v3 01/13] net: dsa: Change DSA slave FDB API to be switchdev independent

2017-08-06 Thread Arkadi Sharshevsky
In order to support FDB add/del to be on a notifier chain the slave API need to be changed to be switchdev independent. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fai

[PATCH net-next v3 05/13] net: dsa: Move FDB add/del implementation inside DSA

2017-08-06 Thread Arkadi Sharshevsky
Currently DSA uses switchdev's implementation of FDB add/del ndos. This patch moves the implementation inside DSA in order to support the legacy way for static FDB configuration. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- net/dsa/dsa_priv.h | 7 +++ net/dsa/legacy.c

[PATCH net-next v3 08/13] net: dsa: Remove support for bypass bridge port attributes/vlan set

2017-08-06 Thread Arkadi Sharshevsky
The bridge port attributes/vlan for DSA devices should be set only from bridge code. Furthermore, The vlans are synced totally with the bridge so there is no need for special dump support. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- include/net/dsa.h | 4 n

[PATCH net-next v3 03/13] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-08-06 Thread Arkadi Sharshevsky
Currently, the switchdev objects are embedded inside the DSA notifier info. This patch removes this dependency. This is done as a preparation stage before adding support for learning FDB through the switchdev notification chain. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Re

[PATCH net-next v3 06/13] net: dsa: Add support for querying supported bridge flags

2017-08-06 Thread Arkadi Sharshevsky
Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/slave.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 2cf1c94..9205fda 100644 --- a/net/dsa/slave.c +++ b/net

[PATCH net-next v3 00/13] Update DSA's FDB API and perform switchdev cleanup

2017-08-06 Thread Arkadi Sharshevsky
a major cleanup in switchdev can be done. --- Please see individual patches for patch specific change logs. v1->v2 - Split MDB/vlan dump removal into core/driver removal. v2->v3 - The self implementation for FDB add/del is moved inside DSA. Arkadi Sharshevsky (13): net: dsa: Change DSA

[PATCH net-next v3 11/13] net: dsa: Move FDB dump implementation inside DSA

2017-08-06 Thread Arkadi Sharshevsky
>From all switchdev devices only DSA requires special FDB dump. This is due to lack of ability for syncing the hardware learned FDBs with the bridge. Due to this it is removed from switchdev and moved inside DSA. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- v1->v2

[PATCH net-next v3 04/13] net: dsa: Add support for learning FDB through notification

2017-08-06 Thread Arkadi Sharshevsky
to down state in order to indicate inconsistent situation. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- v1->v2 - Moved dsa_schdule_work decleration into net/dsa/dsa_priv.h. - Fixed switchdev nb un-registration. --- net/dsa/dsa.c | 13 ++ net/dsa/dsa_priv.h | 1 +

[PATCH net-next v3 13/13] net: switchdev: Remove bridge bypass support from switchdev

2017-08-06 Thread Arkadi Sharshevsky
obj_dump from switchdev_ops. - FDBs are removed from obj_add/del routines, due to the fact that they are offloaded through the bridge notification chain. - The switchdev_port_bridge_xx() and switchdev_port_fdb_xx() functions can be removed. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.

Re: [PATCH net-next v2 00/13] Change DSA's FDB API and perform switchdev cleanup

2017-08-06 Thread Arkadi Sharshevsky
On 08/04/2017 06:29 PM, Vivien Didelot wrote: > Hi Arkadi, Jiri, > > Jiri Pirko writes: > >>> It seems impossible currently to move the self to be the default, and >>> this introduces regression which you don't approve, so it seems few >>> options left: >>> >>> a) Leave two

Re: [PATCH net-next v2 00/13] Change DSA's FDB API and perform switchdev cleanup

2017-08-03 Thread Arkadi Sharshevsky
[...] >> Now we have the "offload" read only flag, which is good to inform about >> a successfully programmed hardware, but adds another level of complexity >> to understand the interaction with the hardware. >> >> I think iproute2 is getting more and more confusing. From what I >> understood,

Re: [patch net-next 2/2] mlxsw: spectrum: Add support for access cable info via ethtool

2017-07-27 Thread Arkadi Sharshevsky
On 07/26/2017 05:18 PM, Andrew Lunn wrote: >> +static int mlxsw_sp_get_module_info(struct net_device *netdev, >> +struct ethtool_modinfo *modinfo) >> +{ >> +struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(netdev); >> +u8

Re: [PATCH iproute2] bridge: Assume master at FDB modification

2017-07-26 Thread Arkadi Sharshevsky
On 07/26/2017 07:08 PM, Stephen Hemminger wrote: > On Wed, 26 Jul 2017 18:36:34 +0300 > Arkadi Sharshevsky <arka...@mellanox.com> wrote: > >> According to the man page the master flag should be the default, yet, the >> current code assumes otherwise. >> >

[PATCH iproute2] bridge: Assume master at FDB modification

2017-07-26 Thread Arkadi Sharshevsky
According to the man page the master flag should be the default, yet, the current code assumes otherwise. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- bridge/fdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridge/fdb.c b/bridge/fdb.c index e

Re: [PATCH net-next v2 00/13] Change DSA's FDB API and perform switchdev cleanup

2017-07-23 Thread Arkadi Sharshevsky
On 07/20/2017 07:26 PM, Vivien Didelot wrote: > Hi Arkadi, > > Arkadi Sharshevsky <arka...@mellanox.com> writes: > >> Hi, thanks for the test. If the fdb is marked as self its not in the >> bridge at all. So before my patch it was OK because you supported the >

Re: [PATCH net-next v2 00/13] Change DSA's FDB API and perform switchdev cleanup

2017-07-20 Thread Arkadi Sharshevsky
On 07/19/2017 11:17 PM, Vivien Didelot wrote: > Hi Arkadi, > > I am testing your patch series the behavior changes suspiciously: > > # brctl show br0 > bridge name bridge id STP enabled interfaces > br0 8000.f6d5ef06ccdd no

[PATCH net-next v2 00/13] Change DSA's FDB API and perform switchdev cleanup

2017-07-19 Thread Arkadi Sharshevsky
ore/driver removal. Arkadi Sharshevsky (13): net: dsa: Change DSA slave FDB API to be switchdev independent net: dsa: Remove prepare phase for FDB net: dsa: Remove switchdev dependency from DSA switch notifier chain net: dsa: Add support for learning FDB through notification net: dsa: Rem

[PATCH net-next v2 08/13] net: dsa: Remove support for bypass bridge port attributes/vlan set

2017-07-19 Thread Arkadi Sharshevsky
The bridge port attributes/vlan for DSA devices should be set only from bridge code. Furthermore, The vlans are synced totally with the bridge so there is no need for special dump support. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- include/net/dsa.h | 4 n

[PATCH net-next v2 02/13] net: dsa: Remove prepare phase for FDB

2017-07-19 Thread Arkadi Sharshevsky
in the following patches, will provide the ability to notify back the bridge about successful offload. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> --- d

[PATCH net-next v2 07/13] net: dsa: Remove support for vlan dump from DSA's drivers

2017-07-19 Thread Arkadi Sharshevsky
This is done as a preparation before removing support for vlan dump from DSA core. The vlans are synced with the bridge and thus there is no need for special dump operation support. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- drivers/net/dsa/b53/b53_common.c

[PATCH net-next v2 04/13] net: dsa: Add support for learning FDB through notification

2017-07-19 Thread Arkadi Sharshevsky
to down state in order to indicate inconsistent situation. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- v1->v2 - Moved dsa_schdule_work decleration into net/dsa/dsa_priv.h. - Fixed switchdev nb un-registration. --- net/dsa/dsa.c | 13 ++ net/dsa/dsa_priv.h | 1 +

[PATCH net-next v2 01/13] net: dsa: Change DSA slave FDB API to be switchdev independent

2017-07-19 Thread Arkadi Sharshevsky
In order to support FDB add/del to be on a notifier chain the slave API need to be changed to be switchdev independent. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fai

[PATCH net-next v2 05/13] net: dsa: Remove support for FDB add/del via SELF

2017-07-19 Thread Arkadi Sharshevsky
FDB add/del can be added via switchdev notification chain. Thus the support for configuration via switchdev objects can be removed. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/slave.c | 12 ---

[PATCH net-next v2 06/13] net: dsa: Add support for querying supported bridge flags

2017-07-19 Thread Arkadi Sharshevsky
Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/slave.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 6bd2d42..3ad1f4d 100644 --- a/net/dsa/slave.c +++ b/net

[PATCH net-next v2 13/13] net: switchdev: Remove bridge bypass support from switchdev

2017-07-19 Thread Arkadi Sharshevsky
obj_dump from switchdev_ops. - FDBs are removed from obj_add/del routines, due to the fact that they are offloaded through the bridge notification chain. - The switchdev_port_bridge_xx() and switchdev_port_fdb_xx() functions can be removed. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.

[PATCH net-next v2 11/13] net: dsa: Move FDB dump implementation inside DSA

2017-07-19 Thread Arkadi Sharshevsky
>From all switchdev devices only DSA requires special FDB dump. This is due to lack of ability for syncing the hardware learned FDBs with the bridge. Due to this it is removed from switchdev and moved inside DSA. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- v1->v2

[PATCH net-next v2 12/13] net: bridge: Remove FDB deletion through switchdev object

2017-07-19 Thread Arkadi Sharshevsky
At this point no driver supports FDB add/del through switchdev object but rather via notification chain, thus, it is removed. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/b

[PATCH net-next v2 09/13] net: dsa: Remove support for MDB dump from DSA's drivers

2017-07-19 Thread Arkadi Sharshevsky
This is done as a preparation before removing support for MDB dump from DSA core. The MDBs are synced with the bridge and thus there is no need for special dump operation support. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- drivers/net/dsa/microchip/ksz_common.

[PATCH net-next v2 10/13] net: dsa: Remove redundant MDB dump support

2017-07-19 Thread Arkadi Sharshevsky
Currently the MDB HW database is synced with the bridge's one, thus, There is no need to support special dump functionality. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> --- include/net/dsa.h | 4 net/dsa/dsa_priv.h | 2 -- net/dsa/port.c | 11 --- net/dsa/s

[PATCH net-next v2 03/13] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-07-19 Thread Arkadi Sharshevsky
Currently, the switchdev objects are embedded inside the DSA notifier info. This patch removes this dependency. This is done as a preparation stage before adding support for learning FDB through the switchdev notification chain. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Re

Re: [PATCH net-next 09/11] net: dsa: Move FDB dump implementation inside DSA

2017-07-19 Thread Arkadi Sharshevsky
On 07/18/2017 09:06 PM, Vivien Didelot wrote: > Hi Arkadi, > > Arkadi Sharshevsky <arka...@mellanox.com> writes: > >> +typedef int dsa_fdb_dump_cb_t(const unsigned char *addr, u16 vid, >> + u16 ndm_state, void *data); > > Can I ask

Re: [PATCH net-next 07/11] net: dsa: Remove support for bypass bridge port attributes/vlan set

2017-07-19 Thread Arkadi Sharshevsky
On 07/18/2017 08:40 PM, Vivien Didelot wrote: > Hi Arkadi, > > Arkadi Sharshevsky <arka...@mellanox.com> writes: > >> The bridge port attributes/vlan for DSA devices should be set only >> from bridge code. Furthermore, The vlans are synced totally with the

Re: [PATCH net-next 04/11] net: dsa: Add support for learning FDB through notification

2017-07-19 Thread Arkadi Sharshevsky
On 07/18/2017 08:16 PM, Vivien Didelot wrote: > Hi Arkadi, > > Arkadi Sharshevsky <arka...@mellanox.com> writes: > >> --- a/include/net/dsa.h >> +++ b/include/net/dsa.h >> @@ -451,6 +451,7 @@ void unregister_switch_driver(struct dsa_switch_d

[PATCH net-next 03/11] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-07-18 Thread Arkadi Sharshevsky
Currently, the switchdev objects are embedded inside the DSA notifier info. This patch removes this dependency. This is done as a preparation stage before adding support for learning FDB through the switchdev notification chain. Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> Re

  1   2   >