public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>
To: Arnd Bergmann <arnd@kernel.org>,
	Philipp Reisner <philipp.reisner@linbit.com>,
	Lars Ellenberg <lars.ellenberg@linbit.com>,
	Jens Axboe <axboe@kernel.dk>
Cc: Arnd Bergmann <arnd@arndb.de>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Eric Biggers <ebiggers@google.com>,
	drbd-dev@lists.linbit.com, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] drbd: fix rdma dependency
Date: Wed, 18 Mar 2026 16:24:39 +0100	[thread overview]
Message-ID: <eeb73048-d5ae-4fbd-9920-1395a3ca51eb@linbit.com> (raw)
In-Reply-To: <20260318104858.1868731-1-arnd@kernel.org>



Am 18.03.26 um 11:48 schrieb Arnd Bergmann:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The new rdma transport module uses a trick to only build support
> if infiniband/rdma is enabled. This seems to be done the wrong way
> around, as it gets built if RDMA is in a loadable module, but not
> if it's built-in.
> 
> However, this fails in configurations that have infiniband support
> in a loadable module but drbd built-in:
> 
> ERROR: modpost: "rdma_bind_addr" [drivers/block/drbd/drbd_transport_rdma.ko] undefined!
> ERROR: modpost: "rdma_listen" [drivers/block/drbd/drbd_transport_rdma.ko] undefined!
> ERROR: modpost: "rdma_destroy_id" [drivers/block/drbd/drbd_transport_rdma.ko] undefined!
> ERROR: modpost: "rdma_destroy_qp" [drivers/block/drbd/drbd_transport_rdma.ko] undefined!
> ERROR: modpost: "rdma_disconnect" [drivers/block/drbd/drbd_transport_rdma.ko] undefined!
> ERROR: modpost: "__rdma_create_kernel_id" [drivers/block/drbd/drbd_transport_rdma.ko] undefined!
> ERROR: modpost: "rdma_resolve_route" [drivers/block/drbd/drbd_transport_rdma.ko] undefined!
> ERROR: modpost: "rdma_reject" [drivers/block/drbd/drbd_transport_rdma.ko] undefined!
> ERROR: modpost: "rdma_accept" [drivers/block/drbd/drbd_transport_rdma.ko] undefined!
> ERROR: modpost: "rdma_create_qp" [drivers/block/drbd/drbd_transport_rdma.ko] undefined!
> 
> Address this by moving the logic from Makefile into Kconfig and
> describing the two conditions in which rdma transport can be used
> in drbd.
> 
> Fixes: 038cb6e644e4 ("drbd: add RDMA transport implementation")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/block/drbd/Kconfig  | 5 +++++
>  drivers/block/drbd/Makefile | 2 +-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/block/drbd/Kconfig b/drivers/block/drbd/Kconfig
> index 377f0d040031..29ec6ed84251 100644
> --- a/drivers/block/drbd/Kconfig
> +++ b/drivers/block/drbd/Kconfig
> @@ -39,6 +39,11 @@ config BLK_DEV_DRBD
>  
>  	  If unsure, say N.
>  
> +config DRBD_TRANSPORT_RDMA
> +	tristate
> +	depends on RDMA=y || (BLK_DEV_DRBD=RDMA)
> +	default BLK_DEV_DRBD
> +
>  config DRBD_FAULT_INJECTION
>  	bool "DRBD fault injection"
>  	depends on BLK_DEV_DRBD
> diff --git a/drivers/block/drbd/Makefile b/drivers/block/drbd/Makefile
> index 99a1cfeed423..caf888235d53 100644
> --- a/drivers/block/drbd/Makefile
> +++ b/drivers/block/drbd/Makefile
> @@ -13,4 +13,4 @@ obj-$(CONFIG_BLK_DEV_DRBD)     += drbd.o
>  
>  obj-$(CONFIG_BLK_DEV_DRBD)     += drbd_transport_tcp.o
>  obj-$(CONFIG_BLK_DEV_DRBD)     += drbd_transport_lb-tcp.o
> -obj-$(if $(CONFIG_BLK_DEV_DRBD),$(if $(CONFIG_INFINIBAND),m)) += drbd_transport_rdma.o
> +obj-$(CONFIG_DRBD_TRANSPORT_RDMA) += drbd_transport_rdma.o

Seems like we raced here, I already (supposedly?) fixed this on the
drbd-next branch.

My fix is this Kconfig:

config BLK_DEV_DRBD_RDMA
	tristate "DRBD RDMA transport"
	depends on BLK_DEV_DRBD && INFINIBAND_ADDR_TRANS
	help

	  RDMA transport support for DRBD. This enables DRBD replication
	  over RDMA-capable networks for lower latency and higher throughput.

	  If unsure, say N.

And then just this in the Makefile:

obj-$(CONFIG_BLK_DEV_DRBD_RDMA) += drbd_transport_rdma.o

That should be equivalent, right?

Thanks,
Christoph

-- 
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA —  Disaster Recovery — Software defined Storage


  parent reply	other threads:[~2026-03-18 15:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 10:48 [PATCH 1/2] drbd: fix rdma dependency Arnd Bergmann
2026-03-18 10:48 ` [PATCH 2/2] drbd: select CONFIG_NET_HANDSHAKE Arnd Bergmann
2026-03-18 21:16   ` Christoph Böhmwalder
2026-03-18 21:20     ` Arnd Bergmann
2026-03-18 15:24 ` Christoph Böhmwalder [this message]
2026-03-18 15:31   ` [PATCH 1/2] drbd: fix rdma dependency Arnd Bergmann
2026-03-18 15:36     ` Christoph Böhmwalder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eeb73048-d5ae-4fbd-9920-1395a3ca51eb@linbit.com \
    --to=christoph.boehmwalder@linbit.com \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=drbd-dev@lists.linbit.com \
    --cc=ebiggers@google.com \
    --cc=lars.ellenberg@linbit.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=philipp.reisner@linbit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox