2022-06-23 09:39:10

by Ren Zhijie

[permalink] [raw]
Subject: [PATCH -next] NTB: EPF: Fix Kconfig dependency

If CONFIG_NTB is not set and CONFIG_PCI_EPF_VNTB is y.

make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this:

drivers/pci/endpoint/functions/pci-epf-vntb.o: In function `epf_ntb_cmd_handler':
pci-epf-vntb.c:(.text+0x95e): undefined reference to `ntb_db_event'
pci-epf-vntb.c:(.text+0xa1f): undefined reference to `ntb_link_event'
pci-epf-vntb.c:(.text+0xa42): undefined reference to `ntb_link_event'
drivers/pci/endpoint/functions/pci-epf-vntb.o: In function `pci_vntb_probe':
pci-epf-vntb.c:(.text+0x1250): undefined reference to `ntb_register_device'

The functions ntb_*() are defined in drivers/ntb/core.c, which need CONFIG_NTB setting y to be build-in.
To fix this build error, add depends on NTB.

Reported-by: Hulk Robot <[email protected]>
Fixes: ff32fac00d97("NTB: EPF: support NTB transfer between PCI RC and EP connection")
Signed-off-by: Ren Zhijie <[email protected]>
---
drivers/pci/endpoint/functions/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/pci/endpoint/functions/Kconfig b/drivers/pci/endpoint/functions/Kconfig
index 362555b024e8..9beee4f0f4ee 100644
--- a/drivers/pci/endpoint/functions/Kconfig
+++ b/drivers/pci/endpoint/functions/Kconfig
@@ -29,6 +29,7 @@ config PCI_EPF_NTB
config PCI_EPF_VNTB
tristate "PCI Endpoint NTB driver"
depends on PCI_ENDPOINT
+ depends on NTB
select CONFIGFS_FS
help
Select this configuration option to enable the Non-Transparent
--
2.17.1


2022-06-23 15:39:20

by Frank Li

[permalink] [raw]
Subject: RE: [PATCH -next] NTB: EPF: Fix Kconfig dependency



> -----Original Message-----
> From: Ren Zhijie <[email protected]>
> Sent: Thursday, June 23, 2022 3:46 AM
> To: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; Frank Li <[email protected]>
> Cc: [email protected]; [email protected]; Ren Zhijie
> <[email protected]>
> Subject: [PATCH -next] NTB: EPF: Fix Kconfig dependency
>
> If CONFIG_NTB is not set and CONFIG_PCI_EPF_VNTB is y.
>
> make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like
> this:
>
> drivers/pci/endpoint/functions/pci-epf-vntb.o: In function
> `epf_ntb_cmd_handler':
> pci-epf-vntb.c:(.text+0x95e): undefined reference to `ntb_db_event'
> pci-epf-vntb.c:(.text+0xa1f): undefined reference to `ntb_link_event'
> pci-epf-vntb.c:(.text+0xa42): undefined reference to `ntb_link_event'
> drivers/pci/endpoint/functions/pci-epf-vntb.o: In function `pci_vntb_probe':
> pci-epf-vntb.c:(.text+0x1250): undefined reference to `ntb_register_device'
>
> The functions ntb_*() are defined in drivers/ntb/core.c, which need
> CONFIG_NTB setting y to be build-in.
> To fix this build error, add depends on NTB.
>
> Reported-by: Hulk Robot <[email protected]>
> Fixes: ff32fac00d97("NTB: EPF: support NTB transfer between PCI RC and EP
> connection")
> Signed-off-by: Ren Zhijie <[email protected]>
> ---
[Frank Li] Acked

> drivers/pci/endpoint/functions/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/endpoint/functions/Kconfig
> b/drivers/pci/endpoint/functions/Kconfig
> index 362555b024e8..9beee4f0f4ee 100644
> --- a/drivers/pci/endpoint/functions/Kconfig
> +++ b/drivers/pci/endpoint/functions/Kconfig
> @@ -29,6 +29,7 @@ config PCI_EPF_NTB
> config PCI_EPF_VNTB
> tristate "PCI Endpoint NTB driver"
> depends on PCI_ENDPOINT
> + depends on NTB
> select CONFIGFS_FS
> help
> Select this configuration option to enable the Non-Transparent
> --
> 2.17.1

2022-06-23 15:58:39

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH -next] NTB: EPF: Fix Kconfig dependency

On Thu, Jun 23, 2022 at 03:36:38PM +0000, Frank Li wrote:
> > -----Original Message-----
> > From: Ren Zhijie <[email protected]>
> > Sent: Thursday, June 23, 2022 3:46 AM
> > To: [email protected]; [email protected]; [email protected];
> > [email protected]; [email protected]; Frank Li <[email protected]>
> > Cc: [email protected]; [email protected]; Ren Zhijie
> > <[email protected]>
> > Subject: [PATCH -next] NTB: EPF: Fix Kconfig dependency

