netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH net-next 0/3] Autoload DSA tagging driver when dynamically changing protocol
@ 2022-10-27 21:08 Vladimir Oltean
  2022-10-27 21:08 ` [RFC PATCH net-next 1/3] net: dsa: fall back to default tagger if we can't load the one from DT Vladimir Oltean
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Vladimir Oltean @ 2022-10-27 21:08 UTC (permalink / raw)
  To: netdev
  Cc: Andrew Lunn, Vivien Didelot, Florian Fainelli, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Michael Walle,
	Heiko Thiery

This patch set solves the issue reported by Michael and Heiko here:
https://lore.kernel.org/lkml/20221027113248.420216-1-michael@walle.cc/
making full use of Michael's suggestion of having two modaliases: one
gets used for loading the tagging protocol when it's the default one
reported by the switch driver, the other gets loaded at user's request,
by name.

  # modinfo tag_ocelot_8021q
  filename:       /lib/modules/6.1.0-rc2+/kernel/net/dsa/tag_ocelot_8021q.ko
  alias:          dsa_tag-ocelot-8021q
  alias:          dsa_tag-20
  license:        GPL v2
  depends:        dsa_core
  intree:         Y
  name:           tag_ocelot_8021q
  vermagic:       6.1.0-rc2+ SMP preempt mod_unload modversions aarch64

Tested on NXP LS1028A-RDB with the following device tree addition:

&mscc_felix_port4 {
	dsa-tag-protocol = "ocelot-8021q";
};

&mscc_felix_port5 {
	dsa-tag-protocol = "ocelot-8021q";
};

CONFIG_NET_DSA and everything that depends on it is built as module.
Everything auto-loads, and "cat /sys/class/net/eno2/dsa/tagging" shows
"ocelot-8021q". Traffic works as well.

Note: I included patch 1/3 because I secretly want to see if the
patchwork build tests pass :) But I also submitted it separately to
"net" already, and without it, patch 3/3 doesn't apply to current net-next.
So if you want to leave comments on 1/3, make sure to leave them here:
https://patchwork.kernel.org/project/netdevbpf/patch/20221027145439.3086017-1-vladimir.oltean@nxp.com/

Vladimir Oltean (3):
  net: dsa: fall back to default tagger if we can't load the one from DT
  net: dsa: provide a second modalias to tag proto drivers based on
    their name
  net: dsa: autoload tag driver module on tagging protocol change

 include/net/dsa.h          |  5 +++--
 net/dsa/dsa.c              |  8 +++++---
 net/dsa/dsa2.c             | 15 +++++++++++----
 net/dsa/dsa_priv.h         |  4 ++--
 net/dsa/master.c           |  4 ++--
 net/dsa/tag_ar9331.c       |  6 ++++--
 net/dsa/tag_brcm.c         | 16 ++++++++++------
 net/dsa/tag_dsa.c          | 11 +++++++----
 net/dsa/tag_gswip.c        |  6 ++++--
 net/dsa/tag_hellcreek.c    |  6 ++++--
 net/dsa/tag_ksz.c          | 21 +++++++++++++--------
 net/dsa/tag_lan9303.c      |  6 ++++--
 net/dsa/tag_mtk.c          |  6 ++++--
 net/dsa/tag_ocelot.c       | 11 +++++++----
 net/dsa/tag_ocelot_8021q.c |  6 ++++--
 net/dsa/tag_qca.c          |  6 ++++--
 net/dsa/tag_rtl4_a.c       |  6 ++++--
 net/dsa/tag_rtl8_4.c       |  7 +++++--
 net/dsa/tag_rzn1_a5psw.c   |  6 ++++--
 net/dsa/tag_sja1105.c      | 11 +++++++----
 net/dsa/tag_trailer.c      |  6 ++++--
 net/dsa/tag_xrs700x.c      |  6 ++++--
 22 files changed, 116 insertions(+), 63 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-11-11 23:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-27 21:08 [RFC PATCH net-next 0/3] Autoload DSA tagging driver when dynamically changing protocol Vladimir Oltean
2022-10-27 21:08 ` [RFC PATCH net-next 1/3] net: dsa: fall back to default tagger if we can't load the one from DT Vladimir Oltean
2022-10-27 21:08 ` [RFC PATCH net-next 2/3] net: dsa: provide a second modalias to tag proto drivers based on their name Vladimir Oltean
2022-10-27 21:08 ` [RFC PATCH net-next 3/3] net: dsa: autoload tag driver module on tagging protocol change Vladimir Oltean
2022-10-28  9:17 ` [RFC PATCH net-next 0/3] Autoload DSA tagging driver when dynamically changing protocol Michael Walle
2022-10-28  9:28   ` Vladimir Oltean
2022-10-30 21:22     ` Andrew Lunn
2022-11-11 22:53       ` Vladimir Oltean
2022-11-11 22:54         ` Florian Fainelli
2022-11-11 23:03           ` Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).