All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency
@ 2021-01-28 16:33 Kurt Kanzenbach
  2021-01-28 16:37 ` Vladimir Oltean
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Kurt Kanzenbach @ 2021-01-28 16:33 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot, Florian Fainelli, Vladimir Oltean
  Cc: David S. Miller, Jakub Kicinski, netdev, Kurt Kanzenbach, Randy Dunlap

Add missing dependency to TAPRIO to avoid build failures such as:

|ERROR: modpost: "taprio_offload_get" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
|ERROR: modpost: "taprio_offload_free" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!

Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
---
 drivers/net/dsa/hirschmann/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Note: It's not against net, because the fixed commit is not in net tree, yet.

diff --git a/drivers/net/dsa/hirschmann/Kconfig b/drivers/net/dsa/hirschmann/Kconfig
index e01191107a4b..9ea2c643f8f8 100644
--- a/drivers/net/dsa/hirschmann/Kconfig
+++ b/drivers/net/dsa/hirschmann/Kconfig
@@ -5,6 +5,7 @@ config NET_DSA_HIRSCHMANN_HELLCREEK
 	depends on NET_DSA
 	depends on PTP_1588_CLOCK
 	depends on LEDS_CLASS
+	depends on NET_SCH_TAPRIO
 	select NET_DSA_TAG_HELLCREEK
 	help
 	  This driver adds support for Hirschmann Hellcreek TSN switches.
-- 
2.20.1


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

* Re: [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency
  2021-01-28 16:33 [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency Kurt Kanzenbach
@ 2021-01-28 16:37 ` Vladimir Oltean
  2021-01-28 17:02   ` Arnd Bergmann
  2021-01-28 20:00 ` Randy Dunlap
  2021-01-30  5:10 ` patchwork-bot+netdevbpf
  2 siblings, 1 reply; 7+ messages in thread
From: Vladimir Oltean @ 2021-01-28 16:37 UTC (permalink / raw)
  To: Kurt Kanzenbach
  Cc: Andrew Lunn, Vivien Didelot, Florian Fainelli, David S. Miller,
	Jakub Kicinski, netdev, Randy Dunlap, Arnd Bergmann

On Thu, Jan 28, 2021 at 05:33:38PM +0100, Kurt Kanzenbach wrote:
> Add missing dependency to TAPRIO to avoid build failures such as:
>
> |ERROR: modpost: "taprio_offload_get" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
> |ERROR: modpost: "taprio_offload_free" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
>
> Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> ---
>  drivers/net/dsa/hirschmann/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> Note: It's not against net, because the fixed commit is not in net tree, yet.
>
> diff --git a/drivers/net/dsa/hirschmann/Kconfig b/drivers/net/dsa/hirschmann/Kconfig
> index e01191107a4b..9ea2c643f8f8 100644
> --- a/drivers/net/dsa/hirschmann/Kconfig
> +++ b/drivers/net/dsa/hirschmann/Kconfig
> @@ -5,6 +5,7 @@ config NET_DSA_HIRSCHMANN_HELLCREEK
>  	depends on NET_DSA
>  	depends on PTP_1588_CLOCK
>  	depends on LEDS_CLASS
> +	depends on NET_SCH_TAPRIO
>  	select NET_DSA_TAG_HELLCREEK
>  	help
>  	  This driver adds support for Hirschmann Hellcreek TSN switches.
> --
> 2.20.1
>

Note that for sja1105, Arnd solved it this way. I am still not sure why.

commit 5d294fc483405de9c0913ab744a31e6fa7cb0f40
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Fri Oct 25 09:26:35 2019 +0200

    net: dsa: sja1105: improve NET_DSA_SJA1105_TAS dependency

    An earlier bugfix introduced a dependency on CONFIG_NET_SCH_TAPRIO,
    but this missed the case of NET_SCH_TAPRIO=m and NET_DSA_SJA1105=y,
    which still causes a link error:

    drivers/net/dsa/sja1105/sja1105_tas.o: In function `sja1105_setup_tc_taprio':
    sja1105_tas.c:(.text+0x5c): undefined reference to `taprio_offload_free'
    sja1105_tas.c:(.text+0x3b4): undefined reference to `taprio_offload_get'
    drivers/net/dsa/sja1105/sja1105_tas.o: In function `sja1105_tas_teardown':
    sja1105_tas.c:(.text+0x6ec): undefined reference to `taprio_offload_free'

    Change the dependency to only allow selecting the TAS code when it
    can link against the taprio code.

    Fixes: a8d570de0cc6 ("net: dsa: sja1105: Add dependency for NET_DSA_SJA1105_TAS")
    Fixes: 317ab5b86c8e ("net: dsa: sja1105: Configure the Time-Aware Scheduler via tc-taprio offload")
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/drivers/net/dsa/sja1105/Kconfig b/drivers/net/dsa/sja1105/Kconfig
index f40b248f0b23..ffac0ea4e8d5 100644
--- a/drivers/net/dsa/sja1105/Kconfig
+++ b/drivers/net/dsa/sja1105/Kconfig
@@ -26,8 +26,8 @@ config NET_DSA_SJA1105_PTP

 config NET_DSA_SJA1105_TAS
        bool "Support for the Time-Aware Scheduler on NXP SJA1105"
