Thread (37 messages) 37 messages, 7 authors, 2020-10-01

Re: [PATCH net-next v2 1/7] net: devlink: Add unused port flavour

From: Jiri Pirko <jiri@resnulli.us>
Date: 2020-09-30 06:56:11

Tue, Sep 29, 2020 at 03:57:00PM CEST, andrew@lunn.ch wrote:
On Tue, Sep 29, 2020 at 03:07:58PM +0200, Jiri Pirko wrote:
quoted
Tue, Sep 29, 2020 at 01:03:56PM CEST, vladimir.oltean@nxp.com wrote:
quoted
On Mon, Sep 28, 2020 at 06:46:14PM -0700, Florian Fainelli wrote:
quoted
That makes sense to me as it would be confusing to suddenly show unused port
flavors after this patch series land. Andrew, Vladimir, does that work for
you as well?
I have nothing to object against somebody adding a '--all' argument to
devlink port commands.
How "unused" is a "flavour"? It seems to me more like a separate
attribute as port of any "flavour" may be potentially "unused". I don't
think we should mix these 2.
Hi Jiri

Current flavours are:

enum devlink_port_flavour {
       DEVLINK_PORT_FLAVOUR_PHYSICAL, /* Any kind of a port physically
                                       * facing the user.
                                       */
       DEVLINK_PORT_FLAVOUR_CPU, /* CPU port */
       DEVLINK_PORT_FLAVOUR_DSA, /* Distributed switch architecture
                                  * interconnect port.
                                  */
       DEVLINK_PORT_FLAVOUR_PCI_PF, /* Represents eswitch port for
                                     * the PCI PF. It is an internal
                                     * port that faces the PCI PF.
                                     */
       DEVLINK_PORT_FLAVOUR_PCI_VF, /* Represents eswitch port
                                     * for the PCI VF. It is an internal
                                     * port that faces the PCI VF.
                                     */
       DEVLINK_PORT_FLAVOUR_VIRTUAL, /* Any virtual port facing the user. */
};

A port in the DSA world is generally just a port on the switch. It is
not limited in nature. It can be used as a PHYSICAL, or CPU, or a DSA
port. We don't consider them as unused PHYISCAL ports, or unused CPU
ports. They are just unused ports. Which is why i added an UNUSED
flavour.
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".

But, why do you want to show "unused" ports? Can the user do something
with them? What is the value in showing them?


Now, it could be this world view is actually just a DSA world
view. Maybe some ASICs have strict roles for their ports? They are not
configurable? And then i could see it being an attribute? But that
messes up the DSA world view :-(

     Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help