Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>,
	netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [RFC PATCH net] net: dsa: tear down devlink port regions when tearing down the devlink port on error
Date: Sun, 5 Sep 2021 13:47:51 +0300	[thread overview]
Message-ID: <YTSgVw7BNK1e4YWY@unreal> (raw)
In-Reply-To: <20210905103125.2ulxt2l65frw7bwu@skbuf>

On Sun, Sep 05, 2021 at 01:31:25PM +0300, Vladimir Oltean wrote:
> On Sun, Sep 05, 2021 at 01:25:03PM +0300, Leon Romanovsky wrote:
> > On Sun, Sep 05, 2021 at 11:45:18AM +0300, Vladimir Oltean wrote:
> > > On Sun, Sep 05, 2021 at 10:07:45AM +0300, Leon Romanovsky wrote:
> > > > On Fri, Sep 03, 2021 at 02:17:38AM +0300, Vladimir Oltean wrote:

<...>

> > That sentence means that your change is OK and you did it right by not
> > changing devlink port to hold not-working ports.
> 
> You're with me so far.
> 
> There is a second part. The ports with 'status = "disabled"' in the
> device tree still get devlink ports registered, but with the
> DEVLINK_PORT_FLAVOUR_UNUSED flavour and no netdev. These devlink ports
> still have things like port regions exported.
> 
> What we do for ports that have failed to probe is to reinit their
> devlink ports as DEVLINK_PORT_FLAVOUR_UNUSED, and their port regions, so
> they effectively behave as though they were disabled in the device tree.

Yes, and this part require DSA knowledge that I don't have, because you
suggest fallback for any error during devlink port register, which can
fail for reasons that require proper unwind instead of reinit.

Thanks

  reply	other threads:[~2021-09-05 10:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 23:17 Vladimir Oltean
2021-09-05  7:07 ` Leon Romanovsky
2021-09-05  8:45   ` Vladimir Oltean
2021-09-05 10:25     ` Leon Romanovsky
2021-09-05 10:31       ` Vladimir Oltean
2021-09-05 10:47         ` Leon Romanovsky [this message]
2021-09-05 11:07           ` Vladimir Oltean
2021-09-05 13:01             ` Leon Romanovsky
2021-09-05 15:01               ` Vladimir Oltean
2021-09-07 15:44             ` Jakub Kicinski
2021-09-07 15:47               ` Florian Fainelli
2021-09-07 16:43                 ` Andrew Lunn
2021-09-07 16:49                   ` Florian Fainelli
2021-09-07 22:59                     ` Leon Romanovsky
2021-09-08 20:21                     ` Vladimir Oltean

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=YTSgVw7BNK1e4YWY@unreal \
    --to=leon@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    --subject='Re: [RFC PATCH net] net: dsa: tear down devlink port regions when tearing down the devlink port on error' \
    /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

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).