-       depends on NET_DSA_SJA1105
-       depends on NET_SCH_TAPRIO
+       depends on NET_DSA_SJA1105 && NET_SCH_TAPRIO
+       depends on NET_SCH_TAPRIO=y || NET_DSA_SJA1105=m
        help
          This enables support for the TTEthernet-based egress scheduling
          engine in the SJA1105 DSA driver, which is controlled using a

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

* Re: [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency
  2021-01-28 16:37 ` Vladimir Oltean
@ 2021-01-28 17:02   ` Arnd Bergmann
  0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2021-01-28 17:02 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: Kurt Kanzenbach, Andrew Lunn, Vivien Didelot, Florian Fainelli,
	David S. Miller, Jakub Kicinski, Networking, Randy Dunlap,
	Arnd Bergmann

On Thu, Jan 28, 2021 at 5:37 PM Vladimir Oltean <olteanv@gmail.com> wrote:
>
> On Thu, Jan 28, 2021 at 05:33:38PM +0100, Kurt Kanzenbach wrote:
> > Add missing dependency to TAPRIO to avoid build failures such as:
> >
> > |ERROR: modpost: "taprio_offload_get" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
> > |ERROR: modpost: "taprio_offload_free" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
> >
> > Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support")
> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>

Acked-by: Arnd Bergmann <arnd@arndb.de>

> Note that for sja1105, Arnd solved it this way. I am still not sure why.
>
> commit 5d294fc483405de9c0913ab744a31e6fa7cb0f40
> Author: Arnd Bergmann <arnd@arndb.de>
> Date:   Fri Oct 25 09:26:35 2019 +0200
>
>     net: dsa: sja1105: improve NET_DSA_SJA1105_TAS dependency
>
>     An earlier bugfix introduced a dependency on CONFIG_NET_SCH_TAPRIO,
>     but this missed the case of NET_SCH_TAPRIO=m and NET_DSA_SJA1105=y,
>     which still causes a link error:
>

As I described in this commit, the problem here was that NET_DSA_SJA1105_TAS
is a 'bool' symbol with a dependency on a 'tristate', so you have to prevent
the option from getting enabled when it's part of a driver that gets built into
the kernel but the dependnecy is in a loadable module.

NET_DSA_HIRSCHMANN_HELLCREEK on the other hand is a 'tristate'
symbol itself, so the dependency takes care of it: you cannot set it to =y
when its dependency is =m.

         Arnd

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

* Re: [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency
  2021-01-28 16:33 [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency Kurt Kanzenbach
  2021-01-28 16:37 ` Vladimir Oltean
@ 2021-01-28 20:00 ` Randy Dunlap
       [not found]   ` <87im7frf8p.fsf@kurt>
  2021-01-30  5:04   ` Jakub Kicinski
  2021-01-30  5:10 ` patchwork-bot+netdevbpf
  2 siblings, 2 replies; 7+ messages in thread
From: Randy Dunlap @ 2021-01-28 20:00 UTC (permalink / raw)
  To: Kurt Kanzenbach, Andrew Lunn, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean
  Cc: David S. Miller, Jakub Kicinski, netdev

On 1/28/21 8:33 AM, Kurt Kanzenbach wrote:
> Add missing dependency to TAPRIO to avoid build failures such as:
> 
> |ERROR: modpost: "taprio_offload_get" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
> |ERROR: modpost: "taprio_offload_free" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
> 
> Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> ---
>  drivers/net/dsa/hirschmann/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> Note: It's not against net, because the fixed commit is not in net tree, yet.
> 
> diff --git a/drivers/net/dsa/hirschmann/Kconfig b/drivers/net/dsa/hirschmann/Kconfig
> index e01191107a4b..9ea2c643f8f8 100644
> --- a/drivers/net/dsa/hirschmann/Kconfig
> +++ b/drivers/net/dsa/hirschmann/Kconfig
> @@ -5,6 +5,7 @@ config NET_DSA_HIRSCHMANN_HELLCREEK
>  	depends on NET_DSA
>  	depends on PTP_1588_CLOCK
>  	depends on LEDS_CLASS
> +	depends on NET_SCH_TAPRIO
>  	select NET_DSA_TAG_HELLCREEK
>  	help
>  	  This driver adds support for Hirschmann Hellcreek TSN switches.
> 

Thanks. This fixes the build errors.
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
 

However, I do see this in the build output when
NET_DSA_HIRSCHMANN_HELLCREEK is disabled:

  AR      drivers/net/dsa/hirschmann/built-in.a

That is an empty archive file (8 bytes), which is caused by
drivers/net/dsa/Makefile:

obj-y				+= hirschmann/


Is there some reason that it's not done like this?
This passes my y/m/n testing.

---
From: Randy Dunlap <rdunlap@infradead.org>

This prevents descending into the net/dsa/hirschmann/ subdirectory
and building an empty archive file:

  AR      drivers/net/dsa/hirschmann/built-in.a

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
 drivers/net/dsa/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20210128.orig/drivers/net/dsa/Makefile
+++ linux-next-20210128/drivers/net/dsa/Makefile
@@ -18,7 +18,7 @@ obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX) +=
 obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM) += vitesse-vsc73xx-platform.o
 obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_SPI) += vitesse-vsc73xx-spi.o
 obj-y				+= b53/
-obj-y				+= hirschmann/
+obj-$(CONFIG_NET_DSA_HIRSCHMANN_HELLCREEK) += hirschmann/
 obj-y				+= microchip/
 obj-y				+= mv88e6xxx/
 obj-y				+= ocelot/





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

* Re: [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency
       [not found]   ` <87im7frf8p.fsf@kurt>
@ 2021-01-29 16:41     ` Randy Dunlap
  0 siblings, 0 replies; 7+ messages in thread
From: Randy Dunlap @ 2021-01-29 16:41 UTC (permalink / raw)
  To: Kurt Kanzenbach, Andrew Lunn, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean
  Cc: David S. Miller, Jakub Kicinski, netdev

On 1/29/21 6:26 AM, Kurt Kanzenbach wrote:
> On Thu Jan 28 2021, Randy Dunlap wrote:
>> On 1/28/21 8:33 AM, Kurt Kanzenbach wrote:
>>> Add missing dependency to TAPRIO to avoid build failures such as:
>>>
>>> |ERROR: modpost: "taprio_offload_get" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
>>> |ERROR: modpost: "taprio_offload_free" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
>>>
>>> Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support")
>>> Reported-by: Randy Dunlap <rdunlap@infradead.org>
>>> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
>>> ---
>>>  drivers/net/dsa/hirschmann/Kconfig | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> Note: It's not against net, because the fixed commit is not in net tree, yet.
>>>
>>> diff --git a/drivers/net/dsa/hirschmann/Kconfig b/drivers/net/dsa/hirschmann/Kconfig
>>> index e01191107a4b..9ea2c643f8f8 100644
>>> --- a/drivers/net/dsa/hirschmann/Kconfig
>>> +++ b/drivers/net/dsa/hirschmann/Kconfig
>>> @@ -5,6 +5,7 @@ config NET_DSA_HIRSCHMANN_HELLCREEK
>>>  	depends on NET_DSA
>>>  	depends on PTP_1588_CLOCK
>>>  	depends on LEDS_CLASS
>>> +	depends on NET_SCH_TAPRIO
>>>  	select NET_DSA_TAG_HELLCREEK
>>>  	help
>>>  	  This driver adds support for Hirschmann Hellcreek TSN switches.
>>>
>>
>> Thanks. This fixes the build errors.
>> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
>>  
>>
>> However, I do see this in the build output when
>> NET_DSA_HIRSCHMANN_HELLCREEK is disabled:
>>
>>   AR      drivers/net/dsa/hirschmann/built-in.a
>>
>> That is an empty archive file (8 bytes), which is caused by
>> drivers/net/dsa/Makefile:
>>
>> obj-y				+= hirschmann/
>>
>>
>> Is there some reason that it's not done like this?
>> This passes my y/m/n testing.
> 
> Actually I cannot reproduce this. I've disabled
> NET_DSA_HIRSCHMANN_HELLCREEK and nothing shows up in the build log.

Hmph, I don't see it on a clean build either.
Sorry for the noise.

-- 
~Randy


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

* Re: [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency
  2021-01-28 20:00 ` Randy Dunlap
       [not found]   ` <87im7frf8p.fsf@kurt>
@ 2021-01-30  5:04   ` Jakub Kicinski
  1 sibling, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2021-01-30  5:04 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Kurt Kanzenbach, Andrew Lunn, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, netdev

On Thu, 28 Jan 2021 12:00:38 -0800 Randy Dunlap wrote:
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>

nit: careful with the tags in replies to patches, patchwork will add
     them onto the patch you're replying to

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

* Re: [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency
  2021-01-28 16:33 [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency Kurt Kanzenbach
  2021-01-28 16:37 ` Vladimir Oltean
  2021-01-28 20:00 ` Randy Dunlap
@ 2021-01-30  5:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-30  5:10 UTC (permalink / raw)
  To: Kurt Kanzenbach
  Cc: andrew, vivien.didelot, f.fainelli, olteanv, davem, kuba, netdev,
	rdunlap

Hello:

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

On Thu, 28 Jan 2021 17:33:38 +0100 you wrote:
> Add missing dependency to TAPRIO to avoid build failures such as:
> 
> |ERROR: modpost: "taprio_offload_get" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
> |ERROR: modpost: "taprio_offload_free" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
> 
> Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> 
> [...]

Here is the summary with links:
  - [net-next] net: dsa: hellcreek: Add missing TAPRIO dependency
    https://git.kernel.org/netdev/net-next/c/6c13d75beee5

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] 7+ messages in thread

end of thread, other threads:[~2021-01-30  8:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 16:33 [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency Kurt Kanzenbach
2021-01-28 16:37 ` Vladimir Oltean
2021-01-28 17:02   ` Arnd Bergmann
2021-01-28 20:00 ` Randy Dunlap
     [not found]   ` <87im7frf8p.fsf@kurt>
2021-01-29 16:41     ` Randy Dunlap
2021-01-30  5:04   ` Jakub Kicinski
2021-01-30  5:10 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.