[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201209230331.GD2649111@lunn.ch>
Date: Thu, 10 Dec 2020 00:03:31 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Tobias Waldekranz <tobias@...dekranz.com>
Cc: davem@...emloft.net, kuba@...nel.org, vivien.didelot@...il.com,
f.fainelli@...il.com, olteanv@...il.com, j.vosburgh@...il.com,
vfalico@...il.com, andy@...yhouse.net, netdev@...r.kernel.org
Subject: Re: [PATCH v3 net-next 2/4] net: dsa: Link aggregation support
On Wed, Dec 09, 2020 at 04:21:31PM +0100, Tobias Waldekranz wrote:
> On Wed, Dec 09, 2020 at 15:27, Andrew Lunn <andrew@...n.ch> wrote:
> >> I disagree. A LAG is one type of netdev that a DSA port can offload. The
> >> other one is the DSA port's own netdev, i.e. what we have had since time
> >> immemorial.
> >>
> >> dsa_port_offloads_netdev(dp, dev)?
> >
> > That is better.
>
> ...but there is an even better one?
Not that comes to mind.
>
> > But a comment explaining what the function does might
> > be useful.
>
> This is the function body:
>
> /* Switchdev offloading can be configured on: */
>
> if (dev == dp->slave)
> /* DSA ports directly connected to a bridge. */
> return true;
>
> if (dp->lag && dev == dp->lag->dev)
> /* DSA ports connected to a bridge via a LAG */
> return true;
>
> return false;
>
> What more is there to explain?
OK, you are right. It is well commented as is. Just change the name
and we are good.
Andrew
Powered by blists - more mailing lists