On Wed, Dec 09, 2020 at 15:27, Andrew Lunn <and...@lunn.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?

> 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? Is it the style?  Do you prefer initial
block comments over explaining the individual statements? Is the lanuage
not up to standard?

I am sorry for the tone, I am aware of it. It is just that I really want
to contributem but I am starting to feel like a tty-over-email-proxy to
my emacs session - and an extremely unreliable one at that.

Reply via email to