diff mbox

[net-next] dsa: change "select" to "depends on" for switchdev in Kconfig

Message ID 1426092268-1713-1-git-send-email-jiri@resnulli.us
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Jiri Pirko March 11, 2015, 4:44 p.m. UTC
This would fix randconfig compile error:
net/built-in.o: In function `netdev_switch_fib_ipv4_abort':
(.text+0xf7811): undefined reference to `fib_flush_external'

Also it fixes following warning:
warning: (NET_DSA) selects NET_SWITCHDEV which has unmet direct dependencies (NET && INET)

Suggested-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 net/dsa/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Florian Fainelli March 11, 2015, 4:46 p.m. UTC | #1
2015-03-11 9:44 GMT-07:00 Jiri Pirko <jiri@resnulli.us>:
> This would fix randconfig compile error:
> net/built-in.o: In function `netdev_switch_fib_ipv4_abort':
> (.text+0xf7811): undefined reference to `fib_flush_external'
>
> Also it fixes following warning:
> warning: (NET_DSA) selects NET_SWITCHDEV which has unmet direct dependencies (NET && INET)
>
> Suggested-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>

> ---
>  net/dsa/Kconfig | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
> index b45206e..9379a9c 100644
> --- a/net/dsa/Kconfig
> +++ b/net/dsa/Kconfig
> @@ -6,9 +6,8 @@ config HAVE_NET_DSA
>
>  config NET_DSA
>         tristate
> -       depends on HAVE_NET_DSA
> +       depends on HAVE_NET_DSA && NET_SWITCHDEV
>         select PHYLIB
> -       select NET_SWITCHDEV
>
>  if NET_DSA
>
> --
> 1.9.3
>
Randy Dunlap March 11, 2015, 9:53 p.m. UTC | #2
On 03/11/15 09:44, Jiri Pirko wrote:
> This would fix randconfig compile error:
> net/built-in.o: In function `netdev_switch_fib_ipv4_abort':
> (.text+0xf7811): undefined reference to `fib_flush_external'
> 
> Also it fixes following warning:
> warning: (NET_DSA) selects NET_SWITCHDEV which has unmet direct dependencies (NET && INET)
> 
> Suggested-by: Randy Dunlap <rdunlap@infradead.org>

I think that should be Reported-by: /me.

This is probably a good patch but drivers/net/dsa/Kconfig still does several
selects on NET_DSA when NET_SWITCHDEV is not enabled, so there is still a
(different) build error:

warning: (NET_DSA_MV88E6060 && NET_DSA_MV88E6131 && NET_DSA_MV88E6123_61_65 && NET_DSA_MV88E6171 && NET_DSA_MV88E6352 && NET_DSA_BCM_SF2) selects NET_DSA which has unmet direct dependencies (NET && HAVE_NET_DSA && NET_SWITCHDEV)

../net/dsa/slave.c:575:2: error: unknown field 'ndo_switch_parent_id_get' specified in initializer
  .ndo_switch_parent_id_get = dsa_slave_parent_id_get,
  ^
../net/dsa/slave.c:575:2: warning: initialization from incompatible pointer type [enabled by default]
../net/dsa/slave.c:575:2: warning: (near initialization for 'dsa_slave_netdev_ops.ndo_set_config') [enabled by default]
../net/dsa/slave.c:576:2: error: unknown field 'ndo_switch_port_stp_update' specified in initializer
  .ndo_switch_port_stp_update = dsa_slave_stp_update,
  ^
../net/dsa/slave.c:576:2: warning: initialization from incompatible pointer type [enabled by default]
../net/dsa/slave.c:576:2: warning: (near initialization for 'dsa_slave_netdev_ops.ndo_change_mtu') [enabled by default]

> Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> ---
>  net/dsa/Kconfig | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
> index b45206e..9379a9c 100644
> --- a/net/dsa/Kconfig
> +++ b/net/dsa/Kconfig
> @@ -6,9 +6,8 @@ config HAVE_NET_DSA
>  
>  config NET_DSA
>  	tristate
> -	depends on HAVE_NET_DSA
> +	depends on HAVE_NET_DSA && NET_SWITCHDEV
>  	select PHYLIB
> -	select NET_SWITCHDEV
>  
>  if NET_DSA
>  
>
David Miller March 11, 2015, 10:04 p.m. UTC | #3
From: Jiri Pirko <jiri@resnulli.us>
Date: Wed, 11 Mar 2015 17:44:28 +0100

> This would fix randconfig compile error:
> net/built-in.o: In function `netdev_switch_fib_ipv4_abort':
> (.text+0xf7811): undefined reference to `fib_flush_external'
> 
> Also it fixes following warning:
> warning: (NET_DSA) selects NET_SWITCHDEV which has unmet direct dependencies (NET && INET)
> 
> Suggested-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

This is a huge mess.

As Randy stated, lots of stuff does select DSA still.

I think all references to switchdev and dsa need to be converted
to depends, in order to really fix this problem properly.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index b45206e..9379a9c 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -6,9 +6,8 @@  config HAVE_NET_DSA
 
 config NET_DSA
 	tristate
-	depends on HAVE_NET_DSA
+	depends on HAVE_NET_DSA && NET_SWITCHDEV
 	select PHYLIB
-	select NET_SWITCHDEV
 
 if NET_DSA