diff mbox series

[v14,23/25] block/rnbd: include client and server modules into kernel compilation

Message ID 20200504140115.15533-24-danil.kipnis@cloud.ionos.com (mailing list archive)
State New, archived
Headers show
Series RTRS (former IBTRS) RDMA Transport Library and RNBD (former IBNBD) RDMA Network Block Device | expand

Commit Message

Danil Kipnis May 4, 2020, 2:01 p.m. UTC
From: Jack Wang <jinpu.wang@cloud.ionos.com>

Add rnbd Makefile, Kconfig and also corresponding lines into upper
block layer files.

Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
---
 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

Comments

kernel test robot May 5, 2020, 9:33 p.m. UTC | #1
Hi Danil,

I love your patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on driver-core/driver-core-testing rdma/for-next linus/master v5.7-rc4 next-20200505]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Danil-Kipnis/RTRS-former-IBTRS-RDMA-Transport-Library-and-RNBD-former-IBNBD-RDMA-Network-Block-Device/20200505-072234
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=c6x 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/block/rnbd/rnbd-clt.c:19:
>> drivers/block/rnbd/rnbd-clt.h:19:10: fatal error: rtrs.h: No such file or directory
      19 | #include <rtrs.h>
         |          ^~~~~~~~
   compilation terminated.
--
   In file included from drivers/block/rnbd/rnbd-srv.c:15:
>> drivers/block/rnbd/rnbd-srv.h:16:10: fatal error: rtrs.h: No such file or directory
      16 | #include <rtrs.h>
         |          ^~~~~~~~
   compilation terminated.

vim +19 drivers/block/rnbd/rnbd-clt.h

c1971c7f09e33e Jack Wang 2020-05-04  18  
c1971c7f09e33e Jack Wang 2020-05-04 @19  #include <rtrs.h>
c1971c7f09e33e Jack Wang 2020-05-04  20  #include "rnbd-proto.h"
c1971c7f09e33e Jack Wang 2020-05-04  21  #include "rnbd-log.h"
c1971c7f09e33e Jack Wang 2020-05-04  22  

:::::: The code at line 19 was first introduced by commit
:::::: c1971c7f09e33e9396bbc2ff2874b60307cbcd4e block/rnbd: client: private header with client structs and functions

:::::: TO: Jack Wang <jinpu.wang@cloud.ionos.com>
:::::: CC: 0day robot <lkp@intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Jinpu Wang May 7, 2020, 7:05 a.m. UTC | #2
Hi, Kbuild test robot,

On Tue, May 5, 2020 at 11:34 PM kbuild test robot <lkp@intel.com> wrote:
>
> Hi Danil,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on block/for-next]
> [also build test ERROR on driver-core/driver-core-testing rdma/for-next linus/master v5.7-rc4 next-20200505]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system. BTW, we also suggest to use '--base' option to specify the
> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
>
> url:    https://github.com/0day-ci/linux/commits/Danil-Kipnis/RTRS-former-IBTRS-RDMA-Transport-Library-and-RNBD-former-IBNBD-RDMA-Network-Block-Device/20200505-072234
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
> config: c6x-allyesconfig (attached as .config)
> compiler: c6x-elf-gcc (GCC) 9.3.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=c6x
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>    In file included from drivers/block/rnbd/rnbd-clt.c:19:
> >> drivers/block/rnbd/rnbd-clt.h:19:10: fatal error: rtrs.h: No such file or directory
>       19 | #include <rtrs.h>
>          |          ^~~~~~~~
>    compilation terminated.
> --
>    In file included from drivers/block/rnbd/rnbd-srv.c:15:
> >> drivers/block/rnbd/rnbd-srv.h:16:10: fatal error: rtrs.h: No such file or directory
>       16 | #include <rtrs.h>
>          |          ^~~~~~~~
>    compilation terminated.
>
> vim +19 drivers/block/rnbd/rnbd-clt.h
looks somehow the "ccflags-y := -Idrivers/infiniband/ulp/rtrs " was
ignored in your case

We'll try to repro on ourside, can you also check on your side why
ccflags is ignored?

