netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>, Andrew Lunn <andrew@lunn.ch>
Cc: netdev <netdev@vger.kernel.org>, Jakub Kicinski <kuba@kernel.org>,
	Jiri Pirko <jiri@nvidia.com>, Chris Healy <cphealy@gmail.com>
Subject: Re: [PATCH net-next RFC v1 0/4] Add per port devlink regions
Date: Sun, 20 Sep 2020 16:44:25 -0700	[thread overview]
Message-ID: <6ae49d7b-f33c-155b-d69b-c9c75a387edd@gmail.com> (raw)
In-Reply-To: <20200920233340.ddps7yxoqlbvmv7m@skbuf>



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

  reply	other threads:[~2020-09-20 23:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-19 14:43 [PATCH net-next RFC v1 0/4] Add per port devlink regions Andrew Lunn
2020-09-19 14:43 ` [PATCH net-next RFC v1 1/4] net: devlink: Add support for port regions Andrew Lunn
2020-09-20 23:45   ` Vladimir Oltean
2020-09-21  0:23     ` Vladimir Oltean
2020-09-21  3:02       ` Andrew Lunn
2020-09-21 10:09         ` Vladimir Oltean
2020-09-19 14:43 ` [PATCH net-next RFC v1 2/4] net: dsa: Add devlink port regions support to DSA Andrew Lunn
2020-09-20 23:23   ` Vladimir Oltean
2020-09-21  2:32     ` Andrew Lunn
2020-09-19 14:43 ` [PATCH net-next RFC v1 3/4] net: dsa: Add helper for converting devlink port to ds and port Andrew Lunn
2020-09-20 23:52   ` Vladimir Oltean
2020-09-26 17:28     ` Andrew Lunn
2020-09-26 17:45       ` Vladimir Oltean
2020-09-19 14:43 ` [PATCH net-next RFC v1 4/4] net: dsa: mv88e6xxx: Add per port devlink regions Andrew Lunn
2020-09-20 23:59   ` Vladimir Oltean
2020-09-20 23:33 ` [PATCH net-next RFC v1 0/4] " Vladimir Oltean
2020-09-20 23:44   ` Florian Fainelli [this message]
2020-09-21  2:50   ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ae49d7b-f33c-155b-d69b-c9c75a387edd@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).