2020-01-16 12:58:36

by Hongbo Yao

[permalink] [raw]
Subject: [PATCH -next] drivers/net: netdevsim depends on INET

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 <[email protected]>
Fixes: 83c9e13aa39ae("netdevsim: add software driver for testing
offloads")
Signed-off-by: Hongbo Yao <[email protected]>
---
drivers/net/Kconfig | 1 +
1 file changed, 1 insertion(+)

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
--
2.20.1


2020-01-16 13:06:49

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH -next] drivers/net: netdevsim depends on INET

On Thu, 16 Jan 2020 20:52:19 +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 <[email protected]>
> Fixes: 83c9e13aa39ae("netdevsim: add software driver for testing
> offloads")

Please provide a _correct_ Fixes tag, and don't line wrap it.
The commit you're pointing to doesn't use any of the fib functions
so how can it be to blame?

> Signed-off-by: Hongbo Yao <[email protected]>
> ---
> drivers/net/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> 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

2020-01-16 13:15:05

by Hongbo Yao

[permalink] [raw]
Subject: Re: [PATCH -next] drivers/net: netdevsim depends on INET



On 2020/1/16 21:05, Jakub Kicinski wrote:
> On Thu, 16 Jan 2020 20:52:19 +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 <[email protected]>
>> Fixes: 83c9e13aa39ae("netdevsim: add software driver for testing
>> offloads")
>
> Please provide a _correct_ Fixes tag, and don't line wrap it.
> The commit you're pointing to doesn't use any of the fib functions
> so how can it be to blame?

Thank you for catching my mistake.
I'll resend it.

Best regards,
Hongbo.
>> Signed-off-by: Hongbo Yao <[email protected]>
>> ---
>> drivers/net/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> 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
>
>
> .
>