Thanks!
Jinpu
Leon Romanovsky May 7, 2020, 7:12 a.m. UTC | #3
On Thu, May 07, 2020 at 09:05:26AM +0200, Jinpu Wang wrote:
> Hi, Kbuild test robot,
>
> On Tue, May 5, 2020 at 11:34 PM kbuild test robot <lkp@intel.com> wrote:
> >
> > Hi Danil,
> >
> > I love your patch! Yet something to improve:
> >
> > [auto build test ERROR on block/for-next]
> > [also build test ERROR on driver-core/driver-core-testing rdma/for-next linus/master v5.7-rc4 next-20200505]
> > [if your patch is applied to the wrong git tree, please drop us a note to help
> > improve the system. BTW, we also suggest to use '--base' option to specify the
> > base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
> >
> > url:    https://github.com/0day-ci/linux/commits/Danil-Kipnis/RTRS-former-IBTRS-RDMA-Transport-Library-and-RNBD-former-IBNBD-RDMA-Network-Block-Device/20200505-072234
> > base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
> > config: c6x-allyesconfig (attached as .config)
> > compiler: c6x-elf-gcc (GCC) 9.3.0
> > reproduce:
> >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=c6x
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kbuild test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> >    In file included from drivers/block/rnbd/rnbd-clt.c:19:
> > >> drivers/block/rnbd/rnbd-clt.h:19:10: fatal error: rtrs.h: No such file or directory
> >       19 | #include <rtrs.h>
> >          |          ^~~~~~~~
> >    compilation terminated.
> > --
> >    In file included from drivers/block/rnbd/rnbd-srv.c:15:
> > >> drivers/block/rnbd/rnbd-srv.h:16:10: fatal error: rtrs.h: No such file or directory
> >       16 | #include <rtrs.h>
> >          |          ^~~~~~~~
> >    compilation terminated.
> >
> > vim +19 drivers/block/rnbd/rnbd-clt.h
> looks somehow the "ccflags-y := -Idrivers/infiniband/ulp/rtrs " was
> ignored in your case
>
> We'll try to repro on ourside, can you also check on your side why
> ccflags is ignored?

It should be ccflags-y := -I $(srctree)/drivers/infiniband/ulp/rtrs

Thanks

>
> Thanks!
> Jinpu
Jinpu Wang May 7, 2020, 7:37 a.m. UTC | #4
On Thu, May 7, 2020 at 9:13 AM Leon Romanovsky <leon@kernel.org> wrote:
>
> On Thu, May 07, 2020 at 09:05:26AM +0200, Jinpu Wang wrote:
> > Hi, Kbuild test robot,
> >
> > On Tue, May 5, 2020 at 11:34 PM kbuild test robot <lkp@intel.com> wrote:
> > >
> > > Hi Danil,
> > >
> > > I love your patch! Yet something to improve:
> > >
> > > [auto build test ERROR on block/for-next]
> > > [also build test ERROR on driver-core/driver-core-testing rdma/for-next linus/master v5.7-rc4 next-20200505]
> > > [if your patch is applied to the wrong git tree, please drop us a note to help
> > > improve the system. BTW, we also suggest to use '--base' option to specify the
> > > base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
> > >
> > > url:    https://github.com/0day-ci/linux/commits/Danil-Kipnis/RTRS-former-IBTRS-RDMA-Transport-Library-and-RNBD-former-IBNBD-RDMA-Network-Block-Device/20200505-072234
> > > base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
> > > config: c6x-allyesconfig (attached as .config)
> > > compiler: c6x-elf-gcc (GCC) 9.3.0
> > > reproduce:
> > >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > >         chmod +x ~/bin/make.cross
> > >         # save the attached .config to linux build tree
> > >         COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=c6x
> > >
> > > If you fix the issue, kindly add following tag as appropriate
> > > Reported-by: kbuild test robot <lkp@intel.com>
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > >    In file included from drivers/block/rnbd/rnbd-clt.c:19:
> > > >> drivers/block/rnbd/rnbd-clt.h:19:10: fatal error: rtrs.h: No such file or directory
> > >       19 | #include <rtrs.h>
> > >          |          ^~~~~~~~
> > >    compilation terminated.
> > > --
> > >    In file included from drivers/block/rnbd/rnbd-srv.c:15:
> > > >> drivers/block/rnbd/rnbd-srv.h:16:10: fatal error: rtrs.h: No such file or directory
> > >       16 | #include <rtrs.h>
> > >          |          ^~~~~~~~
> > >    compilation terminated.
> > >
> > > vim +19 drivers/block/rnbd/rnbd-clt.h
> > looks somehow the "ccflags-y := -Idrivers/infiniband/ulp/rtrs " was
> > ignored in your case
> >
> > We'll try to repro on ourside, can you also check on your side why
> > ccflags is ignored?
>
> It should be ccflags-y := -I $(srctree)/drivers/infiniband/ulp/rtrs
>
> Thanks
>
> >
> > Thanks!
> > Jinpu
Alright, thanks for the hint, I think it is the reason.

Will fix it soon!
diff mbox series

Patch

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