Message ID | 20190819120825.74460-1-yuehaibing@huawei.com |
---|---|
State | Superseded |
Delegated to: | David Miller |
Headers | show |
Series | [net-next] netdevsim: Fix build error without CONFIG_INET | expand |
On Mon, Aug 19, 2019 at 08:08:25PM +0800, YueHaibing wrote: > If CONFIG_INET is not set, building fails: > > drivers/net/netdevsim/dev.o: In function `nsim_dev_trap_report_work': > dev.c:(.text+0x67b): undefined reference to `ip_send_check' > > Add CONFIG_INET Kconfig dependency to fix this. > > Reported-by: Hulk Robot <hulkci@huawei.com> > Fixes: da58f90f11f5 ("netdevsim: Add devlink-trap support") > Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Thanks for the patch. > --- > drivers/net/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig > index 48e209e..7bb786e 100644 > --- a/drivers/net/Kconfig > +++ b/drivers/net/Kconfig > @@ -505,7 +505,7 @@ source "drivers/net/hyperv/Kconfig" > > config NETDEVSIM > tristate "Simulated networking device" > - depends on DEBUG_FS > + depends on INET && DEBUG_FS > select NET_DEVLINK > help > This driver is a developer testing tool and software model that can > -- > 2.7.4 > >
On Mon, 19 Aug 2019 20:08:25 +0800, YueHaibing wrote: > If CONFIG_INET is not set, building fails: > > drivers/net/netdevsim/dev.o: In function `nsim_dev_trap_report_work': > dev.c:(.text+0x67b): undefined reference to `ip_send_check' > > Add CONFIG_INET Kconfig dependency to fix this. > > Reported-by: Hulk Robot <hulkci@huawei.com> > Fixes: da58f90f11f5 ("netdevsim: Add devlink-trap support") > Signed-off-by: YueHaibing <yuehaibing@huawei.com> Hmm.. I'd rather the test module did not have hard dependencies on marginally important config options. We have done a pretty good job so far limiting the requirements though separating the code out at compilation object level. The more tests depend on netdevsim and the more bots we have running tests against randconfig - the more important this is. This missing reference here is for calculating a checksum over a constant header.. could we perhaps just hard code the checksum?
On Mon, Aug 19, 2019 at 02:59:00PM -0700, Jakub Kicinski wrote: > On Mon, 19 Aug 2019 20:08:25 +0800, YueHaibing wrote: > > If CONFIG_INET is not set, building fails: > > > > drivers/net/netdevsim/dev.o: In function `nsim_dev_trap_report_work': > > dev.c:(.text+0x67b): undefined reference to `ip_send_check' > > > > Add CONFIG_INET Kconfig dependency to fix this. > > > > Reported-by: Hulk Robot <hulkci@huawei.com> > > Fixes: da58f90f11f5 ("netdevsim: Add devlink-trap support") > > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > > Hmm.. I'd rather the test module did not have hard dependencies on > marginally important config options. We have done a pretty good job > so far limiting the requirements though separating the code out at > compilation object level. The more tests depend on netdevsim and the > more bots we have running tests against randconfig - the more important > this is. > > This missing reference here is for calculating a checksum over a > constant header.. could we perhaps just hard code the checksum? Sure. I was AFK today, will send a patch later today when I get home. Thanks
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 48e209e..7bb786e 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -505,7 +505,7 @@ source "drivers/net/hyperv/Kconfig" config NETDEVSIM tristate "Simulated networking device" - depends on DEBUG_FS + depends on INET && DEBUG_FS select NET_DEVLINK help This driver is a developer testing tool and software model that can
If CONFIG_INET is not set, building fails: drivers/net/netdevsim/dev.o: In function `nsim_dev_trap_report_work': dev.c:(.text+0x67b): undefined reference to `ip_send_check' Add CONFIG_INET Kconfig dependency to fix this. Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: da58f90f11f5 ("netdevsim: Add devlink-trap support") Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- drivers/net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)