Message ID | 20190723024908.11876-1-yuehaibing@huawei.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | RDMA/hns: Fix build error for hip08 | expand |
On Tue, Jul 23, 2019 at 10:49:08AM +0800, YueHaibing wrote: > If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, > but INFINIBAND_HNS is y, building fails: > > drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': > hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' > drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': > hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' It means that you have a problem with header files of your hns3. > > Reported-by: Hulk Robot <hulkci@huawei.com> > Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > --- > drivers/infiniband/hw/hns/Kconfig | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/infiniband/hw/hns/Kconfig b/drivers/infiniband/hw/hns/Kconfig > index b59da5d..4371c80 100644 > --- a/drivers/infiniband/hw/hns/Kconfig > +++ b/drivers/infiniband/hw/hns/Kconfig > @@ -23,7 +23,8 @@ config INFINIBAND_HNS_HIP06 > > config INFINIBAND_HNS_HIP08 > bool "Hisilicon Hip08 Family RoCE support" > - depends on INFINIBAND_HNS && PCI && HNS3 > + depends on INFINIBAND_HNS && (INFINIBAND_HNS = HNS3) This is wrong. > + depends on PCI > ---help--- > RoCE driver support for Hisilicon RoCE engine in Hisilicon Hip08 SoC. > The RoCE engine is a PCI device. > -- > 2.7.4 > >
On 2019/7/23 15:43, Leon Romanovsky wrote: > On Tue, Jul 23, 2019 at 10:49:08AM +0800, YueHaibing wrote: >> If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, >> but INFINIBAND_HNS is y, building fails: >> >> drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': >> hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' >> drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': >> hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' > > It means that you have a problem with header files of your hns3. hnae3_unregister_client is a EXPORT_SYMBOL. If INFINIBAND_HNS is y, hns-roce-hw-v2 will be built-in, but as HNS3 is set to m, linking will failed. I can't see how to fix this in header files of hns3, or am I missing something? > >> >> Reported-by: Hulk Robot <hulkci@huawei.com> >> Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") >> Signed-off-by: YueHaibing <yuehaibing@huawei.com> >> --- >> drivers/infiniband/hw/hns/Kconfig | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/infiniband/hw/hns/Kconfig b/drivers/infiniband/hw/hns/Kconfig >> index b59da5d..4371c80 100644 >> --- a/drivers/infiniband/hw/hns/Kconfig >> +++ b/drivers/infiniband/hw/hns/Kconfig >> @@ -23,7 +23,8 @@ config INFINIBAND_HNS_HIP06 >> >> config INFINIBAND_HNS_HIP08 >> bool "Hisilicon Hip08 Family RoCE support" >> - depends on INFINIBAND_HNS && PCI && HNS3 >> + depends on INFINIBAND_HNS && (INFINIBAND_HNS = HNS3) > > This is wrong. > >> + depends on PCI >> ---help--- >> RoCE driver support for Hisilicon RoCE engine in Hisilicon Hip08 SoC. >> The RoCE engine is a PCI device. >> -- >> 2.7.4 >> >> > > . >
On Tue, Jul 23, 2019 at 06:06:22PM +0800, Yuehaibing wrote: > > On 2019/7/23 15:43, Leon Romanovsky wrote: > > On Tue, Jul 23, 2019 at 10:49:08AM +0800, YueHaibing wrote: > >> If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, > >> but INFINIBAND_HNS is y, building fails: > >> > >> drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': > >> hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' > >> drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': > >> hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' > > > > It means that you have a problem with header files of your hns3. > > hnae3_unregister_client is a EXPORT_SYMBOL. If INFINIBAND_HNS is y, > hns-roce-hw-v2 will be built-in, but as HNS3 is set to m, linking will failed. One of the possible solution is to add "select" identifier to your Kconfig, it will ensure that HNS3 will be set to "y" too. Thanks
On Tue, Jul 23, 2019 at 10:43:39AM +0300, Leon Romanovsky wrote: > On Tue, Jul 23, 2019 at 10:49:08AM +0800, YueHaibing wrote: > > If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, > > but INFINIBAND_HNS is y, building fails: > > > > drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': > > hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' > > drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': > > hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' > > It means that you have a problem with header files of your hns3. > > > > > Reported-by: Hulk Robot <hulkci@huawei.com> > > Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") > > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > > drivers/infiniband/hw/hns/Kconfig | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/infiniband/hw/hns/Kconfig b/drivers/infiniband/hw/hns/Kconfig > > index b59da5d..4371c80 100644 > > +++ b/drivers/infiniband/hw/hns/Kconfig > > @@ -23,7 +23,8 @@ config INFINIBAND_HNS_HIP06 > > > > config INFINIBAND_HNS_HIP08 > > bool "Hisilicon Hip08 Family RoCE support" > > - depends on INFINIBAND_HNS && PCI && HNS3 > > + depends on INFINIBAND_HNS && (INFINIBAND_HNS = HNS3) > > This is wrong. It is tricky. It is asserting that the IB side is built as a module if the ethernet side is a module.. It is kind of a weird pattern as the module config is INFINIBAND_HNS and these others are just bool opens what to include, but I think it is OK.. Jason
On Tue, Jul 23, 2019 at 09:34:02AM -0300, Jason Gunthorpe wrote: > On Tue, Jul 23, 2019 at 10:43:39AM +0300, Leon Romanovsky wrote: > > On Tue, Jul 23, 2019 at 10:49:08AM +0800, YueHaibing wrote: > > > If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, > > > but INFINIBAND_HNS is y, building fails: > > > > > > drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': > > > hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' > > > drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': > > > hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' > > > > It means that you have a problem with header files of your hns3. > > > > > > > > Reported-by: Hulk Robot <hulkci@huawei.com> > > > Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") > > > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > > > drivers/infiniband/hw/hns/Kconfig | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/infiniband/hw/hns/Kconfig b/drivers/infiniband/hw/hns/Kconfig > > > index b59da5d..4371c80 100644 > > > +++ b/drivers/infiniband/hw/hns/Kconfig > > > @@ -23,7 +23,8 @@ config INFINIBAND_HNS_HIP06 > > > > > > config INFINIBAND_HNS_HIP08 > > > bool "Hisilicon Hip08 Family RoCE support" > > > - depends on INFINIBAND_HNS && PCI && HNS3 > > > + depends on INFINIBAND_HNS && (INFINIBAND_HNS = HNS3) > > > > This is wrong. > > It is tricky. It is asserting that the IB side is built as a module if > the ethernet side is a module.. > > It is kind of a weird pattern as the module config is INFINIBAND_HNS > and these others are just bool opens what to include, but I think it > is OK.. select ??? > > Jason
On Tue, Jul 23, 2019 at 04:35:40PM +0300, Leon Romanovsky wrote: > On Tue, Jul 23, 2019 at 09:34:02AM -0300, Jason Gunthorpe wrote: > > On Tue, Jul 23, 2019 at 10:43:39AM +0300, Leon Romanovsky wrote: > > > On Tue, Jul 23, 2019 at 10:49:08AM +0800, YueHaibing wrote: > > > > If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, > > > > but INFINIBAND_HNS is y, building fails: > > > > > > > > drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': > > > > hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' > > > > drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': > > > > hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' > > > > > > It means that you have a problem with header files of your hns3. > > > > > > > > > > > Reported-by: Hulk Robot <hulkci@huawei.com> > > > > Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") > > > > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > > > > drivers/infiniband/hw/hns/Kconfig | 3 ++- > > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/infiniband/hw/hns/Kconfig b/drivers/infiniband/hw/hns/Kconfig > > > > index b59da5d..4371c80 100644 > > > > +++ b/drivers/infiniband/hw/hns/Kconfig > > > > @@ -23,7 +23,8 @@ config INFINIBAND_HNS_HIP06 > > > > > > > > config INFINIBAND_HNS_HIP08 > > > > bool "Hisilicon Hip08 Family RoCE support" > > > > - depends on INFINIBAND_HNS && PCI && HNS3 > > > > + depends on INFINIBAND_HNS && (INFINIBAND_HNS = HNS3) > > > > > > This is wrong. > > > > It is tricky. It is asserting that the IB side is built as a module if > > the ethernet side is a module.. > > > > It is kind of a weird pattern as the module config is INFINIBAND_HNS > > and these others are just bool opens what to include, but I think it > > is OK.. > > select ??? select doesn't influence module or not any different from depeends Jason
On 2019/7/23 21:37, Jason Gunthorpe wrote: > On Tue, Jul 23, 2019 at 04:35:40PM +0300, Leon Romanovsky wrote: >> On Tue, Jul 23, 2019 at 09:34:02AM -0300, Jason Gunthorpe wrote: >>> On Tue, Jul 23, 2019 at 10:43:39AM +0300, Leon Romanovsky wrote: >>>> On Tue, Jul 23, 2019 at 10:49:08AM +0800, YueHaibing wrote: >>>>> If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, >>>>> but INFINIBAND_HNS is y, building fails: >>>>> >>>>> drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': >>>>> hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' >>>>> drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': >>>>> hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' >>>> >>>> It means that you have a problem with header files of your hns3. >>>> >>>>> >>>>> Reported-by: Hulk Robot <hulkci@huawei.com> >>>>> Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") >>>>> Signed-off-by: YueHaibing <yuehaibing@huawei.com> >>>>> drivers/infiniband/hw/hns/Kconfig | 3 ++- >>>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/drivers/infiniband/hw/hns/Kconfig b/drivers/infiniband/hw/hns/Kconfig >>>>> index b59da5d..4371c80 100644 >>>>> +++ b/drivers/infiniband/hw/hns/Kconfig >>>>> @@ -23,7 +23,8 @@ config INFINIBAND_HNS_HIP06 >>>>> >>>>> config INFINIBAND_HNS_HIP08 >>>>> bool "Hisilicon Hip08 Family RoCE support" >>>>> - depends on INFINIBAND_HNS && PCI && HNS3 >>>>> + depends on INFINIBAND_HNS && (INFINIBAND_HNS = HNS3) >>>> >>>> This is wrong. >>> >>> It is tricky. It is asserting that the IB side is built as a module if >>> the ethernet side is a module.. >>> >>> It is kind of a weird pattern as the module config is INFINIBAND_HNS >>> and these others are just bool opens what to include, but I think it >>> is OK.. >> >> select ??? > > select doesn't influence module or not any different from depeends Ok, it seems select is a better solution, it allows HNS3 is y while INFINIBAND_HNS is m, Will send v2, Thanks! > > Jason > > . >
diff --git a/drivers/infiniband/hw/hns/Kconfig b/drivers/infiniband/hw/hns/Kconfig index b59da5d..4371c80 100644 --- a/drivers/infiniband/hw/hns/Kconfig +++ b/drivers/infiniband/hw/hns/Kconfig @@ -23,7 +23,8 @@ config INFINIBAND_HNS_HIP06 config INFINIBAND_HNS_HIP08 bool "Hisilicon Hip08 Family RoCE support" - depends on INFINIBAND_HNS && PCI && HNS3 + depends on INFINIBAND_HNS && (INFINIBAND_HNS = HNS3) + depends on PCI ---help--- RoCE driver support for Hisilicon RoCE engine in Hisilicon Hip08 SoC. The RoCE engine is a PCI device.
If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, but INFINIBAND_HNS is y, building fails: drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- drivers/infiniband/hw/hns/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)