linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Roman Penyaev <roman.penyaev@profitbricks.com>
Cc: linux-block <linux-block@vger.kernel.org>,
	linux-rdma <linux-rdma@vger.kernel.org>,
	Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@infradead.org>,
	Sagi Grimberg <sagi@grimberg.me>,
	Bart Van Assche <bart.vanassche@sandisk.com>,
	Or Gerlitz <ogerlitz@mellanox.com>,
	Doug Ledford <dledford@redhat.com>,
	Swapnil Ingle <swapnil.ingle@profitbricks.com>,
	Danil Kipnis <danil.kipnis@profitbricks.com>,
	Jack Wang <jinpu.wang@profitbricks.com>
Subject: Re: [PATCH v2 14/26] ibtrs: include client and server modules into kernel compilation
Date: Tue, 22 May 2018 16:18:56 +0300	[thread overview]
Message-ID: <20180522131856.GK23585@mtr-leonro.mtl.com> (raw)
In-Reply-To: <CAJrWOzBLSaxdeeZTjaz2fufzYgRGJxhK38wsLQiBF5YNp+gvUw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4827 bytes --]

On Tue, May 22, 2018 at 11:27:21AM +0200, Roman Penyaev wrote:
> On Tue, May 22, 2018 at 7:05 AM, Leon Romanovsky <leon@kernel.org> wrote:
> > On Fri, May 18, 2018 at 03:04:01PM +0200, Roman Pen wrote:
> >> Add IBTRS Makefile, Kconfig and also corresponding lines into upper
> >> layer infiniband/ulp files.
> >>
> >> Signed-off-by: Roman Pen <roman.penyaev@profitbricks.com>
> >> Signed-off-by: Danil Kipnis <danil.kipnis@profitbricks.com>
> >> Cc: Jack Wang <jinpu.wang@profitbricks.com>
> >> ---
> >>  drivers/infiniband/Kconfig            |  1 +
> >>  drivers/infiniband/ulp/Makefile       |  1 +
> >>  drivers/infiniband/ulp/ibtrs/Kconfig  | 20 ++++++++++++++++++++
> >>  drivers/infiniband/ulp/ibtrs/Makefile | 15 +++++++++++++++
> >>  4 files changed, 37 insertions(+)
> >>  create mode 100644 drivers/infiniband/ulp/ibtrs/Kconfig
> >>  create mode 100644 drivers/infiniband/ulp/ibtrs/Makefile
> >>
> >> diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
> >> index ee270e065ba9..787bd286fb08 100644
> >> --- a/drivers/infiniband/Kconfig
> >> +++ b/drivers/infiniband/Kconfig
> >> @@ -94,6 +94,7 @@ source "drivers/infiniband/ulp/srpt/Kconfig"
> >>
> >>  source "drivers/infiniband/ulp/iser/Kconfig"
> >>  source "drivers/infiniband/ulp/isert/Kconfig"
> >> +source "drivers/infiniband/ulp/ibtrs/Kconfig"
> >>
> >>  source "drivers/infiniband/ulp/opa_vnic/Kconfig"
> >>  source "drivers/infiniband/sw/rdmavt/Kconfig"
> >> diff --git a/drivers/infiniband/ulp/Makefile b/drivers/infiniband/ulp/Makefile
> >> index 437813c7b481..1c4f10dc8d49 100644
> >> --- a/drivers/infiniband/ulp/Makefile
> >> +++ b/drivers/infiniband/ulp/Makefile
> >> @@ -5,3 +5,4 @@ obj-$(CONFIG_INFINIBAND_SRPT)         += srpt/
> >>  obj-$(CONFIG_INFINIBAND_ISER)                += iser/
> >>  obj-$(CONFIG_INFINIBAND_ISERT)               += isert/
> >>  obj-$(CONFIG_INFINIBAND_OPA_VNIC)    += opa_vnic/
> >> +obj-$(CONFIG_INFINIBAND_IBTRS)               += ibtrs/
> >> diff --git a/drivers/infiniband/ulp/ibtrs/Kconfig b/drivers/infiniband/ulp/ibtrs/Kconfig
> >> new file mode 100644
> >> index 000000000000..eaeb8f3f6b4e
> >> --- /dev/null
> >> +++ b/drivers/infiniband/ulp/ibtrs/Kconfig
> >> @@ -0,0 +1,20 @@
> >> +config INFINIBAND_IBTRS
> >> +     tristate
> >> +     depends on INFINIBAND_ADDR_TRANS
> >> +
> >> +config INFINIBAND_IBTRS_CLIENT
> >> +     tristate "IBTRS client module"
> >> +     depends on INFINIBAND_ADDR_TRANS
> >> +     select INFINIBAND_IBTRS
> >> +     help
> >> +       IBTRS client allows for simplified data transfer and connection
> >> +       establishment over RDMA (InfiniBand, RoCE, iWarp). Uses BIO-like
> >> +       READ/WRITE semantics and provides multipath capabilities.
> >> +
> >> +config INFINIBAND_IBTRS_SERVER
> >> +     tristate "IBTRS server module"
> >> +     depends on INFINIBAND_ADDR_TRANS
> >> +     select INFINIBAND_IBTRS
> >> +     help
> >> +       IBTRS server module processing connection and IO requests received
> >> +       from the IBTRS client module.
> >> diff --git a/drivers/infiniband/ulp/ibtrs/Makefile b/drivers/infiniband/ulp/ibtrs/Makefile
> >> new file mode 100644
> >> index 000000000000..e6ea858745ad
> >> --- /dev/null
> >> +++ b/drivers/infiniband/ulp/ibtrs/Makefile
> >> @@ -0,0 +1,15 @@
> >> +ibtrs-client-y := ibtrs-clt.o \
> >> +               ibtrs-clt-stats.o \
> >> +               ibtrs-clt-sysfs.o
> >> +
> >> +ibtrs-server-y := ibtrs-srv.o \
> >> +               ibtrs-srv-stats.o \
> >> +               ibtrs-srv-sysfs.o
> >> +
> >> +ibtrs-core-y := ibtrs.o
> >> +
> >> +obj-$(CONFIG_INFINIBAND_IBTRS)        += ibtrs-core.o
> >
> > Will it build ibtrs-core in case both server and client are disabled in .config?
>
> No, CONFIG_INFINIBAND_IBTRS is selected/deselected by
> CONFIG_INFINIBAND_IBTRS_CLIENT or CONFIG_INFINIBAND_IBTRS_SERVER,
> when you choose them in kconfig.
>

