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

2018-01-25 Thread Jiri Pirko
Thu, Jan 25, 2018 at 04:38:41PM CET, d...@cumulusnetworks.com wrote: >On 1/25/18 8:24 AM, Jiri Pirko wrote: > Now I remember. You wrote it independently and but needed iproute2 be a > delivery vehicle. It uses none of the common infrastructure from > iproute2. Could we make this more di

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

2018-01-25 Thread David Ahern
On 1/25/18 8:24 AM, Jiri Pirko wrote: Now I remember. You wrote it independently and but needed iproute2 be a delivery vehicle. It uses none of the common infrastructure from iproute2. Could we make this more difficult >>> >>> Feel free to rewrite it to use lib/libnetlink.c. Sho

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

2018-01-25 Thread Jiri Pirko
Thu, Jan 04, 2018 at 05:58:51PM CET, d...@cumulusnetworks.com wrote: >On 1/3/18 11:36 AM, Jiri Pirko wrote: >> Wed, Jan 03, 2018 at 07:29:46PM CET, d...@cumulusnetworks.com wrote: >>> On 1/3/18 11:17 AM, Jiri Pirko wrote: Wed, Jan 03, 2018 at 07:14:16PM CET, d...@cumulusnetworks.com wrote: >>>

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

2018-01-04 Thread David Ahern
On 1/4/18 9:13 AM, Arkadi Sharshevsky wrote: Also, it seems like the occ of 0 is wrong since we know from past responses that if I set linear to 0 all of networking breaks. Ok, this was a David bug. I was running ifreload after the devlink reload command, but all of my connections to the

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

2018-01-04 Thread David Miller
From: David Ahern Date: Thu, 4 Jan 2018 09:58:51 -0700 > This is what I am getting at. Apparently, these resource patches for > devlink require a patched libmnl to work properly. It is wrong for > iproute2 to accept this patch and to build a devlink command that we > know does not work. That mean

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

2018-01-04 Thread David Ahern
On 1/3/18 11:36 AM, Jiri Pirko wrote: > Wed, Jan 03, 2018 at 07:29:46PM CET, d...@cumulusnetworks.com 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

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

2018-01-04 Thread David Ahern
On 1/4/18 9:13 AM, Arkadi Sharshevsky wrote: > > > 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

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 count (or items or entries). >>> >> >> Double word is

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

2018-01-04 Thread David Ahern
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 count (or items or entries). >> > > Double word is 64 bit, dont understand why this is confusing. As A

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

2018-01-04 Thread Andrew Lunn
> Double word is 64 bit, dont understand why this is confusing. In an ASCI, the definition of a word can be quite flexible. I've seen designs using 14 bit words, since 14 bits was all that was needed to represent the data to be held. I've also seen a 16 bit word used to hold a signed value, with t

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 required: 1. ERIF dpipe table size is reporting w

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

2018-01-03 Thread David Ahern
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 required: >>> >>> 1. ERIF dpipe table size is reporting wrong size. More precisely the >>>ERIF table does

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 updated my repo so please

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

2018-01-03 Thread Jiri Pirko
Wed, Jan 03, 2018 at 07:29:46PM CET, d...@cumulusnetworks.com 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 updated

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

2018-01-03 Thread David Ahern
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 updated my repo >>> so please pull. Devlink uses mnl,and currently mnl does not s

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

2018-01-03 Thread Jiri Pirko
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 updated my repo >> so please pull. Devlink uses mnl,and currently mnl does not support >> extended ack. I added support for

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

2018-01-03 Thread David Ahern
On 1/3/18 11:05 AM, Arkadi Sharshevsky wrote: > As I stated this is a user-space bug which I fixed, and updated my repo > so please pull. Devlink uses mnl,and currently mnl does not support > extended ack. I added support for this in my local ver of libmnl: > > https://github.com/arkadis/libmnl.gi

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 it should not be linked to the rif >>

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

