[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ae49d7b-f33c-155b-d69b-c9c75a387edd@gmail.com>
Date: Sun, 20 Sep 2020 16:44:25 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Vladimir Oltean <vladimir.oltean@....com>,
Andrew Lunn <andrew@...n.ch>
Cc: netdev <netdev@...r.kernel.org>, Jakub Kicinski <kuba@...nel.org>,
Jiri Pirko <jiri@...dia.com>, Chris Healy <cphealy@...il.com>
Subject: Re: [PATCH net-next RFC v1 0/4] Add per port devlink regions
On 9/20/2020 4:33 PM, Vladimir Oltean wrote:
> On Sat, Sep 19, 2020 at 04:43:28PM +0200, Andrew Lunn wrote:
>>
>> DSA only instantiates devlink ports for switch ports which are used.
>> For this hardware, only 4 user ports and the CPU port have devlink
>> ports, which explains the discontinuous port regions.
>
> This is not so much a choice, as it is a workaround of the fact that
> dsa_port_setup(), which registers devlink ports with devlink, is called
> after ds->ops->setup(), so you can't register your port regions from
> the same place as the global regions now.
>
> So you're doing it from ds->ops->port_enable(), which is the DSA wrapper
> for .ndo_open(). So, consequently, your port regions will only be
> registered when the port is up, and will be unregistered when it goes
> down. Is that what you want? I understand that users probably think they
> want to debug only the ports that they actively use, but I've heard of
> at least one problem in the past which was caused by invalid settings
> (flooding in that case) on a port that was down. Sure, this is probably
> a rare situation, but as I said, somebody trying to use port regions to
> debug something like that is probably going to have a hard time, because
> it isn't an easy surgery to figure the probe ordering out.
Being able to debug the switch configuration as soon as it gets
registered with DSA all the way through enabling an user port has
definitively a lot of value so we should aim to support that use case.
--
Florian
Powered by blists - more mailing lists