From patchwork Wed Apr 15 09:20:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danil Kipnis X-Patchwork-Id: 11490727 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1DB8981 for ; Wed, 15 Apr 2020 09:23:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F298220775 for ; Wed, 15 Apr 2020 09:23:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cloud.ionos.com header.i=@cloud.ionos.com header.b="Vv2BrChP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2895410AbgDOJXk (ORCPT ); Wed, 15 Apr 2020 05:23:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2895411AbgDOJXQ (ORCPT ); Wed, 15 Apr 2020 05:23:16 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AB21C061A0E for ; Wed, 15 Apr 2020 02:23:15 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id y24so18071270wma.4 for ; Wed, 15 Apr 2020 02:23:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BuJOZVsEd9h9dD9WNCH05BihJUfcD+XqHViZvcPGzLM=; b=Vv2BrChPQwTZ+TxYjq5broHmWleTf4t2LsEi2Hehh7s9Xc0ABJ568A6mElJju4ud9G Zby4yakzs+3DUzCzWrdBOWm3g0xYObBxiVNQ2j6S/O6/PJqvsl4lDlxxa4HKXapy2Jui Jvog4lGKrcUuXURHL2c542vse85byrgrgx2yt1njMEGv0xVq4H07E1TcUs/cb8BZQyH4 XnnxfbN2sk2k3MAYhn3HPlbYrXXI/cizUXbAxJrWVTgMUYVMNuVS4s12cRT9OrCLhJ5l 4eDMQIg0F3jUMLtF23jdd300jkwTvUPAVzdHJ/CoVhgRNLH7D28Vq1E6MbnaErYxdlAF EOrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BuJOZVsEd9h9dD9WNCH05BihJUfcD+XqHViZvcPGzLM=; b=MkXcf9E+OGVpc4mf/fROb7a9Vaqt1aouuc9+6plgHSUDPo3GVIbbRfC4yYGVx15EFP LO/8LQoIRe1F78aD4YcpH6QCtqJyxNK09owEbn/LOTJzX4hFhU0wuziZ4sOJ8+DVHy9l mw+BPNsNhgFXK2AFIt9dcPs+Q44ePLpbLx2B8pMJwU9Hwl+kuYi/D3xCqTda93ubwm7B TU8O6k7M4I7M1MB103o3Qj8mUeLq/RqVngfg1f8BiJ9s1NJ1poP+tUYGrC/6GWLxgGwk Z9xi0YXg0L7pAjjJAbL2Y3X9OS+v3EB4aUgVwxLuII/KsnsCauRtjqVzTV+8Ffi+jIMo CvhQ== X-Gm-Message-State: AGi0Pub+Zycdw6dnW5qOiKQSJcYb1VutYxo4BzCRuZ7ebS44+fq6C3q4 jSTnyiq9SltcXNqzKcY9c96J X-Google-Smtp-Source: APiQypIXvZescO7vqyp81RXUb9OFCSOlrGc1HQysxYi1rzXdJRu6MzW92LvGp81F4q++72003/c7xQ== X-Received: by 2002:a7b:cb59:: with SMTP id v25mr4508468wmj.13.1586942594227; Wed, 15 Apr 2020 02:23:14 -0700 (PDT) Received: from dkxps.fkb.profitbricks.net (dslb-002-204-231-072.002.204.pools.vodafone-ip.de. [2.204.231.72]) by smtp.gmail.com with ESMTPSA id v7sm22534615wmg.3.2020.04.15.02.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 02:23:13 -0700 (PDT) From: Danil Kipnis To: linux-block@vger.kernel.org, linux-rdma@vger.kernel.org Cc: axboe@kernel.dk, hch@infradead.org, sagi@grimberg.me, bvanassche@acm.org, leon@kernel.org, dledford@redhat.com, jgg@ziepe.ca, danil.kipnis@cloud.ionos.com, jinpu.wang@cloud.ionos.com, pankaj.gupta@cloud.ionos.com Subject: [PATCH v12 23/25] block/rnbd: include client and server modules into kernel compilation Date: Wed, 15 Apr 2020 11:20:43 +0200 Message-Id: <20200415092045.4729-24-danil.kipnis@cloud.ionos.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200415092045.4729-1-danil.kipnis@cloud.ionos.com> References: <20200415092045.4729-1-danil.kipnis@cloud.ionos.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Jack Wang Add rnbd Makefile, Kconfig and also corresponding lines into upper block layer files. Signed-off-by: Danil Kipnis Signed-off-by: Jack Wang Reviewed-by: Bart Van Assche --- drivers/block/Kconfig | 2 ++ drivers/block/Makefile | 1 + drivers/block/rnbd/Kconfig | 28 ++++++++++++++++++++++++++++ drivers/block/rnbd/Makefile | 15 +++++++++++++++ 4 files changed, 46 insertions(+) create mode 100644 drivers/block/rnbd/Kconfig create mode 100644 drivers/block/rnbd/Makefile diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 025b1b77b11a..084b9efcefca 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -458,4 +458,6 @@ config BLK_DEV_RSXX To compile this driver as a module, choose M here: the module will be called rsxx. +source "drivers/block/rnbd/Kconfig" + endif # BLK_DEV diff --git a/drivers/block/Makefile b/drivers/block/Makefile index 795facd8cf19..e1f63117ee94 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -39,6 +39,7 @@ obj-$(CONFIG_BLK_DEV_PCIESSD_MTIP32XX) += mtip32xx/ obj-$(CONFIG_BLK_DEV_RSXX) += rsxx/ obj-$(CONFIG_ZRAM) += zram/ +obj-$(CONFIG_BLK_DEV_RNBD) += rnbd/ obj-$(CONFIG_BLK_DEV_NULL_BLK) += null_blk.o null_blk-objs := null_blk_main.o diff --git a/drivers/block/rnbd/Kconfig b/drivers/block/rnbd/Kconfig new file mode 100644 index 000000000000..4b6d3d816d1f --- /dev/null +++ b/drivers/block/rnbd/Kconfig @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +config BLK_DEV_RNBD + bool + +config BLK_DEV_RNBD_CLIENT + tristate "RDMA Network Block Device driver client" + depends on INFINIBAND_RTRS_CLIENT + select BLK_DEV_RNBD + help + RNBD client is a network block device driver using rdma transport. + + RNBD client allows for mapping of a remote block devices over + RTRS protocol from a target system where RNBD server is running. + + If unsure, say N. + +config BLK_DEV_RNBD_SERVER + tristate "RDMA Network Block Device driver server" + depends on INFINIBAND_RTRS_SERVER + select BLK_DEV_RNBD + help + RNBD server is the server side of RNBD using rdma transport. + + RNBD server allows for exporting local block devices to a remote client + over RTRS protocol. + + If unsure, say N. diff --git a/drivers/block/rnbd/Makefile b/drivers/block/rnbd/Makefile new file mode 100644 index 000000000000..450a9e4974d7 --- /dev/null +++ b/drivers/block/rnbd/Makefile @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +ccflags-y := -Idrivers/infiniband/ulp/rtrs + +rnbd-client-y := rnbd-clt.o \ + rnbd-common.o \ + rnbd-clt-sysfs.o + +rnbd-server-y := rnbd-srv.o \ + rnbd-common.o \ + rnbd-srv-dev.o \ + rnbd-srv-sysfs.o + +obj-$(CONFIG_BLK_DEV_RNBD_CLIENT) += rnbd-client.o +obj-$(CONFIG_BLK_DEV_RNBD_SERVER) += rnbd-server.o