[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87470400-052b-c132-9db8-96034ebfd252@gmail.com>
Date: Thu, 18 Mar 2021 09:08:01 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Tobias Waldekranz <tobias@...dekranz.com>, davem@...emloft.net,
kuba@...nel.org
Cc: andrew@...n.ch, vivien.didelot@...il.com, olteanv@...il.com,
netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next 1/8] net: dsa: Add helper to resolve bridge
port from DSA port
On 3/18/2021 7:15 AM, Tobias Waldekranz wrote:
> In order for a driver to be able to query a bridge for information
> about itself, e.g. reading out port flags, it has to use a netdev that
> is known to the bridge. In the simple case, that is just the netdev
> representing the port, e.g. swp0 or swp1 in this example:
>
> br0
> / \
> swp0 swp1
>
> But in the case of an offloaded lag, this will be the bond or team
> interface, e.g. bond0 in this example:
>
> br0
> /
> bond0
> / \
> swp0 swp1
>
> Add a helper that hides some of this complexity from the
> drivers. Then, redefine dsa_port_offloads_bridge_port using the helper
> to avoid double accounting of the set of possible offloaded uppers.
>
> Signed-off-by: Tobias Waldekranz <tobias@...dekranz.com>
Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
--
Florian
Powered by blists - more mailing lists