Skip to contentSkip to conversation

rdma/siw: Add missing dependencies on LIBCRC32C and DMA_VIRT_OPS

PATCH Applied Geert Uytterhoeven 2 participants 4 messages Jul 10, 2019 – Jul 11, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rdma/siw: Add missing dependencies on LIBCRC32C and DMA_VIRT_OPS

If LIBCRC32C and DMA_VIRT_OPS are not enabled:

drivers/infiniband/sw/siw/siw_main.o: In function `siw_newlink':
siw_main.c:(.text+0x35c): undefined reference to dma_virt_ops' drivers/infiniband/sw/siw/siw_qp_rx.o: In function siw_csum_update':
siw_qp_rx.c:(.text+0x16): undefined reference to `crc32c'

Fix the first issue by adding a select of DMA_VIRT_OPS. Fix the second issue by replacing the unneeded dependency on CRYPTO_CRC32 by a dependency on LIBCRC32C.

Fixes c0cf5bdde46c664d ("rdma/siw: addition to kernel build environment")
---
 drivers/infiniband/sw/siw/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/sw/siw/Kconfig +2 -1
index 94f684174ce3556e..b622fc62f2cd6d46 100644
@@ -1,6 +1,7 @@
 config RDMA_SIW
 	tristate "Software RDMA over TCP/IP (iWARP) driver"
-	depends on INET && INFINIBAND && CRYPTO_CRC32
+	depends on INET && INFINIBAND && LIBCRC32C
+	select DMA_VIRT_OPS
 	help
 	This driver implements the iWARP RDMA transport over
 	the Linux TCP/IP network stack. It enables a system with a
Signature · 1 line
2.17.1
#1 lore raw
Quoted 21 lines · Geert Uytterhoeven

If LIBCRC32C and DMA_VIRT_OPS are not enabled:

drivers/infiniband/sw/siw/siw_main.o: In function `siw_newlink':
siw_main.c:(.text+0x35c): undefined reference to dma_virt_ops' drivers/infiniband/sw/siw/siw_qp_rx.o: In function siw_csum_update':
siw_qp_rx.c:(.text+0x16): undefined reference to `crc32c'

Fix the first issue by adding a select of DMA_VIRT_OPS. Fix the second issue by replacing the unneeded dependency on CRYPTO_CRC32 by a dependency on LIBCRC32C.

Fixes c0cf5bdde46c664d ("rdma/siw: addition to kernel build environment")
 drivers/infiniband/sw/siw/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/sw/siw/Kconfig +1 -0
index 94f684174ce3556e..b622fc62f2cd6d46 100644
+++ b/drivers/infiniband/sw/siw/Kconfig

drivers/infiniband/sw/siw/Kconfig line 3

Quoted 4 lines
drivers/infiniband/sw/siw/Kconfig +1 -1
@@ -1,6 +1,7 @@
 config RDMA_SIW
 	tristate "Software RDMA over TCP/IP (iWARP) driver"
-	depends on INET && INFINIBAND && CRYPTO_CRC32
+	depends on INET && INFINIBAND && LIBCRC32C

Is this the best practice?

siw is using both the libcrc32c API and the 'crypto_alloc_shash("crc32c", 0, 0);' version. Is it right to get that transitively through LIBCRC32C?

Jason

#2 lore raw

Hi Jason,

Quoted 29 lines · Jason Gunthorpe
Quoted 21 lines · Geert Uytterhoeven

If LIBCRC32C and DMA_VIRT_OPS are not enabled:

drivers/infiniband/sw/siw/siw_main.o: In function `siw_newlink':
siw_main.c:(.text+0x35c): undefined reference to dma_virt_ops' drivers/infiniband/sw/siw/siw_qp_rx.o: In function siw_csum_update':
siw_qp_rx.c:(.text+0x16): undefined reference to `crc32c'

Fix the first issue by adding a select of DMA_VIRT_OPS. Fix the second issue by replacing the unneeded dependency on CRYPTO_CRC32 by a dependency on LIBCRC32C.

Fixes c0cf5bdde46c664d ("rdma/siw: addition to kernel build environment")
 drivers/infiniband/sw/siw/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/sw/siw/Kconfig +1 -0
index 94f684174ce3556e..b622fc62f2cd6d46 100644
+++ b/drivers/infiniband/sw/siw/Kconfig

drivers/infiniband/sw/siw/Kconfig line 3

Quoted 4 lines
drivers/infiniband/sw/siw/Kconfig +1 -1
@@ -1,6 +1,7 @@
 config RDMA_SIW
      tristate "Software RDMA over TCP/IP (iWARP) driver"
-     depends on INET && INFINIBAND && CRYPTO_CRC32
+     depends on INET && INFINIBAND && LIBCRC32C

Is this the best practice?

Quoted 3 lines

siw is using both the libcrc32c API and the 'crypto_alloc_shash("crc32c", 0, 0);' version. Is it right to get that transitively through LIBCRC32C?

Yes, I think so.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#3 lore raw
In reply to Geert Uytterhoeven
Quoted 11 lines · Geert Uytterhoeven

If LIBCRC32C and DMA_VIRT_OPS are not enabled:

drivers/infiniband/sw/siw/siw_main.o: In function `siw_newlink':
siw_main.c:(.text+0x35c): undefined reference to dma_virt_ops' drivers/infiniband/sw/siw/siw_qp_rx.o: In function siw_csum_update':
siw_qp_rx.c:(.text+0x16): undefined reference to `crc32c'

Fix the first issue by adding a select of DMA_VIRT_OPS. Fix the second issue by replacing the unneeded dependency on CRYPTO_CRC32 by a dependency on LIBCRC32C.

Quoted 6 lines
Fixes c0cf5bdde46c664d ("rdma/siw: addition to kernel build environment")
---
 drivers/infiniband/sw/siw/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied to for-next, thanks

Jason