mbox series

[v2,net-next,00/14] Make DSA tag drivers kernel modules

Message ID 20190423002257.3220-1-andrew@lunn.ch
Headers show
Series Make DSA tag drivers kernel modules | expand

Message

Andrew Lunn April 23, 2019, 12:22 a.m. UTC
istorically, DSA tag drivers have been compiled into the kernel as
part of the DSA core. With the growing number of tag drivers, it makes
sense to allow this driver code to be compiled as a module, and loaded
on demand.

v2
--
Move name to end of structure, keeping the hot entries at the beginning.
More tag protocol to end of structure to keep hot members at the beginning.
Fix indent of #endif
Rewrite to move list pointer into a new structure
void functions, since there cannot be errors
Fix fall-through comment
Reorder patch for unused symbols to before tag drivers can be modules
tab/space cleanup
Help text wording
NET_DSA_TAG_BRCM_COMMON and NET_DSA_TAG_KZS_COMMON hidden


Andrew Lunn (14):
  dsa: Add SPDX header to tag drivers.
  dsa: Move tagger name into its ops structure
  dsa: Add MODULE_ALIAS to taggers in preparation to become modules
  dsa: Add MODULE_LICENSE to tag drivers
  dsa: Add TAG protocol to tag ops
  dsa: Add boilerplate helper to register DSA tag driver modules
  dsa: Keep link list of tag drivers
  dsa: Register the none tagger ops
  dsa: Rename dsa_resolve_tag_protocol() to _get ready for locking
  dsa: Add stub tag driver put method
  dsa: Make use of the list of tag drivers
  dsa: Cleanup unneeded table and make tag structures static
  dsa: tag_brcm: Avoid unused symbols
  dsa: Allow tag drivers to be built as modules

 include/net/dsa.h     | 110 ++++++++++++++++++++++++----
 net/dsa/Kconfig       |  83 ++++++++++++++++-----
 net/dsa/Makefile      |  19 +++--
 net/dsa/dsa.c         | 165 ++++++++++++++++++++++--------------------
 net/dsa/dsa2.c        |   4 +-
 net/dsa/dsa_priv.h    |  34 +--------
 net/dsa/legacy.c      |   4 +-
 net/dsa/tag_brcm.c    |  41 ++++++++---
 net/dsa/tag_dsa.c     |  15 ++--
 net/dsa/tag_edsa.c    |  15 ++--
 net/dsa/tag_gswip.c   |   9 ++-
 net/dsa/tag_ksz.c     |  29 ++++++--
 net/dsa/tag_lan9303.c |  20 +++--
 net/dsa/tag_mtk.c     |  18 ++---
 net/dsa/tag_qca.c     |  19 +++--
 net/dsa/tag_trailer.c |  15 ++--
 16 files changed, 380 insertions(+), 220 deletions(-)

Comments

Jakub Kicinski April 23, 2019, 11:59 p.m. UTC | #1
On Tue, 23 Apr 2019 02:22:43 +0200, Andrew Lunn wrote:
> istorically, DSA tag drivers have been compiled into the kernel as
H^

> part of the DSA core. With the growing number of tag drivers, it makes
> sense to allow this driver code to be compiled as a module, and loaded
> on demand.

Other than minor annoying nitpick looks like a very nice series!
David Miller April 24, 2019, 12:13 a.m. UTC | #2
From: Andrew Lunn <andrew@lunn.ch>
Date: Tue, 23 Apr 2019 02:22:43 +0200

> istorically, DSA tag drivers have been compiled into the kernel as
> part of the DSA core. With the growing number of tag drivers, it makes
> sense to allow this driver code to be compiled as a module, and loaded
> on demand.
> 
> v2
> --

Looks like one more spin with small fixups and this will be ready.
Andrew Lunn April 24, 2019, 12:39 p.m. UTC | #3
> Looks like one more spin with small fixups and this will be ready.

Yes. And i wanted to give Florian time to review the patches he
suggested changes to. I will wait a couple more days before
re-submitting.

	Andrew
Vivien Didelot April 24, 2019, 8:45 p.m. UTC | #4
Hi Andrew,

On Tue, 23 Apr 2019 02:22:43 +0200, Andrew Lunn <andrew@lunn.ch> wrote:
> istorically, DSA tag drivers have been compiled into the kernel as
> part of the DSA core. With the growing number of tag drivers, it makes
> sense to allow this driver code to be compiled as a module, and loaded
> on demand.
> 
> v2
> --
> Move name to end of structure, keeping the hot entries at the beginning.
> More tag protocol to end of structure to keep hot members at the beginning.
> Fix indent of #endif
> Rewrite to move list pointer into a new structure
> void functions, since there cannot be errors
> Fix fall-through comment
> Reorder patch for unused symbols to before tag drivers can be modules
> tab/space cleanup
> Help text wording
> NET_DSA_TAG_BRCM_COMMON and NET_DSA_TAG_KZS_COMMON hidden
> 
> 
> Andrew Lunn (14):
>   dsa: Add SPDX header to tag drivers.
>   dsa: Move tagger name into its ops structure
>   dsa: Add MODULE_ALIAS to taggers in preparation to become modules
>   dsa: Add MODULE_LICENSE to tag drivers
>   dsa: Add TAG protocol to tag ops
>   dsa: Add boilerplate helper to register DSA tag driver modules
>   dsa: Keep link list of tag drivers
>   dsa: Register the none tagger ops
>   dsa: Rename dsa_resolve_tag_protocol() to _get ready for locking
>   dsa: Add stub tag driver put method
>   dsa: Make use of the list of tag drivers
>   dsa: Cleanup unneeded table and make tag structures static
>   dsa: tag_brcm: Avoid unused symbols
>   dsa: Allow tag drivers to be built as modules
> 
>  include/net/dsa.h     | 110 ++++++++++++++++++++++++----
>  net/dsa/Kconfig       |  83 ++++++++++++++++-----
>  net/dsa/Makefile      |  19 +++--
>  net/dsa/dsa.c         | 165 ++++++++++++++++++++++--------------------
>  net/dsa/dsa2.c        |   4 +-
>  net/dsa/dsa_priv.h    |  34 +--------
>  net/dsa/legacy.c      |   4 +-
>  net/dsa/tag_brcm.c    |  41 ++++++++---
>  net/dsa/tag_dsa.c     |  15 ++--
>  net/dsa/tag_edsa.c    |  15 ++--
>  net/dsa/tag_gswip.c   |   9 ++-
>  net/dsa/tag_ksz.c     |  29 ++++++--
>  net/dsa/tag_lan9303.c |  20 +++--
>  net/dsa/tag_mtk.c     |  18 ++---
>  net/dsa/tag_qca.c     |  19 +++--
>  net/dsa/tag_trailer.c |  15 ++--
>  16 files changed, 380 insertions(+), 220 deletions(-)

Nice cleanup at the same time.

Tested-by: Vivien Didelot <vivien.didelot@gmail.com>