[PATCH net-next] net: dsa: Fix dependencies with HSR

Subsystems: networking [dsa], networking [general], the rest

STALE2022d LANDED

Landed in mainline as 94ead4caa061 on 2021-02-23.

5 messages, 4 authors, 2021-02-23 · open the first message on its own page

[PATCH net-next] net: dsa: Fix dependencies with HSR

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2021-02-20 05:13:51

The core DSA framework uses hsr_is_master() which would not resolve to a
valid symbol if HSR is built-into the kernel and DSA is a module.

Fixes: 18596f504a3e ("net: dsa: add support for offloading HSR")
Reported-by: kernel test robot <redacted>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
David, Jakub,

This showed up in linux-next which means it will show up in Linus' tree
soon as well when your pull request gets sent out.

 net/dsa/Kconfig | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index a45572cfb71a..3589224c8da9 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -9,6 +9,7 @@ menuconfig NET_DSA
 	tristate "Distributed Switch Architecture"
 	depends on HAVE_NET_DSA
 	depends on BRIDGE || BRIDGE=n
+	depends on HSR || HSR=n
 	select GRO_CELLS
 	select NET_SWITCHDEV
 	select PHYLINK
-- 
2.25.1

Re: [PATCH net-next] net: dsa: Fix dependencies with HSR

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2021-02-20 05:15:40


On 2/19/2021 9:12 PM, Florian Fainelli wrote:
The core DSA framework uses hsr_is_master() which would not resolve to a
valid symbol if HSR is built-into the kernel and DSA is a module.

Fixes: 18596f504a3e ("net: dsa: add support for offloading HSR")
Reported-by: kernel test robot <redacted>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
David, Jakub,

This showed up in linux-next which means it will show up in Linus' tree
soon as well when your pull request gets sent out.
I had initially considered making is_hsr_master() a static inline that
would compare dev->dev.type->name with "hsr" since the HSR master would
set a custom dev_type, however the xrs700x driver would still fail to
link because it calls hsr_get_version() and for that one there is no
easy solution.
-- 
Florian

Re: [PATCH net-next] net: dsa: Fix dependencies with HSR

From: George McCollister <george.mccollister@gmail.com>
Date: 2021-02-20 14:26:08

On Fri, Feb 19, 2021 at 11:14 PM Florian Fainelli [off-list ref] wrote:


On 2/19/2021 9:12 PM, Florian Fainelli wrote:
quoted
The core DSA framework uses hsr_is_master() which would not resolve to a
valid symbol if HSR is built-into the kernel and DSA is a module.

Fixes: 18596f504a3e ("net: dsa: add support for offloading HSR")
Reported-by: kernel test robot <redacted>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
David, Jakub,

This showed up in linux-next which means it will show up in Linus' tree
soon as well when your pull request gets sent out.
I had initially considered making is_hsr_master() a static inline that
would compare dev->dev.type->name with "hsr" since the HSR master would
set a custom dev_type, however the xrs700x driver would still fail to
link because it calls hsr_get_version() and for that one there is no
easy solution.
Thanks for looking into this. It's not something I've run into before.
It didn't occur to me what would happen if HSR was a module. I'll look
out for this in the future.

Sorry for the inconvenience.

Reviewed-by: George McCollister <george.mccollister@gmail.com>

-George
--
Florian

Re: [PATCH net-next] net: dsa: Fix dependencies with HSR

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2021-02-20 15:37:45

On Fri, Feb 19, 2021 at 09:12:21PM -0800, Florian Fainelli wrote:
The core DSA framework uses hsr_is_master() which would not resolve to a
valid symbol if HSR is built-into the kernel and DSA is a module.

Fixes: 18596f504a3e ("net: dsa: add support for offloading HSR")
Reported-by: kernel test robot <redacted>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Tested-by: Vladimir Oltean <olteanv@gmail.com>

Re: [PATCH net-next] net: dsa: Fix dependencies with HSR

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-02-23 03:01:08

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Fri, 19 Feb 2021 21:12:21 -0800 you wrote:
The core DSA framework uses hsr_is_master() which would not resolve to a
valid symbol if HSR is built-into the kernel and DSA is a module.

Fixes: 18596f504a3e ("net: dsa: add support for offloading HSR")
Reported-by: kernel test robot <redacted>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

[...]
Here is the summary with links:
  - [net-next] net: dsa: Fix dependencies with HSR
    https://git.kernel.org/netdev/net/c/94ead4caa061

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help