Subject: Re: [PATCH v3 net-next 2/4] net: dsa: Link aggregation support

From: Andrew Lunn <[email-masked]>
Date: Tue, 8 Dec 2020 18:26:24 +0100

>     There are two points to be made:
>     - Recently we have seen people with non-DSA (pure switchdev) hardware
>       being compelled to write DSA drivers, because they noticed that a
>       large part of the middle layer had already been written, and it
>       presents an API with a lot of syntactic sugar. Maybe there is a
>       larger issue here in that the switchdev offloading APIs are fairly
>       bulky and repetitive, but that does not mean that we should be
>       encouraging the attitude "come to DSA, we have cookies".
>       https://lwn.net/ml/linux-kernel/[email-masked]/

We often see developers stumbling around in the dark, not knowing the
subsystems and how best to solve a problem. So i would not read too
much into that particular email discussion. It was just another
example of we the maintainers, trying to get an understanding of the
hardware and help point a developer in the right direction. We don't
consider DSA the solution for all switch problems.

We do however have a growing number of pure switchdev drivers now, so
it might be time to take a look and see what is common, and pull some
code out of the drivers and into a library. This is a common pattern
you see all over the kernel. One driver often leads the way with a new
subsystem, but it is not until you have a few different drivers using
the subsystem do you have a real feel for what is common and can be
pulled out of the drivers and into a framework.

       Andrew