Netdev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH net-next] net: dsa: Fix dependencies with HSR
@ 2021-02-20  5:12 Florian Fainelli
  2021-02-20  5:14 ` Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Florian Fainelli @ 2021-02-20  5:12 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, kernel test robot, Andrew Lunn, Vivien Didelot,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	George McCollister, open list

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 <lkp@intel.com>
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


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

* Re: [PATCH net-next] net: dsa: Fix dependencies with HSR
  2021-02-20  5:12 [PATCH net-next] net: dsa: Fix dependencies with HSR Florian Fainelli
@ 2021-02-20  5:14 ` Florian Fainelli
  2021-02-20 14:24   ` George McCollister
  2021-02-20 15:36 ` Vladimir Oltean
  2021-02-23  3:00 ` patchwork-bot+netdevbpf
  2 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2021-02-20  5:14 UTC (permalink / raw)
  To: netdev
  Cc: kernel test robot, Andrew Lunn, Vivien Didelot, Vladimir Oltean,
	David S. Miller, Jakub Kicinski, George McCollister, open list



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 <lkp@intel.com>
> 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

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

* Re: [PATCH net-next] net: dsa: Fix dependencies with HSR
  2021-02-20  5:14 ` Florian Fainelli
@ 2021-02-20 14:24   ` George McCollister
  0 siblings, 0 replies; 5+ messages in thread
From: George McCollister @ 2021-02-20 14:24 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, kernel test robot, Andrew Lunn, Vivien Didelot,
	Vladimir Oltean, David S. Miller, Jakub Kicinski, open list

On Fri, Feb 19, 2021 at 11:14 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>
>
>
> 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 <lkp@intel.com>
> > 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

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

* Re: [PATCH net-next] net: dsa: Fix dependencies with HSR
  2021-02-20  5:12 [PATCH net-next] net: dsa: Fix dependencies with HSR Florian Fainelli
  2021-02-20  5:14 ` Florian Fainelli
@ 2021-02-20 15:36 ` Vladimir Oltean
  2021-02-23  3:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: Vladimir Oltean @ 2021-02-20 15:36 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, kernel test robot, Andrew Lunn, Vivien Didelot,
	David S. Miller, Jakub Kicinski, George McCollister, open list

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 <lkp@intel.com>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Tested-by: Vladimir Oltean <olteanv@gmail.com>

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

* Re: [PATCH net-next] net: dsa: Fix dependencies with HSR
  2021-02-20  5:12 [PATCH net-next] net: dsa: Fix dependencies with HSR Florian Fainelli
  2021-02-20  5:14 ` Florian Fainelli
  2021-02-20 15:36 ` Vladimir Oltean
@ 2021-02-23  3:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-23  3:00 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, lkp, andrew, vivien.didelot, olteanv, davem, kuba,
	george.mccollister, linux-kernel

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 <lkp@intel.com>
> 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



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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-20  5:12 [PATCH net-next] net: dsa: Fix dependencies with HSR Florian Fainelli
2021-02-20  5:14 ` Florian Fainelli
2021-02-20 14:24   ` George McCollister
2021-02-20 15:36 ` Vladimir Oltean
2021-02-23  3:00 ` patchwork-bot+netdevbpf

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git