Re: [PATCH v2 14/26] ibtrs: include client and server modules into kernel compilation
On Tue, May 22, 2018 at 3:18 PM, Leon Romanovsky wrote: > On Tue, May 22, 2018 at 11:27:21AM +0200, Roman Penyaev wrote: >> On Tue, May 22, 2018 at 7:05 AM, Leon Romanovsky 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 >> >> Signed-off-by: Danil Kipnis >> >> Cc: Jack Wang >> >> --- >> >> 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 ..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 ..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. Hi Leon, Sure. Thanks. -- Roman
Re: [PATCH v2 14/26] ibtrs: include client and server modules into kernel compilation
On Tue, May 22, 2018 at 11:27:21AM +0200, Roman Penyaev wrote: > On Tue, May 22, 2018 at 7:05 AM, Leon Romanovsky 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 > >> Signed-off-by: Danil Kipnis > >> Cc: Jack Wang > >> --- > >> 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 ..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 ..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 signature.asc Description: PGP signature
Re: [PATCH v2 14/26] ibtrs: include client and server modules into kernel compilation
On Tue, May 22, 2018 at 7:05 AM, Leon Romanovsky 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 >> Signed-off-by: Danil Kipnis >> Cc: Jack Wang >> --- >> 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 ..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 ..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. >> +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 -- Roman
Re: [PATCH v2 14/26] ibtrs: include client and server modules into kernel compilation
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 > Signed-off-by: Danil Kipnis > Cc: Jack Wang > --- > 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 ..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 ..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? > +obj-$(CONFIG_INFINIBAND_IBTRS_CLIENT) += ibtrs-client.o > +obj-$(CONFIG_INFINIBAND_IBTRS_SERVER) += ibtrs-server.o > + > +-include $(src)/compat/compat.mk What is this? > -- > 2.13.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html signature.asc Description: PGP signature
Re: [PATCH v2 14/26] ibtrs: include client and server modules into kernel compilation
Hi Roman, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.17-rc6 next-20180517] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Roman-Pen/InfiniBand-Transport-IBTRS-and-Network-Block-Device-IBNBD/20180520-222445 config: m68k-allyesconfig (attached as .config) compiler: m68k-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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 make.cross ARCH=m68k All errors (new ones prefixed by >>): drivers/mtd/nand/raw/nand_base.o: In function `nand_soft_waitrdy': nand_base.c:(.text+0x1022): undefined reference to `__udivdi3' drivers/infiniband/ulp/ibtrs/ibtrs-clt-stats.o: In function `ibtrs_clt_stats_wc_completion_to_str': >> ibtrs-clt-stats.c:(.text+0x172): undefined reference to `__udivdi3' drivers/infiniband/ulp/ibtrs/ibtrs-clt-stats.o: In function `ibtrs_clt_stats_sg_list_distr_to_str': ibtrs-clt-stats.c:(.text+0x49c): undefined reference to `__udivdi3' --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v2 14/26] ibtrs: include client and server modules into kernel compilation
Hi Roman, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.17-rc5 next-20180517] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Roman-Pen/InfiniBand-Transport-IBTRS-and-Network-Block-Device-IBNBD/20180520-222445 config: m68k-allmodconfig (attached as .config) compiler: m68k-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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 make.cross ARCH=m68k All warnings (new ones prefixed by >>): In file included from arch/m68k/include/asm/atomic.h:7:0, from include/linux/atomic.h:5, from include/linux/spinlock.h:399, from include/linux/seqlock.h:36, from include/linux/time.h:6, from include/linux/stat.h:19, from include/linux/module.h:10, from drivers/infiniband//ulp/ibtrs/ibtrs-clt.c:34: drivers/infiniband//ulp/ibtrs/ibtrs-clt.c: In function 'ibtrs_clt_remove_path_from_arr': arch/m68k/include/asm/cmpxchg.h:122:3: warning: value computed is not used [-Wunused-value] ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o), \ ~^~ (unsigned long)(n), sizeof(*(ptr >> drivers/infiniband//ulp/ibtrs/ibtrs-clt.c:1456:3: note: in expansion of >> macro 'cmpxchg' cmpxchg(ppcpu_path, sess, next); ^~~ vim +/cmpxchg +1456 drivers/infiniband//ulp/ibtrs/ibtrs-clt.c 44463323 Roman Pen 2018-05-18 1396 44463323 Roman Pen 2018-05-18 1397 static void ibtrs_clt_remove_path_from_arr(struct ibtrs_clt_sess *sess) 44463323 Roman Pen 2018-05-18 1398 { 44463323 Roman Pen 2018-05-18 1399 struct ibtrs_clt *clt = sess->clt; 44463323 Roman Pen 2018-05-18 1400 struct ibtrs_clt_sess *next; 44463323 Roman Pen 2018-05-18 1401 int cpu; 44463323 Roman Pen 2018-05-18 1402 44463323 Roman Pen 2018-05-18 1403 mutex_lock(&clt->paths_mutex); 44463323 Roman Pen 2018-05-18 1404 list_del_rcu(&sess->s.entry); 44463323 Roman Pen 2018-05-18 1405 44463323 Roman Pen 2018-05-18 1406 /* Make sure everybody observes path removal. */ 44463323 Roman Pen 2018-05-18 1407 synchronize_rcu(); 44463323 Roman Pen 2018-05-18 1408 44463323 Roman Pen 2018-05-18 1409 /* 44463323 Roman Pen 2018-05-18 1410 * Decrement paths number only after grace period, because 44463323 Roman Pen 2018-05-18 1411 * caller of do_each_path() must firstly observe list without 44463323 Roman Pen 2018-05-18 1412 * path and only then decremented paths number. 44463323 Roman Pen 2018-05-18 1413 * 44463323 Roman Pen 2018-05-18 1414 * Otherwise there can be the following situation: 44463323 Roman Pen 2018-05-18 1415 *o Two paths exist and IO is coming. 44463323 Roman Pen 2018-05-18 1416 *o One path is removed: 44463323 Roman Pen 2018-05-18 1417 * CPU#0 CPU#1 44463323 Roman Pen 2018-05-18 1418 * do_each_path(): ibtrs_clt_remove_path_from_arr(): 44463323 Roman Pen 2018-05-18 1419 * path = get_next_path() 44463323 Roman Pen 2018-05-18 1420 * ^^^ list_del_rcu(path) 44463323 Roman Pen 2018-05-18 1421 * [!CONNECTED path] clt->paths_num-- 44463323 Roman Pen 2018-05-18 1422 * ^ 44463323 Roman Pen 2018-05-18 1423 * load clt->paths_num from 2 to 1 44463323 Roman Pen 2018-05-18 1424 *^ 44463323 Roman Pen 2018-05-18 1425 *sees 1 44463323 Roman Pen 2018-05-18 1426 * 44463323 Roman Pen 2018-05-18 1427 * path is observed as !CONNECTED, but do_each_path() loop 44463323 Roman Pen 2018-05-18 1428 * ends, because expression i < clt->paths_num is false. 44463323 Roman Pen 2018-05-18 1429 */ 44463323 Roman Pen 2018-05-18 1430 clt->paths_num--; 44463323 Roman Pen 2018-05-18 1431 44463323 Roman Pen 2018-05-18 1432 next = list_next_or_null_rr_rcu(&clt->paths_list, &sess->s.entry, 44463323 Roman Pen 2018-05-18 1433 typeof(*next), s.entry); 44463323 Roman Pen 2018-05-18 1434 44463323 Roman Pen 2018-05-18 1435 /* 44463323 Roman Pen 2018-05-18 1436 * Pcpu paths can still point to the path which is going to be 44463323 Roman Pen 2018-05-18 1437 * removed, so change the pointer manually. 44463323 Roman Pen 2018-05-18 1438 */ 44463323 Roman
[PATCH v2 14/26] ibtrs: include client and server modules into kernel compilation
Add IBTRS Makefile, Kconfig and also corresponding lines into upper layer infiniband/ulp files. Signed-off-by: Roman Pen Signed-off-by: Danil Kipnis Cc: Jack Wang --- 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 ..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 ..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 +obj-$(CONFIG_INFINIBAND_IBTRS_CLIENT) += ibtrs-client.o +obj-$(CONFIG_INFINIBAND_IBTRS_SERVER) += ibtrs-server.o + +-include $(src)/compat/compat.mk -- 2.13.1