2020-09-15 10:20:28

by Necip Fazil Yildiran

[permalink] [raw]
Subject: [PATCH] IB/rxe: fix kconfig dependency warning for RDMA_RXE

When RDMA_RXE is enabled and CRYPTO is disabled, it results in the
following Kbuild warning:

WARNING: unmet direct dependencies detected for CRYPTO_CRC32
Depends on [n]: CRYPTO [=n]
Selected by [y]:
- RDMA_RXE [=y] && (INFINIBAND_USER_ACCESS [=y] || !INFINIBAND_USER_ACCESS [=y]) && INET [=y] && PCI [=y] && INFINIBAND [=y] && (!64BIT || ARCH_DMA_ADDR_T_64BIT [=n])

The reason is that RDMA_RXE selects CRYPTO_CRC32 without depending on or
selecting CRYPTO while CRYPTO_CRC32 is subordinate to CRYPTO.

Honor the kconfig menu hierarchy to remove kconfig dependency warnings.

Fixes: 0812ed132178 ("IB/rxe: Change RDMA_RXE kconfig to use select")
Signed-off-by: Necip Fazil Yildiran <[email protected]>
---
drivers/infiniband/sw/rxe/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/sw/rxe/Kconfig b/drivers/infiniband/sw/rxe/Kconfig
index a0c6c7dfc181..e1f52710edfc 100644
--- a/drivers/infiniband/sw/rxe/Kconfig
+++ b/drivers/infiniband/sw/rxe/Kconfig
@@ -4,6 +4,7 @@ config RDMA_RXE
depends on INET && PCI && INFINIBAND
depends on !64BIT || ARCH_DMA_ADDR_T_64BIT
select NET_UDP_TUNNEL
+ select CRYPTO
select CRYPTO_CRC32
select DMA_VIRT_OPS
help
--
2.25.1


2020-09-15 11:03:50

by Leon Romanovsky

[permalink] [raw]
Subject: Re: [PATCH] IB/rxe: fix kconfig dependency warning for RDMA_RXE

On Tue, Sep 15, 2020 at 01:16:00PM +0300, Necip Fazil Yildiran wrote:
> When RDMA_RXE is enabled and CRYPTO is disabled, it results in the
> following Kbuild warning:
>
> WARNING: unmet direct dependencies detected for CRYPTO_CRC32
> Depends on [n]: CRYPTO [=n]
> Selected by [y]:
> - RDMA_RXE [=y] && (INFINIBAND_USER_ACCESS [=y] || !INFINIBAND_USER_ACCESS [=y]) && INET [=y] && PCI [=y] && INFINIBAND [=y] && (!64BIT || ARCH_DMA_ADDR_T_64BIT [=n])
>
> The reason is that RDMA_RXE selects CRYPTO_CRC32 without depending on or
> selecting CRYPTO while CRYPTO_CRC32 is subordinate to CRYPTO.

It is not RXE specific issue and almost all users of CRYPTO_* configs
don't select CRYPTO.

There are two possible solutions.
1. Fix crypto/Kconfig to enable CRYPTO.
2. Change "select CRYPTO_CRC32" to be "depends on CRYPTO_CRC32".

Thanks

>
> Honor the kconfig menu hierarchy to remove kconfig dependency warnings.
>
> Fixes: 0812ed132178 ("IB/rxe: Change RDMA_RXE kconfig to use select")
> Signed-off-by: Necip Fazil Yildiran <[email protected]>
> ---
> drivers/infiniband/sw/rxe/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/infiniband/sw/rxe/Kconfig b/drivers/infiniband/sw/rxe/Kconfig
> index a0c6c7dfc181..e1f52710edfc 100644
> --- a/drivers/infiniband/sw/rxe/Kconfig
> +++ b/drivers/infiniband/sw/rxe/Kconfig
> @@ -4,6 +4,7 @@ config RDMA_RXE
> depends on INET && PCI && INFINIBAND
> depends on !64BIT || ARCH_DMA_ADDR_T_64BIT
> select NET_UDP_TUNNEL
> + select CRYPTO
> select CRYPTO_CRC32
> select DMA_VIRT_OPS
> help
> --
> 2.25.1
>

2020-09-15 11:26:50

by Jason Gunthorpe

[permalink] [raw]
Subject: Re: [PATCH] IB/rxe: fix kconfig dependency warning for RDMA_RXE

On Tue, Sep 15, 2020 at 01:16:00PM +0300, Necip Fazil Yildiran wrote:
> When RDMA_RXE is enabled and CRYPTO is disabled, it results in the
> following Kbuild warning:
>
> WARNING: unmet direct dependencies detected for CRYPTO_CRC32
> Depends on [n]: CRYPTO [=n]
> Selected by [y]:
> - RDMA_RXE [=y] && (INFINIBAND_USER_ACCESS [=y] || !INFINIBAND_USER_ACCESS [=y]) && INET [=y] && PCI [=y] && INFINIBAND [=y] && (!64BIT || ARCH_DMA_ADDR_T_64BIT [=n])

?? how did you get here? I thought the kconfig front ends were
supposed to prevent this.

Jason

2020-09-15 12:55:20

by Necip Fazil Yildiran

[permalink] [raw]
Subject: Re: [PATCH] IB/rxe: fix kconfig dependency warning for RDMA_RXE

Steps to reproduce this for v5.9-rc4 on x86 machine (using make.cross [1]
to cross compile for arm64):
1. make.cross ARCH=arm64 allnoconfig
2. make.cross ARCH=arm64 menuconfig
a. Enable NET
b. Enable INET
c. Enable PCI
d. Enable INFINIBAND
e. Enable RDMA_RXE
3. make.cross ARCH=arm64 olddefconfig # WARNING: unmet direct
dependencies detected for CRYPTO_CRC32

[1] https://github.com/fengguang/lkp-tests/blob/master/sbin/make.cross

Thanks
Necip

On Tue, Sep 15, 2020 at 2:23 PM Jason Gunthorpe <[email protected]> wrote:
>
> On Tue, Sep 15, 2020 at 01:16:00PM +0300, Necip Fazil Yildiran wrote:
> > When RDMA_RXE is enabled and CRYPTO is disabled, it results in the
> > following Kbuild warning:
> >
> > WARNING: unmet direct dependencies detected for CRYPTO_CRC32
> > Depends on [n]: CRYPTO [=n]
> > Selected by [y]:
> > - RDMA_RXE [=y] && (INFINIBAND_USER_ACCESS [=y] || !INFINIBAND_USER_ACCESS [=y]) && INET [=y] && PCI [=y] && INFINIBAND [=y] && (!64BIT || ARCH_DMA_ADDR_T_64BIT [=n])
>
> ?? how did you get here? I thought the kconfig front ends were
> supposed to prevent this.
>
> Jason