@Ren, please use a typical subject line for the file, e.g.,

PCI: endpoint: ...

> > If CONFIG_NTB is not set and CONFIG_PCI_EPF_VNTB is y.
> >
> > make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like
> > this:
> >
> > drivers/pci/endpoint/functions/pci-epf-vntb.o: In function
> > `epf_ntb_cmd_handler':
> > pci-epf-vntb.c:(.text+0x95e): undefined reference to `ntb_db_event'
> > pci-epf-vntb.c:(.text+0xa1f): undefined reference to `ntb_link_event'
> > pci-epf-vntb.c:(.text+0xa42): undefined reference to `ntb_link_event'
> > drivers/pci/endpoint/functions/pci-epf-vntb.o: In function `pci_vntb_probe':
> > pci-epf-vntb.c:(.text+0x1250): undefined reference to `ntb_register_device'
> >
> > The functions ntb_*() are defined in drivers/ntb/core.c, which need
> > CONFIG_NTB setting y to be build-in.
> > To fix this build error, add depends on NTB.
> >
> > Reported-by: Hulk Robot <[email protected]>
> > Fixes: ff32fac00d97("NTB: EPF: support NTB transfer between PCI RC and EP
> > connection")
> > Signed-off-by: Ren Zhijie <[email protected]>
> > ---
> [Frank Li] Acked

@Frank: if you use the conventional style, e.g.,
"Acked-by: Frank Li <[email protected]>", tooling like b4 will
automatically pick it up. Just saying "Acked" is likely to get missed
or ignored.
>
> > drivers/pci/endpoint/functions/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/pci/endpoint/functions/Kconfig
> > b/drivers/pci/endpoint/functions/Kconfig
> > index 362555b024e8..9beee4f0f4ee 100644
> > --- a/drivers/pci/endpoint/functions/Kconfig
> > +++ b/drivers/pci/endpoint/functions/Kconfig
> > @@ -29,6 +29,7 @@ config PCI_EPF_NTB
> > config PCI_EPF_VNTB
> > tristate "PCI Endpoint NTB driver"
> > depends on PCI_ENDPOINT
> > + depends on NTB
> > select CONFIGFS_FS
> > help
> > Select this configuration option to enable the Non-Transparent
> > --
> > 2.17.1
>

2022-06-23 16:17:48

by Frank Li

[permalink] [raw]
Subject: RE: [EXT] Re: [PATCH -next] NTB: EPF: Fix Kconfig dependency



> -----Original Message-----
> From: Bjorn Helgaas <[email protected]>
> Sent: Thursday, June 23, 2022 10:55 AM
> To: Frank Li <[email protected]>
> Cc: Ren Zhijie <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]
> Subject: [EXT] Re: [PATCH -next] NTB: EPF: Fix Kconfig dependency
>
> Caution: EXT Email
>
> On Thu, Jun 23, 2022 at 03:36:38PM +0000, Frank Li wrote:
> > > -----Original Message-----
> > > From: Ren Zhijie <[email protected]>
> > > Sent: Thursday, June 23, 2022 3:46 AM
> > > To: [email protected]; [email protected]; [email protected];
> > > [email protected]; [email protected]; Frank Li <[email protected]>
> > > Cc: [email protected]; [email protected]; Ren Zhijie
> > > <[email protected]>
> > > Subject: [PATCH -next] NTB: EPF: Fix Kconfig dependency
>
> @Ren, please use a typical subject line for the file, e.g.,
>
> PCI: endpoint: ...
>
> > > If CONFIG_NTB is not set and CONFIG_PCI_EPF_VNTB is y.
> > >
> > > make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed,
> like
> > > this:
> > >
> > > drivers/pci/endpoint/functions/pci-epf-vntb.o: In function
> > > `epf_ntb_cmd_handler':
> > > pci-epf-vntb.c:(.text+0x95e): undefined reference to `ntb_db_event'
> > > pci-epf-vntb.c:(.text+0xa1f): undefined reference to `ntb_link_event'
> > > pci-epf-vntb.c:(.text+0xa42): undefined reference to `ntb_link_event'
> > > drivers/pci/endpoint/functions/pci-epf-vntb.o: In function
> `pci_vntb_probe':
> > > pci-epf-vntb.c:(.text+0x1250): undefined reference to
> `ntb_register_device'
> > >
> > > The functions ntb_*() are defined in drivers/ntb/core.c, which need
> > > CONFIG_NTB setting y to be build-in.
> > > To fix this build error, add depends on NTB.
> > >
> > > Reported-by: Hulk Robot <[email protected]>
> > > Fixes: ff32fac00d97("NTB: EPF: support NTB transfer between PCI RC and
> EP
> > > connection")
> > > Signed-off-by: Ren Zhijie <[email protected]>
> > > ---
> > [Frank Li] Acked
>
> @Frank: if you use the conventional style, e.g.,
> "Acked-by: Frank Li <[email protected]>", tooling like b4 will
> automatically pick it up. Just saying "Acked" is likely to get missed
> or ignored.

Thanks.
Acked-by: Frank Li <[email protected]>

> >
> > > drivers/pci/endpoint/functions/Kconfig | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/pci/endpoint/functions/Kconfig
> > > b/drivers/pci/endpoint/functions/Kconfig
> > > index 362555b024e8..9beee4f0f4ee 100644
> > > --- a/drivers/pci/endpoint/functions/Kconfig
> > > +++ b/drivers/pci/endpoint/functions/Kconfig
> > > @@ -29,6 +29,7 @@ config PCI_EPF_NTB
> > > config PCI_EPF_VNTB
> > > tristate "PCI Endpoint NTB driver"
> > > depends on PCI_ENDPOINT
> > > + depends on NTB
> > > select CONFIGFS_FS
> > > help
> > > Select this configuration option to enable the Non-Transparent
> > > --
> > > 2.17.1
> >

2022-06-24 01:23:18

by Ren Zhijie

[permalink] [raw]
Subject: Re: [EXT] Re: [PATCH -next] NTB: EPF: Fix Kconfig dependency

在 2022/6/23 23:58, Frank Li 写道:
>
>> -----Original Message-----
>> From: Bjorn Helgaas <[email protected]>
>> Sent: Thursday, June 23, 2022 10:55 AM
>> To: Frank Li <[email protected]>
>> Cc: Ren Zhijie <[email protected]>; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected]
>> Subject: [EXT] Re: [PATCH -next] NTB: EPF: Fix Kconfig dependency
>>
>> Caution: EXT Email
>>
>> On Thu, Jun 23, 2022 at 03:36:38PM +0000, Frank Li wrote:
>>>> -----Original Message-----
>>>> From: Ren Zhijie <[email protected]>
>>>> Sent: Thursday, June 23, 2022 3:46 AM
>>>> To: [email protected]; [email protected]; [email protected];
>>>> [email protected]; [email protected]; Frank Li <[email protected]>
>>>> Cc: [email protected]; [email protected]; Ren Zhijie
>>>> <[email protected]>
>>>> Subject: [PATCH -next] NTB: EPF: Fix Kconfig dependency
>> @Ren, please use a typical subject line for the file, e.g.,
>>
>> PCI: endpoint: ...
>>
>>>> If CONFIG_NTB is not set and CONFIG_PCI_EPF_VNTB is y.
>>>>
>>>> make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed,
>> like
>>>> this:
>>>>
>>>> drivers/pci/endpoint/functions/pci-epf-vntb.o: In function
>>>> `epf_ntb_cmd_handler':
>>>> pci-epf-vntb.c:(.text+0x95e): undefined reference to `ntb_db_event'
>>>> pci-epf-vntb.c:(.text+0xa1f): undefined reference to `ntb_link_event'
>>>> pci-epf-vntb.c:(.text+0xa42): undefined reference to `ntb_link_event'
>>>> drivers/pci/endpoint/functions/pci-epf-vntb.o: In function
>> `pci_vntb_probe':
>>>> pci-epf-vntb.c:(.text+0x1250): undefined reference to
>> `ntb_register_device'
>>>> The functions ntb_*() are defined in drivers/ntb/core.c, which need
>>>> CONFIG_NTB setting y to be build-in.
>>>> To fix this build error, add depends on NTB.
>>>>
>>>> Reported-by: Hulk Robot <[email protected]>
>>>> Fixes: ff32fac00d97("NTB: EPF: support NTB transfer between PCI RC and
>> EP
>>>> connection")
>>>> Signed-off-by: Ren Zhijie <[email protected]>
>>>> ---
>>> [Frank Li] Acked
>> @Frank: if you use the conventional style, e.g.,
>> "Acked-by: Frank Li <[email protected]>", tooling like b4 will
>> automatically pick it up. Just saying "Acked" is likely to get missed
>> or ignored.
> Thanks.
> Acked-by: Frank Li <[email protected]>

sure, will fix it in patch v2.


Thanks,

Ren Zhijie

>>>> drivers/pci/endpoint/functions/Kconfig | 1 +
>>>> 1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/drivers/pci/endpoint/functions/Kconfig
>>>> b/drivers/pci/endpoint/functions/Kconfig
>>>> index 362555b024e8..9beee4f0f4ee 100644
>>>> --- a/drivers/pci/endpoint/functions/Kconfig
>>>> +++ b/drivers/pci/endpoint/functions/Kconfig
>>>> @@ -29,6 +29,7 @@ config PCI_EPF_NTB
>>>> config PCI_EPF_VNTB
>>>> tristate "PCI Endpoint NTB driver"
>>>> depends on PCI_ENDPOINT
>>>> + depends on NTB
>>>> select CONFIGFS_FS
>>>> help
>>>> Select this configuration option to enable the Non-Transparent
>>>> --
>>>> 2.17.1
> .