Thread (15 messages) flat view 15 messages, 6 authors, 2021-09-08

Re: [RFC PATCH net] net: dsa: tear down devlink port regions when tearing down the devlink port on error

From: Leon Romanovsky <leon@kernel.org>
Date: 2021-09-05 10:47:57

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:
quoted
On Sun, Sep 05, 2021 at 11:45:18AM +0300, Vladimir Oltean wrote:
quoted
On Sun, Sep 05, 2021 at 10:07:45AM +0300, Leon Romanovsky wrote:
quoted
On Fri, Sep 03, 2021 at 02:17:38AM +0300, Vladimir Oltean wrote:
<...>
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help