[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <af7b34c0c17cdd73c40a9dcac081fb71@walle.cc>
Date: Wed, 16 Nov 2022 10:33:24 +0100
From: Michael Walle <michael@...le.cc>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Heiko Thiery <heiko.thiery@...il.com>
Subject: Re: [PATCH v2 net-next 0/6] Autoload DSA tagging driver when
dynamically changing protocol
Am 2022-11-15 02:18, schrieb Vladimir Oltean:
> v1->v2:
> - fix module auto-loading when changing tag protocol via sysfs
> (don't pass sysfs-formatted string with '\n' to request_module())
> - change modalias format from "dsa_tag-21" to "dsa_tag:id-21".
> - move some private DSA helpers to net/dsa/dsa_priv.h.
>
> v1 at:
> https://patchwork.kernel.org/project/netdevbpf/list/?series=689585
>
> 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
> filename: /lib/modules/6.1.0-rc4+/kernel/net/dsa/tag_ocelot.ko
> license: GPL v2
> alias: dsa_tag:seville
> alias: dsa_tag:id-21
> alias: dsa_tag:ocelot
> alias: dsa_tag:id-15
> depends: dsa_core
> intree: Y
> name: tag_ocelot
> vermagic: 6.1.0-rc4+ 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. Furthermore, "echo ocelot-8021q"
> into the aforementioned sysfs file now auto-loads the driver for it.
>
> Vladimir Oltean (6):
> net: dsa: stop exposing tag proto module helpers to the world
> net: dsa: rename tagging protocol driver modalias
> net: dsa: provide a second modalias to tag proto drivers based on
> their name
> net: dsa: strip sysfs "tagging" string of trailing newline
> net: dsa: rename dsa_tag_driver_get() to dsa_tag_driver_get_by_id()
> net: dsa: autoload tag driver module on tagging protocol change
FWIW just retested the entire series. But my tags are already on the
appropriate patches.
In any case,
Tested-by: Michael Walle <michael@...le.cc>
Thanks for taking care,
-michael
Powered by blists - more mailing lists