Skip to contentSkip to conversation

RDMA/bnxt_re: fix verbs undefined build errors

PATCH In review Randy Dunlap 2 participants 2 messages Jul 1, 2023 – Jul 3, 2023

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

PATCH 1/1 RDMA/bnxt_re: fix verbs undefined build errors

When INFINIBAND_USER_ACCESS is not set, the bnxt_re driver has build errors:

ERROR: modpost: "uverbs_idr_class" [drivers/infiniband/hw/bnxt_re/bnxt_re.ko] undefined!
ERROR: modpost: "ib_uverbs_get_ucontext_file" [drivers/infiniband/hw/bnxt_re/bnxt_re.ko] undefined!
ERROR: modpost: "uverbs_destroy_def_handler" [drivers/infiniband/hw/bnxt_re/bnxt_re.ko] undefined!

Handle this case by making the driver depend on INFINIBAND_USER_ACCESS.

Fixes 592e8b3226a2 ("RDMA/bnxt_re: Add bnxt_re driver build support")
Cc Selvin Xavier <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Leon Romanovsky <[email protected]>
Cc Devesh Sharma <[email protected]>
Cc Somnath Kotur <[email protected]>
Cc Sriharsha Basavapatna <[email protected]>
Cc Doug Ledford <[email protected]>
---
 drivers/infiniband/hw/bnxt_re/Kconfig |    1 +
 1 file changed, 1 insertion(+)
drivers/infiniband/hw/bnxt_re/Kconfig +1 -0
diff -- a/drivers/infiniband/hw/bnxt_re/Kconfig b/drivers/infiniband/hw/bnxt_re/Kconfig
@@ -3,6 +3,7 @@ config INFINIBAND_BNXT_RE
 	tristate "Broadcom Netxtreme HCA support"
 	depends on 64BIT
 	depends on INET && DCB && BNXT
+	depends on INFINIBAND_USER_ACCESS
 	help
 	  This driver supports Broadcom NetXtreme-E 10/25/40/50 gigabit
 	  RoCE HCAs.  To compile this driver as a module, choose M here:
#1 lore raw
Quoted 19 lines · Randy Dunlap

When INFINIBAND_USER_ACCESS is not set, the bnxt_re driver has build errors:

ERROR: modpost: "uverbs_idr_class" [drivers/infiniband/hw/bnxt_re/bnxt_re.ko] undefined!
ERROR: modpost: "ib_uverbs_get_ucontext_file" [drivers/infiniband/hw/bnxt_re/bnxt_re.ko] undefined!
ERROR: modpost: "uverbs_destroy_def_handler" [drivers/infiniband/hw/bnxt_re/bnxt_re.ko] undefined!

Handle this case by making the driver depend on INFINIBAND_USER_ACCESS.

Fixes 592e8b3226a2 ("RDMA/bnxt_re: Add bnxt_re driver build support")
Cc Selvin Xavier <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Leon Romanovsky <[email protected]>
Cc Devesh Sharma <[email protected]>
Cc Somnath Kotur <[email protected]>
Cc Sriharsha Basavapatna <[email protected]>
Cc Doug Ledford <[email protected]>
Quoted 3 lines
---
 drivers/infiniband/hw/bnxt_re/Kconfig |    1 +
 1 file changed, 1 insertion(+)

I liked this variant [1] more as bnxt_re driver can theoretically work without INFINIBAND_USER_ACCESS too.

[1] https://lore.kernel.org/all/[email protected]

Thanks