Thanks

>
> >> +obj-$(CONFIG_INFINIBAND_IBTRS_CLIENT) += ibtrs-client.o
> >> +obj-$(CONFIG_INFINIBAND_IBTRS_SERVER) += ibtrs-server.o
> >> +
> >> +-include $(src)/compat/compat.mk
> >
> > What is this?
>
> Well, in our production we use same source code and in order not to spoil
> sources with 'ifdef' macros for different kernel versions I use compat
> layer, which obviously will never go upstream.  This line is the only
> clean way to keep sources always up-to-date with latest kernel and still
> be compatible with what we have on our servers in production.
>
> '-' prefix at the beginning of the line tells make to ignore it if
> file does not exist, so should not rise any error for compilation
> against latest kernel.
>
> Here is an example of the compat layer for IBNBD block device:
> https://github.com/profitbricks/ibnbd/tree/master/ibnbd/compat

I see it, you will need to remove this line from the upstream kernel
patches.

Thanks

>
> --
> Roman

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2018-05-22 13:18 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 13:03 [PATCH v2 00/26] InfiniBand Transport (IBTRS) and Network Block Device (IBNBD) Roman Pen
2018-05-18 13:03 ` [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu() Roman Pen
2018-05-18 16:56   ` Linus Torvalds
2018-05-19 20:25     ` Roman Penyaev
2018-05-19 21:04       ` Linus Torvalds
2018-05-19 16:37   ` Paul E. McKenney
2018-05-19 20:20     ` Roman Penyaev
2018-05-19 20:56       ` Linus Torvalds
2018-05-20  0:43       ` Paul E. McKenney
2018-05-21 13:50         ` Roman Penyaev
2018-05-21 15:16           ` Linus Torvalds
2018-05-21 15:33             ` Paul E. McKenney
2018-05-22  9:09               ` Roman Penyaev
2018-05-22 16:36                 ` Paul E. McKenney
2018-05-22 16:38                 ` Linus Torvalds
2018-05-22 17:04                   ` Paul E. McKenney
2018-05-21 15:31           ` Paul E. McKenney
2018-05-22  9:09             ` Roman Penyaev
2018-05-22 17:03               ` Paul E. McKenney
2018-05-18 13:03 ` [PATCH v2 02/26] sysfs: export sysfs_remove_file_self() Roman Pen
2018-05-18 15:08   ` Tejun Heo
2018-05-18 13:03 ` [PATCH v2 03/26] ibtrs: public interface header to establish RDMA connections Roman Pen
2018-05-18 13:03 ` [PATCH v2 04/26] ibtrs: private headers with IBTRS protocol structs and helpers Roman Pen
2018-05-18 13:03 ` [PATCH v2 05/26] ibtrs: core: lib functions shared between client and server modules Roman Pen
2018-05-18 13:03 ` [PATCH v2 06/26] ibtrs: client: private header with client structs and functions Roman Pen
2018-05-18 13:03 ` [PATCH v2 07/26] ibtrs: client: main functionality Roman Pen
2018-05-18 13:03 ` [PATCH v2 08/26] ibtrs: client: statistics functions Roman Pen
2018-05-18 13:03 ` [PATCH v2 09/26] ibtrs: client: sysfs interface functions Roman Pen
2018-05-18 13:03 ` [PATCH v2 10/26] ibtrs: server: private header with server structs and functions Roman Pen
2018-05-18 13:03 ` [PATCH v2 11/26] ibtrs: server: main functionality Roman Pen
2018-05-18 13:03 ` [PATCH v2 12/26] ibtrs: server: statistics functions Roman Pen
2018-05-18 13:04 ` [PATCH v2 13/26] ibtrs: server: sysfs interface functions Roman Pen
2018-05-18 13:04 ` [PATCH v2 14/26] ibtrs: include client and server modules into kernel compilation Roman Pen
2018-05-20 22:14   ` kbuild test robot
2018-05-21  6:36   ` kbuild test robot
2018-05-22  5:05   ` Leon Romanovsky
2018-05-22  9:27     ` Roman Penyaev
2018-05-22 13:18       ` Leon Romanovsky [this message]
2018-05-22 16:12         ` Roman Penyaev
2018-05-18 13:04 ` [PATCH v2 15/26] ibtrs: a bit of documentation Roman Pen
2018-05-18 13:04 ` [PATCH v2 16/26] ibnbd: private headers with IBNBD protocol structs and helpers Roman Pen
2018-05-18 13:04 ` [PATCH v2 17/26] ibnbd: client: private header with client structs and functions Roman Pen
2018-05-18 13:04 ` [PATCH v2 18/26] ibnbd: client: main functionality Roman Pen
2018-05-18 13:04 ` [PATCH v2 19/26] ibnbd: client: sysfs interface functions Roman Pen
2018-05-18 13:04 ` [PATCH v2 20/26] ibnbd: server: private header with server structs and functions Roman Pen
2018-05-18 13:04 ` [PATCH v2 21/26] ibnbd: server: main functionality Roman Pen
2018-05-18 13:04 ` [PATCH v2 22/26] ibnbd: server: functionality for IO submission to file or block dev Roman Pen
2018-05-18 13:04 ` [PATCH v2 23/26] ibnbd: server: sysfs interface functions Roman Pen
2018-05-18 13:04 ` [PATCH v2 24/26] ibnbd: include client and server modules into kernel compilation Roman Pen
2018-05-20 17:21   ` kbuild test robot
2018-05-20 22:14   ` kbuild test robot
2018-05-21  5:33   ` kbuild test robot
2018-05-18 13:04 ` [PATCH v2 25/26] ibnbd: a bit of documentation Roman Pen
2018-05-18 13:04 ` [PATCH v2 26/26] MAINTAINERS: Add maintainer for IBNBD/IBTRS modules Roman Pen
2018-05-22 16:45 ` [PATCH v2 00/26] InfiniBand Transport (IBTRS) and Network Block Device (IBNBD) Jason Gunthorpe

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=20180522131856.GK23585@mtr-leonro.mtl.com \
    --to=leon@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bart.vanassche@sandisk.com \
    --cc=danil.kipnis@profitbricks.com \
    --cc=dledford@redhat.com \
    --cc=hch@infradead.org \
    --cc=jinpu.wang@profitbricks.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=roman.penyaev@profitbricks.com \
    --cc=sagi@grimberg.me \
    --cc=swapnil.ingle@profitbricks.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;
as well as URLs for NNTP newsgroup(s).