diff mbox series

[v2,-next] drivers/net: netdevsim depends on INET

Message ID 20200116131404.169423-1-yaohongbo@huawei.com
State Accepted
Delegated to: David Miller
Headers show
Series [v2,-next] drivers/net: netdevsim depends on INET | expand

Commit Message

Hongbo Yao Jan. 16, 2020, 1:14 p.m. UTC
If CONFIG_INET is not set and CONFIG_NETDEVSIM=y.
Building drivers/net/netdevsim/fib.o will get the following error:

drivers/net/netdevsim/fib.o: In function `nsim_fib4_rt_hw_flags_set':
fib.c:(.text+0x12b): undefined reference to `fib_alias_hw_flags_set'
drivers/net/netdevsim/fib.o: In function `nsim_fib4_rt_destroy':
fib.c:(.text+0xb11): undefined reference to `free_fib_info'

Correct the Kconfig for netdevsim.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 48bb9eb47b270("netdevsim: fib: Add dummy implementation for FIB offload")
Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>
---
 drivers/net/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Jakub Kicinski Jan. 16, 2020, 1:31 p.m. UTC | #1
On Thu, 16 Jan 2020 21:14:04 +0800, Hongbo Yao wrote:
> If CONFIG_INET is not set and CONFIG_NETDEVSIM=y.
> Building drivers/net/netdevsim/fib.o will get the following error:
> 
> drivers/net/netdevsim/fib.o: In function `nsim_fib4_rt_hw_flags_set':
> fib.c:(.text+0x12b): undefined reference to `fib_alias_hw_flags_set'
> drivers/net/netdevsim/fib.o: In function `nsim_fib4_rt_destroy':
> fib.c:(.text+0xb11): undefined reference to `free_fib_info'
> 
> Correct the Kconfig for netdevsim.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 48bb9eb47b270("netdevsim: fib: Add dummy implementation for FIB offload")

Looks better :) Still missing a space between the hash and the bracket,
but:

Acked-by: Jakub Kicinski <kuba@kernel.org>

While at it - does mlxsw have the same problem by any chance?
Jiri Pirko Jan. 16, 2020, 1:56 p.m. UTC | #2
Thu, Jan 16, 2020 at 02:31:37PM CET, kuba@kernel.org wrote:
>On Thu, 16 Jan 2020 21:14:04 +0800, Hongbo Yao wrote:
>> If CONFIG_INET is not set and CONFIG_NETDEVSIM=y.
>> Building drivers/net/netdevsim/fib.o will get the following error:
>> 
>> drivers/net/netdevsim/fib.o: In function `nsim_fib4_rt_hw_flags_set':
>> fib.c:(.text+0x12b): undefined reference to `fib_alias_hw_flags_set'
>> drivers/net/netdevsim/fib.o: In function `nsim_fib4_rt_destroy':
>> fib.c:(.text+0xb11): undefined reference to `free_fib_info'
>> 
>> Correct the Kconfig for netdevsim.
>> 
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Fixes: 48bb9eb47b270("netdevsim: fib: Add dummy implementation for FIB offload")
>
>Looks better :) Still missing a space between the hash and the bracket,
>but:
>
>Acked-by: Jakub Kicinski <kuba@kernel.org>
>
>While at it - does mlxsw have the same problem by any chance?

Looks like it does.
Ido Schimmel Jan. 16, 2020, 2:04 p.m. UTC | #3
On Thu, Jan 16, 2020 at 02:56:50PM +0100, Jiri Pirko wrote:
> Thu, Jan 16, 2020 at 02:31:37PM CET, kuba@kernel.org wrote:
> >On Thu, 16 Jan 2020 21:14:04 +0800, Hongbo Yao wrote:
> >> If CONFIG_INET is not set and CONFIG_NETDEVSIM=y.
> >> Building drivers/net/netdevsim/fib.o will get the following error:
> >> 
> >> drivers/net/netdevsim/fib.o: In function `nsim_fib4_rt_hw_flags_set':
> >> fib.c:(.text+0x12b): undefined reference to `fib_alias_hw_flags_set'
> >> drivers/net/netdevsim/fib.o: In function `nsim_fib4_rt_destroy':
> >> fib.c:(.text+0xb11): undefined reference to `free_fib_info'
> >> 
> >> Correct the Kconfig for netdevsim.
> >> 
> >> Reported-by: Hulk Robot <hulkci@huawei.com>
> >> Fixes: 48bb9eb47b270("netdevsim: fib: Add dummy implementation for FIB offload")
> >
> >Looks better :) Still missing a space between the hash and the bracket,
> >but:
> >
> >Acked-by: Jakub Kicinski <kuba@kernel.org>
> >
> >While at it - does mlxsw have the same problem by any chance?
> 
> Looks like it does.

MLXSW_SPECTRUM depends on NET_SWITCHDEV which in turn depends on INET
David Miller Jan. 17, 2020, 10:28 a.m. UTC | #4
From: Hongbo Yao <yaohongbo@huawei.com>
Date: Thu, 16 Jan 2020 21:14:04 +0800

> If CONFIG_INET is not set and CONFIG_NETDEVSIM=y.
> Building drivers/net/netdevsim/fib.o will get the following error:
> 
> drivers/net/netdevsim/fib.o: In function `nsim_fib4_rt_hw_flags_set':
> fib.c:(.text+0x12b): undefined reference to `fib_alias_hw_flags_set'
> drivers/net/netdevsim/fib.o: In function `nsim_fib4_rt_destroy':
> fib.c:(.text+0xb11): undefined reference to `free_fib_info'
> 
> Correct the Kconfig for netdevsim.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 48bb9eb47b270 ("netdevsim: fib: Add dummy implementation for FIB offload")
> Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>

Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 77ee9afad038..25a8f9387d5a 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -549,6 +549,7 @@  source "drivers/net/hyperv/Kconfig"
 config NETDEVSIM
 	tristate "Simulated networking device"
 	depends on DEBUG_FS
+	depends on INET
 	depends on IPV6 || IPV6=n
 	select NET_DEVLINK
 	help