From patchwork Fri Mar 20 12:16:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinpu Wang X-Patchwork-Id: 11449029 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 1C30514B4 for ; Fri, 20 Mar 2020 12:17:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EECFA20776 for ; Fri, 20 Mar 2020 12:17:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cloud.ionos.com header.i=@cloud.ionos.com header.b="DG39nVBX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727239AbgCTMRj (ORCPT ); Fri, 20 Mar 2020 08:17:39 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34860 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727243AbgCTMRj (ORCPT ); Fri, 20 Mar 2020 08:17:39 -0400 Received: by mail-wr1-f68.google.com with SMTP id h4so7217806wru.2 for ; Fri, 20 Mar 2020 05:17:38 -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; bh=8kf6j8xGdq+NN7alk/HuFM7wn8Aa/jDFZrWaoTNTEQg=; b=DG39nVBXwG9X2KmP4FMbQFtAoud+oPV7lJbtZJuHaAsuRQMxEMCLnlwxILsqAcV/Cx kGy6MPykDkz0b1gxrKXEhGpeXS01F7DoMDOvN2sCiDFRA5Zo9VDQIEYHtPtVqfnM+OQ5 CWdF057lLMaDzhs21aEwzW0dxHQrFgbDSaNdbLHhPsDDaCzPREhJAg14bTnM1mVsKUwf /JCEeH9GWcElvUhgWrIiWlC7rbN1Rfss/GJaAiEwhYX6LWSDplni9ljviCjn4w8d2TmQ aYFZ8ZlTpuEIP/nrPOf2D5i0+Yp0OfLbQgXmtyR1orxflsh6XO6pH+IzE3EG/3CAf6sC nHZQ== 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; bh=8kf6j8xGdq+NN7alk/HuFM7wn8Aa/jDFZrWaoTNTEQg=; b=MUMSchj7Ky4oLzUGACKNEPWUk2pFtnbR9BH+FRfan+Y3L/UhrOIZfFko95WY7AcxcN UZqjWdSE64zxHDdvnXvtrckj5SIt09JjIosuyQcllYoUOFf27sTyJJfAIzPPyQPwFI4n ucJ6/ednEWU2AeNQ+zRodgwBSQ4T9dR4ev5XXEZz3OTS/G0cz3mu5UydDBXdgoPvFl/9 iCfgZOv4C/8b0jvKHZ769Jph24ww6166IVsmD02LYpqy8TBSf6/ckAAhThqkW+pUo9oo w3TPcnnjKR8unxx0FmZY8RGCRbeI2cihXmOOJKAJ8JeihLp48afQmzicDTfioT0dFlNz Fy1w== X-Gm-Message-State: ANhLgQ2hgH3NfWmIKEg8yvOP+bO+dDgFAnFzSGwZmljNm9KMSqh5pjpU oNoHoymJrywrzDkg1ytSZojwY3rx/rE= X-Google-Smtp-Source: ADFU+vsA3hUe2XscrdVnwCaista7fn++/5Axu6uVzmFLWEls93CWjHtpN3bYVWJXpyTRSsjxjkDjwg== X-Received: by 2002:adf:f6d0:: with SMTP id y16mr10569700wrp.298.1584706657806; Fri, 20 Mar 2020 05:17:37 -0700 (PDT) Received: from jwang-Latitude-5491.fritz.box ([2001:16b8:4927:3900:64cf:432e:192d:75a2]) by smtp.gmail.com with ESMTPSA id j39sm8593662wre.11.2020.03.20.05.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Mar 2020 05:17:37 -0700 (PDT) From: Jack Wang 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, rpenyaev@suse.de, pankaj.gupta@cloud.ionos.com Subject: [PATCH v11 24/26] block/rnbd: include client and server modules into kernel compilation Date: Fri, 20 Mar 2020 13:16:55 +0100 Message-Id: <20200320121657.1165-25-jinpu.wang@cloud.ionos.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200320121657.1165-1-jinpu.wang@cloud.ionos.com> References: <20200320121657.1165-1-jinpu.wang@cloud.ionos.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org 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 a53cc1e3a2d3..914f9d07835c 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -36,6 +36,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