[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200930143452.GJ8264@nanopsycho>
Date: Wed, 30 Sep 2020 16:34:52 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Andrew Lunn <andrew@...n.ch>
Cc: Vladimir Oltean <vladimir.oltean@....com>,
Florian Fainelli <f.fainelli@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>, Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net-next v2 1/7] net: devlink: Add unused port flavour
Wed, Sep 30, 2020 at 03:57:25PM CEST, andrew@...n.ch wrote:
>> I get it. But I as I wrote previously, I wonder if used/unused should
>> not be another attribute. Then the flavour can be "undefined".
>
>In the DSA world, it is not undefined. It is clear defined as
>unused. And it cannot be on-the-fly changed. It is a property of the
>PCB, in that the pins exist on the chip, but they simply don't go
>anywhere on the PCB. This is quite common on appliances, e.g. The
>switch has 7 ports, but the installation in the aircraft is a big
>ring, so there is a 'left', 'right', 'aux' and the CPU port. That
>leaves 3 ports totally unused.
Understand the DSA usecase.
>
>> But, why do you want to show "unused" ports? Can the user do something
>> with them? What is the value in showing them?
>
>Because they are just ports, they can have regions. We can look at the
What do you mean by "regions"? Devlink regions? They are per-device, not
per-port. I have to be missing something.
>region and be sure they are powered off, the boot loader etc has not
>left them in a funny state, bridged to other ports, etc.
It is driver's responsibility to ensure that. But that does not mean
that the devlink port needs to be visible.
>
>Regions are a developers tool, not a 'user' tools. So the idea of
>hiding them by default in 'devlink port show' does make some sense,
>and have a flag like -d for details, which includes them. In 'devlink
>region show' i would probably list all regions, independent of any -d
>flag.
>
> Andrew
Powered by blists - more mailing lists