2018-01-02 Thread David Ahern
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 it should not be linked to the rif >bank resource (is not part of this patchset, futur

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

2018-01-02 Thread Jiri Pirko
Tue, Jan 02, 2018 at 02:41:13PM CET, and...@lunn.ch wrote: >> Question is where to put it. It is mlxsw-specific thing, moreover, >> Spectrum-specific thing, same as dpipe tables etc. Not sure. Perhaps >> Documentation/networking/mlxsw.txt ? > >Hi Jiri > >Documentation/ABI seems like the correct pla

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

2018-01-02 Thread Andrew Lunn
> Question is where to put it. It is mlxsw-specific thing, moreover, > Spectrum-specific thing, same as dpipe tables etc. Not sure. Perhaps > Documentation/networking/mlxsw.txt ? Hi Jiri Documentation/ABI seems like the correct place. There is nothing in the README which says it is limited to fil

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

2018-01-02 Thread Jiri Pirko
Mon, Jan 01, 2018 at 03:58:33PM CET, arka...@mellanox.com wrote: > > >On 12/26/2017 01:23 PM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> 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

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

2018-01-01 Thread Arkadi Sharshevsky
On 12/26/2017 01:23 PM, Jiri Pirko wrote: > From: Jiri Pirko > > 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

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.51.0/24 dev swp1s0.51 proto kernel scope link src

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

2017-12-31 Thread David Ahern
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.51.0/24 dev swp1s0.51 proto kernel scope link src 11.2.51.1 offload >> 11.3.51.0/24 dev swp1s1.51 prot

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-30 Thread David Ahern
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 resources - > but a given resource sn't necessarily ma

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

2017-12-30 Thread Andrew Lunn
> In my opinion it should not change. Unless there is a bug (like the one > DaveA found in mlxsw erif table). Existing tables and resources should > be only added. It is the driver's maintainer responsibility to not to > break user scripts. So we agree with is ABI. Great. Andrew

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

2017-12-30 Thread Jiri Pirko
Sat, Dec 30, 2017 at 11:18:50AM CET, and...@lunn.ch wrote: >> 1. Both dpipe and devlink resource are abstraction models for >> hardware entities, and as a result they true to provide generic objects. >> Each driver/ASIC should register his own and it absolutely proprietary >> implementation. There

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

2017-12-30 Thread Andrew Lunn
> 1. Both dpipe and devlink resource are abstraction models for > hardware entities, and as a result they true to provide generic objects. > Each driver/ASIC should register his own and it absolutely proprietary > implementation. There is absolutely NO industry standard here, the only > thing that

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 in

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

2017-12-28 Thread Jiri Pirko
Thu, Dec 28, 2017 at 05:33:58PM CET, d...@cumulusnetworks.com 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_eri

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

2017-12-28 Thread David Ahern
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 >> in Router Interfaces? So the switch supports up to 1000

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

2017-12-28 Thread Jiri Pirko
Thu, Dec 28, 2017 at 05:09:09PM CET, d...@cumulusnetworks.com wrote: >On 12/28/17 2:25 AM, Yuval Mintz wrote: > Again, I have no objections to kvd, linear, hash, etc terms as they do > relate to Mellanox products. But kvd/linear, for example, does correlate > to industry standard concep

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

2017-12-28 Thread David Ahern
On 12/28/17 2:25 AM, Yuval Mintz wrote: Again, I have no objections to kvd, linear, hash, etc terms as they do relate to Mellanox products. But kvd/linear, for example, does correlate to industry standard concepts in some way. My request is that the resource listing guide the us

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

2017-12-28 Thread Yuval Mintz
> >>> 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 partitioning scheme for such a reso

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

2017-12-28 Thread Yuval Mintz
> 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 partitioning scheme for such a

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

2017-12-27 Thread David Ahern
On 12/27/17 1:31 PM, Andrew Lunn wrote: >> Hmm. That documents mainly sysfs. No mention of Netlink at all. But >> maybe I missed it. Also, that defines the interface as is. However we >> are talking about the data exchanged over the interface, not the >> interface itself. I don't see how ASIC/HW sp

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 limited and are shared

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

2017-12-27 Thread Roopa Prabhu
On Wed, Dec 27, 2017 at 8:34 AM, 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 limited and are

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

2017-12-27 Thread Andrew Lunn
> Hmm. That documents mainly sysfs. No mention of Netlink at all. But > maybe I missed it. Also, that defines the interface as is. However we > are talking about the data exchanged over the interface, not the > interface itself. I don't see how ASIC/HW specific thing, like for > example KVD in our

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

2017-12-27 Thread David Ahern
On 12/27/17 7:15 AM, Jiri Pirko wrote: > Wed, Dec 27, 2017 at 02:08:03PM CET, and...@lunn.ch wrote: >>> This is misunderstanding I believe. This is not about ABI. That is well >>> defined by the netlink attributes. This is about meaning of particular >>> ASIC-specific internal resources. >> >> I wo

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

2017-12-27 Thread David Ahern
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 limited and are shared between >>> several hardware procedures. For example

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

2017-12-27 Thread Jiri Pirko
Wed, Dec 27, 2017 at 02:08:03PM CET, and...@lunn.ch wrote: >> This is misunderstanding I believe. This is not about ABI. That is well >> defined by the netlink attributes. This is about meaning of particular >> ASIC-specific internal resources. > >I would agree that the netlink attributed are clear

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

2017-12-27 Thread Andrew Lunn
> This is misunderstanding I believe. This is not about ABI. That is well > defined by the netlink attributes. This is about meaning of particular > ASIC-specific internal resources. I would agree that the netlink attributed are clearly defined. But the meta information, what this ASIC specific in

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

2017-12-27 Thread Jiri Pirko
Wed, Dec 27, 2017 at 09:23:31AM CET, and...@lunn.ch wrote: >> >$ devlink resource show pci/:03:00.0 >> >pci/:03:00.0: >> > name kvd size 245760 size_valid true >> > resources: >> >name linear size 98304 occ 0 >> >name hash_double size 60416 >> >name hash_single size 87040 >> >

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

2017-12-27 Thread Yuval Mintz
> >> 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 partitioning scheme for such a resource i

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

2017-12-27 Thread Andrew Lunn
> >$ devlink resource show pci/:03:00.0 > >pci/:03:00.0: > > name kvd size 245760 size_valid true > > resources: > >name linear size 98304 occ 0 > >name hash_double size 60416 > >name hash_single size 87040 > > > >So this 2700 has 3 resources that can be managed -- some table

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

2017-12-27 Thread Jiri Pirko
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 limited and are shared between >> several hardware procedures. For example, unified hash-based memory can >> be used for

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

2017-12-26 Thread David Ahern
On 12/26/17 5:23 AM, Jiri Pirko wrote: > From: Jiri Pirko > > 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 provi

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

2017-12-26 Thread Jiri Pirko
From: Jiri Pirko 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 partitioning scheme for such a resource in ord