Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH 04/23] mlx5: Add cmake options to replace --with-mlx5_debug/mw_debug
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Yishai Hadas
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

Simply enable -D flags when building.

Use as:
  $ cmake -DMLX5_DEBUG=TRUE -DMLX5_MW_DEBUG=TRUE

Reported-by: Yishai Hadas <yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libmlx5/src/CMakeLists.txt | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/libmlx5/src/CMakeLists.txt b/libmlx5/src/CMakeLists.txt
index a34a8063eeb2..44df83b47d96 100644
--- a/libmlx5/src/CMakeLists.txt
+++ b/libmlx5/src/CMakeLists.txt
@@ -1,3 +1,15 @@
+set(MLX5_DEBUG "FALSE" CACHE BOOL
+  "Enable expensive runtime logging options for the mlx5 verbs provider")
+if (MLX5_DEBUG)
+  add_definitions("-DMLX5_DEBUG")
+endif()
+
+set(MLX5_MW_DEBUG "FALSE" CACHE BOOL
+  "Enable extra validation of memory windows for the mlx5 verbs provider")
+if (MLX5_MW_DEBUG)
+  add_definitions("-DMW_DEBUG")
+endif()
+
 rdma_provider(mlx5
   buf.c
   cq.c
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 05/23] ipathverbs: Recognize bashisms in truescale-serdes.cmds
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Mike Marciniszyn,
	open list:IPATH/QIB USERSPACE PROVIDER for ib_qib.ko
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

Debian's Lintian remarks:

E: rdma-plumbing: shell-script-fails-syntax-check usr/lib/truescale-serdes.cmds

And indeed:

$ sh -n providers/ipathverbs/truescale-serdes.cmds
providers/ipathverbs/truescale-serdes.cmds: 100: providers/ipathverbs/truescale-serdes.cmds: Syntax error: "(" unexpected (expecting "}")

This is a bashism, change the script to require bash.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libipathverbs/truescale-serdes.cmds | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libipathverbs/truescale-serdes.cmds b/libipathverbs/truescale-serdes.cmds
index 345813dbfef5..0f8933765efe 100755
--- a/libipathverbs/truescale-serdes.cmds
+++ b/libipathverbs/truescale-serdes.cmds
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Copyright (c) 2013 Intel Corporation. All rights reserved.
 # Copyright (c) 2010 QLogic Corporation.
 # All rights reserved.
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 06/23] nes: Fix clang 3.6 warning -Wtautological-constant-out-of-range-compare
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Tatyana Nikolova
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

clang will miscompile this code because it make assumptions
about the signededness of enums.

Instead create a constant for an invalid ibv_wc_opcode and use that
everywhere. Unsigned enums will use -1, signed enums should use INT_MAX.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libnes/src/nes_uverbs.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/libnes/src/nes_uverbs.c b/libnes/src/nes_uverbs.c
index 12e6222313ad..80891d6243c7 100644
--- a/libnes/src/nes_uverbs.c
+++ b/libnes/src/nes_uverbs.c
@@ -471,13 +471,15 @@ int nes_ima_upoll_cq(struct ibv_cq *cq, int num_entries, struct ibv_wc *entry)
 	}
 
 	while (cqe_count < num_entries) {
-		entry->opcode = -1;
+		const enum ibv_wc_opcode INVAL_OP = -1;
+
+		entry->opcode = INVAL_OP;
 		cqe = &cqes[head];
 		cqe_misc =
 			le32_to_cpu(cqe->cqe_words[NES_NIC_CQE_MISC_IDX]);
 		if (cqe_misc & NES_NIC_CQE_VALID) {
 			memset(entry, 0, sizeof *entry);
-			entry->opcode = -1;
+			entry->opcode = INVAL_OP;
 			cqe->cqe_words[NES_NIC_CQE_MISC_IDX] = 0;
 			entry->status = (cqe_misc & NES_NIC_CQE_ERRV_MASK) >>
 						NES_NIC_CQE_ERRV_SHIFT;
@@ -523,7 +525,7 @@ int nes_ima_upoll_cq(struct ibv_cq *cq, int num_entries, struct ibv_wc *entry)
 			if (++head >= cq_size)
 				head = 0;
 
-			if (entry->opcode != -1) {
+			if (entry->opcode != INVAL_OP) {
 				/* it is possible that no entry will be
 				  available */
 				cqe_count++;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 07/23] ocrdma: Fix incorrect type of ibwc_status
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Devesh Sharma
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

clang 3.6 remarks:

../providers/ocrdma/ocrdma_verbs.c:1517:35: warning: implicit conversion from enumeration type 'enum ibv_wc_status' to different enumeration type 'enum ibv_wc_opcode' [-Wenum-conversion]
        enum ibv_wc_opcode ibwc_status = IBV_WC_GENERAL_ERR;

And it is not wrong, the enum should be ib_wc_status not opcode.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libocrdma/src/ocrdma_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libocrdma/src/ocrdma_verbs.c b/libocrdma/src/ocrdma_verbs.c
index 5248e7e26c7b..b3c77c47d660 100644
--- a/libocrdma/src/ocrdma_verbs.c
+++ b/libocrdma/src/ocrdma_verbs.c
@@ -1539,7 +1539,7 @@ int ocrdma_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
 
 static enum ibv_wc_status ocrdma_to_ibwc_err(uint16_t status)
 {
-	enum ibv_wc_opcode ibwc_status = IBV_WC_GENERAL_ERR;
+	enum ibv_wc_status ibwc_status = IBV_WC_GENERAL_ERR;
 	switch (status) {
 	case OCRDMA_CQE_GENERAL_ERR:
 		ibwc_status = IBV_WC_GENERAL_ERR;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 08/23] ocrdma: Fix incorrect enum constant
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Devesh Sharma
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

clang 3.6 remarks:

../providers/ocrdma/ocrdma_verbs.c:597:14: warning: implicit conversion from enumeration type 'enum ibv_qp_state' to different enumeration type 'enum ocrdma_qp_state' [-Wenum-conversion]
        qp->state = IBV_QPS_RESET;

And it is not wrong.  IBV_QPS_RESET=0 and OCRDMA_QPS_RST=0 so this
patch is a NOP.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libocrdma/src/ocrdma_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libocrdma/src/ocrdma_verbs.c b/libocrdma/src/ocrdma_verbs.c
index b3c77c47d660..60626260656d 100644
--- a/libocrdma/src/ocrdma_verbs.c
+++ b/libocrdma/src/ocrdma_verbs.c
@@ -620,7 +620,7 @@ struct ibv_qp *ocrdma_create_qp(struct ibv_pd *pd,
 			qp->dpp_cq = 0;
 		}
 	}
-	qp->state = IBV_QPS_RESET;
+	qp->state = OCRDMA_QPS_RST;
 	INIT_DBLY_LIST_NODE(&qp->sq_entry);
 	INIT_DBLY_LIST_NODE(&qp->rq_entry);
 	return &qp->ibv_qp;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 09/23] verbs: Fix incorrect type of len
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Sean Hefty
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

gcc remarks:

../librdmacm/examples/udpong.c:301:11: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
   if (len < 0)

len is set by:
		len = svr_recv(&msg, sizeof msg, &addr, &addrlen);

And svr_recv returns:

static ssize_t svr_recv(struct message *msg, size_t size,

So clearly len is the wrong type, and the error test does
not work.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 librdmacm/examples/udpong.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/librdmacm/examples/udpong.c b/librdmacm/examples/udpong.c
index 6affc62d5a84..0f44f50e6e88 100644
--- a/librdmacm/examples/udpong.c
+++ b/librdmacm/examples/udpong.c
@@ -291,7 +291,7 @@ out:
 
 static int svr_run(void)
 {
-	size_t len;
+	ssize_t len;
 	int ret;
 
 	ret = svr_bind();
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 10/23] verbs: Use inttypes.h format string macros
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Doug Ledford, Yishai Hadas
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

Otherwise a 32bit compile of ibv_devinfo will print garbage for
these values.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libibverbs/examples/devinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libibverbs/examples/devinfo.c b/libibverbs/examples/devinfo.c
index 1d0c2dbde9b0..e814bacdf7aa 100644
--- a/libibverbs/examples/devinfo.c
+++ b/libibverbs/examples/devinfo.c
@@ -474,13 +474,13 @@ static int print_hca_cap(struct ibv_device *ib_dev, uint8_t ib_port)
 
 		print_odp_caps(&device_attr.odp_caps);
 		if (device_attr.completion_timestamp_mask)
-			printf("\tcompletion timestamp_mask:\t\t\t0x%016lx\n",
+			printf("\tcompletion timestamp_mask:\t\t\t0x%016" PRIx64 "\n",
 			       device_attr.completion_timestamp_mask);
 		else
 			printf("\tcompletion_timestamp_mask not supported\n");
 
 		if (device_attr.hca_core_clock)
-			printf("\thca_core_clock:\t\t\t%lukHZ\n", device_attr.hca_core_clock);
+			printf("\thca_core_clock:\t\t\t%" PRIu64 "kHZ\n", device_attr.hca_core_clock);
 		else
 			printf("\tcore clock not supported\n");
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 11/23] verbs: Move documentation to Documentation/
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Christoph Hellwig
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

From: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

And drop bits that are outdated or replaced by top-level Documentation.

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 Documentation/libibverbs.md |  58 ++++++++++++++++
 libibverbs/README           | 164 --------------------------------------------
 2 files changed, 58 insertions(+), 164 deletions(-)
 create mode 100644 Documentation/libibverbs.md
 delete mode 100644 libibverbs/README

diff --git a/Documentation/libibverbs.md b/Documentation/libibverbs.md
new file mode 100644
index 000000000000..cbe076e0fcab
--- /dev/null
+++ b/Documentation/libibverbs.md
@@ -0,0 +1,58 @@
+# Introduction
+
+libibverbs is a library that allows programs to use RDMA "verbs" for
+direct access to RDMA (currently InfiniBand and iWARP) hardware from
+userspace.  For more information on RDMA verbs, see the InfiniBand
+Architecture Specification vol. 1, especially chapter 11, and the RDMA
+Consortium's RDMA Protocol Verbs Specification.
+
+# Using libibverbs
+
+### Device nodes
+
+The verbs library expects special character device files named
+/dev/infiniband/uverbsN to be created.  When you load the kernel
+modules, including both the low-level driver for your IB hardware as
+well as the ib_uverbs module, you should see one or more uverbsN
+entries in /sys/class/infiniband_verbs in addition to the
+/dev/infiniband/uverbsN character device files.
+
+To create the appropriate character device files automatically with
+udev, a rule like
+
+    KERNEL="uverbs*", NAME="infiniband/%k"
+
+can be used.  This will create device nodes named
+
+    /dev/infiniband/uverbs0
+
+and so on.  Since the RDMA userspace verbs should be safe for use by
+non-privileged users, you may want to add an appropriate MODE or GROUP
+to your udev rule.
+
+### Permissions
+
+To use IB verbs from userspace, a process must be able to access the
+appropriate /dev/infiniband/uverbsN special device file.  You can
+check the permissions on this file with the command
+
+	ls -l /dev/infiniband/uverbs*
+
+Make sure that the permissions on these files are such that the
+user/group that your verbs program runs as can access the device file.
+
+To use IB verbs from userspace, a process must also have permission to
+tell the kernel to lock sufficient memory for all of your registered
+memory regions as well as the memory used internally by IB resources
+such as queue pairs (QPs) and completion queues (CQs).  To check your
+resource limits, use the command
+
+	ulimit -l
+
+(or "limit memorylocked" for csh-like shells).
+
+If you see a small number such as 32 (the units are KB) then you will
+need to increase this limit.  This is usually done for ordinary users
+via the file /etc/security/limits.conf.  More configuration may be
+necessary if you are logging in via OpenSSH and your sshd is
+configured to use privilege separation.
diff --git a/libibverbs/README b/libibverbs/README
deleted file mode 100644
index 848eb05917fb..000000000000
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 12/23] rdmacm: Use correct format specifier for size_t
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Sean Hefty
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

clang 3.6 remarks:

../librdmacm/examples/rping.c:1203:30: warning: invalid conversion specifier 'Z' [-Wformat-invalid-specifier]
                                       "(valid range is %Zd to %d)\n",

And indeed, the correct specifier for size_t is '%zd'

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 librdmacm/examples/rping.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/librdmacm/examples/rping.c b/librdmacm/examples/rping.c
index 171857dcb5ca..c248e66aaa83 100644
--- a/librdmacm/examples/rping.c
+++ b/librdmacm/examples/rping.c
@@ -1201,7 +1201,7 @@ int main(int argc, char *argv[])
 			if ((cb->size < RPING_MIN_BUFSIZE) ||
 			    (cb->size > (RPING_BUFSIZE - 1))) {
 				fprintf(stderr, "Invalid size %d "
-				       "(valid range is %Zd to %d)\n",
+				       "(valid range is %zd to %d)\n",
 				       cb->size, RPING_MIN_BUFSIZE, RPING_BUFSIZE);
 				ret = EINVAL;
 			} else
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 13/23] rdmacm: Fix leading \'s in rcopy man page
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Sean Hefty
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

Debian's Lintian remarks:

W: rdma-plumbing: manpage-has-errors-from-man usr/share/man/man1/rcopy.1.gz 15: warning: numeric expression expected (got `u')

And indeed the man page displays corrupted. The leading \ is only needed
if the text starts with - so drop it on all other cases.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 librdmacm/man/rcopy.1 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/librdmacm/man/rcopy.1 b/librdmacm/man/rcopy.1
index a5ad76aa8742..e875458bf162 100644
--- a/librdmacm/man/rcopy.1
+++ b/librdmacm/man/rcopy.1
@@ -12,13 +12,13 @@ Uses sockets over RDMA interface to copy a source file to the
 specified destination. 
 .SH "OPTIONS"
 .TP
-\source
+source
 The name and path of the source file to copy.
 .TP
-\server
+server
 The name or address of the destination server.
 .TP
-\:destination
+:destination
 An optional destination filename and path.  If not given, the destination
 filename will match that of the source.
 .TP
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 14/23] rdmacm: Fix typos
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Sean Hefty
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

From: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org> (debian)
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 librdmacm/include/rdma/rdma_cma.h | 2 +-
 librdmacm/man/mckey.1             | 2 +-
 librdmacm/man/rdma_cm.7           | 4 ++--
 librdmacm/man/rdma_migrate_id.3   | 2 +-
 librdmacm/man/rdma_post_write.3   | 2 +-
 librdmacm/man/rdma_post_writev.3  | 2 +-
 librdmacm/man/rdma_reg_msgs.3     | 2 +-
 librdmacm/man/rdma_set_option.3   | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/librdmacm/include/rdma/rdma_cma.h b/librdmacm/include/rdma/rdma_cma.h
index 4826c0304b0b..2055665a1496 100644
--- a/librdmacm/include/rdma/rdma_cma.h
+++ b/librdmacm/include/rdma/rdma_cma.h
@@ -278,7 +278,7 @@ int rdma_create_ep(struct rdma_cm_id **id, struct rdma_addrinfo *res,
 
 /**
  * rdma_destroy_ep - Deallocates a communication identifier and qp.
- * @id: The communication identifer to destroy.
+ * @id: The communication identifier to destroy.
  * Description:
  *   Destroys the specified rdma_cm_id and any associated QP created
  *   on that id.
diff --git a/librdmacm/man/mckey.1 b/librdmacm/man/mckey.1
index 441881919dd2..86a51a35e971 100644
--- a/librdmacm/man/mckey.1
+++ b/librdmacm/man/mckey.1
@@ -47,7 +47,7 @@ UDP (0x0111) or IPoIB (0x0002) port space.  (default RDMA_PS_UDP)
 Basic usage is to start mckey -m multicast_address on a server system,
 then run mckey -m multicast_address -s on a client system.
 .P
-Unique Infiniband SA assigned multicast GIDs can be retrived by
+Unique Infiniband SA assigned multicast GIDs can be retrieved by
 invoking mckey with a zero MGID or IP address.  (Example, -M 0 or
 -m 0.0.0.0).  The assigned address will be displayed to allow
 mckey clients to join the created group. 
diff --git a/librdmacm/man/rdma_cm.7 b/librdmacm/man/rdma_cm.7
index ee8427a29223..451035bfb588 100644
--- a/librdmacm/man/rdma_cm.7
+++ b/librdmacm/man/rdma_cm.7
@@ -67,7 +67,7 @@ low level call details shown.  For
 synchronous operation, calls to rdma_create_event_channel, rdma_get_cm_event,
 rdma_ack_cm_event, and rdma_destroy_event_channel
 would be eliminated.  Abstracted calls, such as rdma_create_ep encapsulate
-serveral of these calls under a single API.
+several of these calls under a single API.
 Users may also refer to the example applications for
 code samples.  A general connection flow would be:
 .IP rdma_getaddrinfo
@@ -171,7 +171,7 @@ regarding the reason for the failure.
 .P
 Prior versions of the library would return -errno and not set errno for some cases
 related to ENOMEM, ENODEV, ENODATA, EINVAL, and EADDRNOTAVAIL codes. Applications
-that want to check these codes and have compatability with prior library versions
+that want to check these codes and have compatibility with prior library versions
 must manually set errno to the negative of the return code if it is < -1.
 .SH "SEE ALSO"
 rdma_accept(3),
diff --git a/librdmacm/man/rdma_migrate_id.3 b/librdmacm/man/rdma_migrate_id.3
index 8683c93090bf..8c2d7dd6e40a 100644
--- a/librdmacm/man/rdma_migrate_id.3
+++ b/librdmacm/man/rdma_migrate_id.3
@@ -1,6 +1,6 @@
 .TH "RDMA_MIGRATE_ID" 3 "2007-11-13" "librdmacm" "Librdmacm Programmer's Manual" librdmacm
 .SH NAME
-rdma_migrate_id \- Move a communication identifer to a different event channel.
+rdma_migrate_id \- Move a communication identifier to a different event channel.
 .SH SYNOPSIS
 .B "#include <rdma/rdma_cma.h>"
 .P
diff --git a/librdmacm/man/rdma_post_write.3 b/librdmacm/man/rdma_post_write.3
index 896996ce5f62..5ab4fdb5dc4b 100644
--- a/librdmacm/man/rdma_post_write.3
+++ b/librdmacm/man/rdma_post_write.3
@@ -34,7 +34,7 @@ The registered memory key associated with the remote address.
 .SH "DESCRIPTION"
 Posts a work request to the send queue of the queue pair associated
 with the rdma_cm_id.  The contents of the local data buffer will be
-writen into the remote memory region.
+written into the remote memory region.
 .SH "RETURN VALUE"
 Returns 0 on success, or -1 on error.  If an error occurs, errno will be
 set to indicate the failure reason.
diff --git a/librdmacm/man/rdma_post_writev.3 b/librdmacm/man/rdma_post_writev.3
index f5b23fdcb7bc..1fc7b0a6c709 100644
--- a/librdmacm/man/rdma_post_writev.3
+++ b/librdmacm/man/rdma_post_writev.3
@@ -31,7 +31,7 @@ The registered memory key associated with the remote address.
 .SH "DESCRIPTION"
 Posts a work request to the send queue of the queue pair associated
 with the rdma_cm_id.  The contents of the local data buffers will be
-writen into the remote memory region.
+written into the remote memory region.
 .SH "RETURN VALUE"
 Returns 0 on success, or -1 on error.  If an error occurs, errno will be
 set to indicate the failure reason.
diff --git a/librdmacm/man/rdma_reg_msgs.3 b/librdmacm/man/rdma_reg_msgs.3
index c2c93593bba9..4f5656313734 100644
--- a/librdmacm/man/rdma_reg_msgs.3
+++ b/librdmacm/man/rdma_reg_msgs.3
@@ -21,7 +21,7 @@ Registers an array of memory buffers used for sending and receiving
 messages or for RDMA operations.  Memory buffers registered using
 rdma_reg_msgs may be posted to an rdma_cm_id using
 rdma_post_send or rdma_post_recv, or specified as the target of an RDMA
-read operation or the source of an RDMA write reqeust.
+read operation or the source of an RDMA write request.
 .SH "RETURN VALUE"
 Returns a reference to the registered memory region on success, or NULL on
 error.  If an error occurs, errno will be set to indicate the failure reason.
diff --git a/librdmacm/man/rdma_set_option.3 b/librdmacm/man/rdma_set_option.3
index 8e344abc3f8a..74bf5ceba88d 100644
--- a/librdmacm/man/rdma_set_option.3
+++ b/librdmacm/man/rdma_set_option.3
@@ -28,6 +28,6 @@ the default system settings.
 Returns 0 on success, or -1 on error.  If an error occurs, errno will be
 set to indicate the failure reason.
 .SH "NOTES"
-Option details may be found in the relevent header files.
+Option details may be found in the relevant header files.
 .SH "SEE ALSO"
 rdma_create_id(3)
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 15/23] rdmacm: Move documentation to Documentation/
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Christoph Hellwig, Sean Hefty
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

From: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

And drop bits that are outdated or replaced by top-level Documentation.

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 librdmacm/README => Documentation/librdmacm.md | 27 ++++++--------------------
 1 file changed, 6 insertions(+), 21 deletions(-)
 rename librdmacm/README => Documentation/librdmacm.md (65%)

diff --git a/librdmacm/README b/Documentation/librdmacm.md
similarity index 65%
rename from librdmacm/README
rename to Documentation/librdmacm.md
index e1f222740144..817383661c06 100644
--- a/librdmacm/README
+++ b/Documentation/librdmacm.md
@@ -1,19 +1,5 @@
-This README is for userspace RDMA cm library.
+# Device files
 
-
-Building
-========
-To make this directory, run:
-./autogen.sh && ./configure && make && make install
-
-Typically the autogen and configure steps only need be done the first
-time unless configure.in or Makefile.am changes.
-
-Libraries are installed by default at /usr/local/lib.
-
-
-Device files
-============
 The userspace CMA uses a single device file regardless of the number
 of adapters or ports present.
 
@@ -31,17 +17,16 @@ or you can create it manually
   mknod /dev/infiniband/rdma_cm c 231 255
 
 
-Common issues
-=============
+# Common issues
 
 Using multiple interfaces
-	The librdmacm does support multiple interfaces.  To make use
+:	The librdmacm does support multiple interfaces.  To make use
 	of multiple interfaces, however, you need to instruct linux
 	to only send ARP reples on the interface targetted in the ARP
 	request.  This can be done using a command similar to the
 	following:
 
-	sysctl -w net.ipv4.conf.all.arp_ignore=2
+		sysctl -w net.ipv4.conf.all.arp_ignore=2
 
 	Without this change, it's possible for linux to resopnd to ARP
 	requests on a different interface (IP address) than the IP
@@ -50,12 +35,12 @@ Using multiple interfaces
 	device.
 
 Using loopback
-	The librdmacm relies on ARP to resolve IP address to RDMA
+:	The librdmacm relies on ARP to resolve IP address to RDMA
 	addresses.  To support loopback connections between different
 	ports on the same system, ARP must be enabled for local
 	resolution:
 
-	sysctl net.ipv4.conf.all.accept_local=1
+		sysctl net.ipv4.conf.all.accept_local=1
 
 	Without this setting, loopback connections may timeout
 	during address resolution.
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 16/23] ibcm: Move documentation to Documentation/
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Christoph Hellwig, Sean Hefty
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

From: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

And drop bits that are outdated or replaced by top-level Documentation.

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 libibcm/README => Documentation/libibcm.md | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
 rename libibcm/README => Documentation/libibcm.md (54%)

diff --git a/libibcm/README b/Documentation/libibcm.md
similarity index 54%
rename from libibcm/README
rename to Documentation/libibcm.md
index 4dda13c185eb..663e7736d2f1 100644
--- a/libibcm/README
+++ b/Documentation/libibcm.md
@@ -1,16 +1,4 @@
-This README is for userspace cm library.
-
-Building
-
-To make this directory, run:
-./autogen.sh && ./configure && make && make install
-
-Typically the autogen and configure steps only need be done the first
-time unless configure.in or Makefile.am changes.
-
-Libraries are installed by default at /usr/local/lib.
-
-Device files
+# Device files
 
 The userspace CM uses a device file per adapter present.
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 17/23] umad: Replace .nl with .sp in man pages
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Hal Rosenstock
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

Debian's Lintian remarks:

W: rdma-plumbing: manpage-has-errors-from-man usr/share/man/man3/umad_get_ca.3.gz 11: warning: macro `nl' not defined
W: rdma-plumbing: manpage-has-errors-from-man usr/share/man/man3/umad_get_port.3.gz 11: warning: macro `nl' not defined
W: rdma-plumbing: manpage-has-errors-from-man usr/share/man/man3/umad_init.3.gz 11: warning: macro `nl' not defined

We use .sp in other the man pages to separate function signatures, follow
that practice consistently.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libibumad/man/umad_get_ca.3   | 2 +-
 libibumad/man/umad_get_port.3 | 2 +-
 libibumad/man/umad_init.3     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libibumad/man/umad_get_ca.3 b/libibumad/man/umad_get_ca.3
index 2f5fd1a71420..8de61d06d6d3 100644
--- a/libibumad/man/umad_get_ca.3
+++ b/libibumad/man/umad_get_ca.3
@@ -8,7 +8,7 @@ umad_get_ca, umad_release_ca \- get and release InfiniBand device port attribute
 .B #include <infiniband/umad.h>
 .sp
 .BI "int umad_get_ca(char " "*ca_name" ", umad_ca_t " "*ca" );
-.nl
+.sp
 .BI "int umad_release_ca(umad_ca_t " "*ca" );
 .fi
 .SH "DESCRIPTION"
diff --git a/libibumad/man/umad_get_port.3 b/libibumad/man/umad_get_port.3
index 863afa7f8286..8dfa1d61933f 100644
--- a/libibumad/man/umad_get_port.3
+++ b/libibumad/man/umad_get_port.3
@@ -8,7 +8,7 @@ umad_get_port, umad_release_port \- open and close an InfiniBand port
 .B #include <infiniband/umad.h>
 .sp
 .BI "int umad_get_port(char " "*ca_name" ", int " "portnum" ", umad_port_t " "*port" );
-.nl
+.sp
 .BI "int umad_release_port(umad_port_t " "*port" );
 .fi
 .SH "DESCRIPTION"
diff --git a/libibumad/man/umad_init.3 b/libibumad/man/umad_init.3
index a8108773c09f..4c22d927d8ec 100644
--- a/libibumad/man/umad_init.3
+++ b/libibumad/man/umad_init.3
@@ -8,7 +8,7 @@ umad_init, umad_done \- perform library initialization and finalization
 .B #include <infiniband/umad.h>
 .sp
 .BI "int umad_init(void);
-.nl
+.sp
 .BI "int umad_done(void);
 .fi
 .SH "DESCRIPTION"
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 18/23] iwpmd: Add man pages
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Steve Wise, Tatyana Nikolova
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

From: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 CMakeLists.txt       |  1 +
 iwpmd/CMakeLists.txt |  4 ++++
 iwpmd/iwpmd.1        | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 iwpmd/iwpmd.conf.5   | 20 +++++++++++++++++++
 4 files changed, 81 insertions(+)
 create mode 100644 iwpmd/CMakeLists.txt
 create mode 100644 iwpmd/iwpmd.1
 create mode 100644 iwpmd/iwpmd.conf.5

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8875b4853c0..a829cd477c52 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -249,6 +249,7 @@ add_subdirectory(librxe/)
 # Binaries
 add_subdirectory(ibacm)
 if (NOT NL_KIND EQUAL 0)
+  add_subdirectory(iwpmd)
   add_subdirectory(iwpmd/src)
 endif()
 add_subdirectory(libibcm/examples)
diff --git a/iwpmd/CMakeLists.txt b/iwpmd/CMakeLists.txt
new file mode 100644
index 000000000000..21208dd5b82a
--- /dev/null
+++ b/iwpmd/CMakeLists.txt
@@ -0,0 +1,4 @@
+rdma_man_pages(
+  iwpmd.1
+  iwpmd.conf.5
+  )
diff --git a/iwpmd/iwpmd.1 b/iwpmd/iwpmd.1
new file mode 100644
index 000000000000..a4948c509f3b
--- /dev/null
+++ b/iwpmd/iwpmd.1
@@ -0,0 +1,56 @@
+.TH "iwpmd" 1 "2016-09-16" "iwpmd" "iwpmd" iwpmd
+.SH NAME
+iwpmd \- port mapping services for iWARP.
+.SH SYNOPSIS
+.sp
+.nf
+\fIiwpmd\fR
+.fi
+.SH "DESCRIPTION"
+The iWARP Port Mapper Daemon provides a user space service (iwpmd) for the
+iWarp drivers to claim tcp ports through the standard socket interface.
+.P
+The kernel space support for the port mapper is part of the iw_cm module.
+The ib_core module includes netlink support, which is used by the port
+mapper clients to exchange messages with iwpmd. Both modules iw_cm and
+ib_core need to be loaded in order for the libiwpm service to start
+successfully.
+.SH "IWARP PORT MAPPING DETAILS"
+The iWARP Port Mapper implementation is based on the port mapper
+specification section in the Sockets Direct Protocol:
+http://www.rdmaconsortium.org/home/draft-pinkerton-iwarp-sdp-v1.0.pdf
+.P
+Existing iWARP RDMA providers use the same IP address as the native
+TCP/IP stack when creating RDMA connections.  They need a mechanism to
+claim the TCP ports used for RDMA connections to prevent TCP port
+collisions when other host applications use TCP ports.  The iWARP Port
+Mapper provides a standard mechanism to accomplish this.  Without this
+service it is possible for RDMA application to bind/listen on the same
+port which is already being used by native TCP host application.  If
+that happens the incoming TCP connection data can be passed to the
+RDMA stack with error.
+.P
+The iWARP Connection Manager (port mapper client) sends to the IWPM
+service the local IP address and TCP port it has received from the RDMA
+application, when starting a connection.  The IWPM service performs
+a socket bind from user space to get an available TCP port, called a
+mapped port, and communicates it back to the client.  In that sense,
+the IWPM service is used to map the TCP port, which the RDMA application
+uses to any port available from the host TCP port space. The mapped ports
+are used in iWARP RDMA connections to avoid collisions with native TCP
+stack which is aware that these ports are taken. When an RDMA connection
+using a mapped port is terminated, the client notifies the IWPM service,
+which then releases the TCP port.
+.P
+The message exchange between iwpmd and the iWARP Connection Manager
+(between user space and kernel space) is implemented using netlink
+sockets.
+.SH "SIGNALS"
+SIGUSR1 will force a dump of the current mappings
+to the system message log.
+.P
+SIGTERM/SIGHUP will force iwpmd to exit.
+.SH "FILES"
+/etc/iwpmd.conf
+.SH "SEE ALSO"
+rdma_cm(7)
diff --git a/iwpmd/iwpmd.conf.5 b/iwpmd/iwpmd.conf.5
new file mode 100644
index 000000000000..9dfe137d3fab
--- /dev/null
+++ b/iwpmd/iwpmd.conf.5
@@ -0,0 +1,20 @@
+.TH "iwpmd.conf" 5 "2016-09-16" "iwpmd.conf" "iwpmd.conf" iwpmd.conf
+.SH NAME
+iwpmd.conf \- iWARP port mapper config file.
+.SH SYNOPSIS
+.sp
+.nf
+\fIiwpmd.conf\fR
+.fi
+.SH "DESCRIPTION"
+The iwpmd.conf file provides configuration parameters for iwpmd.  Parameters
+are in the form: param=value, and one per line.  Parameters include:
+.P
+nl_sock_rbuf_size - The socket buffer size of the netlink socket used
+to communicate with the kernel port map client.  The default is 400MB.
+.SH "EXAMPLES"
+nl_sock_rbuf_size=419430400
+.SH "FILES"
+/etc/iwpmd.conf
+.SH "SEE ALSO"
+iwpmd(1)
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 19/23] iwpmd: Install ancillary files for iwpm
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Tatyana Nikolova
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

There were installed manually inside the rpm spec file, our
standard is to do them during 'make install'

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 iwpmd/src/CMakeLists.txt | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/iwpmd/src/CMakeLists.txt b/iwpmd/src/CMakeLists.txt
index 5ffc21264ae2..e6255b597733 100644
--- a/iwpmd/src/CMakeLists.txt
+++ b/iwpmd/src/CMakeLists.txt
@@ -7,6 +7,10 @@ target_link_libraries(iwpmd
   ${NL_LIBRARIES}
   ${CMAKE_THREAD_LIBS_INIT}
   )
-# FIXME iwpmd_init init.d file
-# FIXME iwpmd.service systemd file
-# FIXME iwpmd.conf
+
+install(FILES "../iwpmd.service" DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}")
+install(FILES "../iwpmd_init"
+  DESTINATION "${CMAKE_INSTALL_INITDDIR}"
+  RENAME "iwpmd"
+  PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
+install(FILES "../iwpmd.conf" DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}")
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 20/23] iwpmd: Remove syslog.target from service file
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Tatyana Nikolova
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

Debian's Lintian remarks:

W: rdma-plumbing: systemd-service-file-refers-to-obsolete-target lib/systemd/system/iwpmd.service syslog.target

Apparently systemd stopped recommending this in version 35, socket activation
eliminates the need.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 iwpmd/iwpmd.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iwpmd/iwpmd.service b/iwpmd/iwpmd.service
index 97f6cf982889..96a3aec20fde 100644
--- a/iwpmd/iwpmd.service
+++ b/iwpmd/iwpmd.service
@@ -1,6 +1,6 @@
 [Unit]
 Description=iWarp Port Mapper
-After=syslog.target network.target
+After=network.target
 
 [Service]
 ExecStart=/usr/bin/iwpmd
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 21/23] rxe: Move documentation to Documentation/
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Christoph Hellwig
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

From: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

Very little of the rxe RADME.md is relevant with the kernel driver upstream,
and the userspace provider part of this repository.  Move the remaining bits
to Documentation/rxe.md and delete the rest.

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 Documentation/rxe.md | 22 ++++++++++++++++++
 librxe/README.md     | 63 ----------------------------------------------------
 2 files changed, 22 insertions(+), 63 deletions(-)
 create mode 100644 Documentation/rxe.md
 delete mode 100644 librxe/README.md

diff --git a/Documentation/rxe.md b/Documentation/rxe.md
new file mode 100644
index 000000000000..8e753decb3cb
--- /dev/null
+++ b/Documentation/rxe.md
@@ -0,0 +1,22 @@
+# Configure Soft-RoCE (RXE):
+
+Load rdma_rxe kernel module using the rxe_cfg script included in the librxe RPM:
+
+	# rxe_cfg start (this might require sudo or root privileges)
+
+Create RXE device over network interface (e.g. eth0):
+
+	# rxe_cfg add eth0
+
+Use the status command to display the current configuration:
+rxe_cfg status
+
+If configured successfully, you should see output similar to the following:
+
+```
+    Name  Link  Driver   Speed  NMTU  IPv4_addr  RDEV  RMTU
+    eth0  yes   mlx4_en                          rxe0  1024  (3)
+```
+
+If you are using a Mellanox HCA: Need to make sure that the mlx4_ib kernel module is not loaded (modprobe –rv mlx4_ib) in the soft-RoCE machine.
+Now you have an Infiniband device called “rxe0” that can be used to run any RoCE app.
diff --git a/librxe/README.md b/librxe/README.md
deleted file mode 100644
index 743edd1421bf..000000000000
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 22/23] srp_daemon: Move documentation to Documentation/
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Christoph Hellwig
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

From: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

And drop bits that are outdated or replaced by top-level Documentation.

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 Documentation/ibsrpdm.md | 41 ++++++++++++++++++++++++
 srp_daemon/README        | 82 ------------------------------------------------
 2 files changed, 41 insertions(+), 82 deletions(-)
 create mode 100644 Documentation/ibsrpdm.md
 delete mode 100644 srp_daemon/README

diff --git a/Documentation/ibsrpdm.md b/Documentation/ibsrpdm.md
new file mode 100644
index 000000000000..0fc544d0352a
--- /dev/null
+++ b/Documentation/ibsrpdm.md
@@ -0,0 +1,41 @@
+# Using ibsrpdm
+
+ibsrpdm is used for discovering and connecting to SRP SCSI targets on
+InfiniBand fabrics.  These targets can be accessed with the InfiniBand SRP
+initiator module, "ib_srp," included in Linux kernels 2.6.15 and newer.
+
+To run ibsrpdm, the ib_umad module must be loaded, as well as an appropriate
+low-level driver for the installed IB hardware.
+
+With no command line parameters, ibsrpdm displays information about
+SRP targets in human-readable form:
+
+    # ibsrpdm
+    IO Unit Info:
+        port LID:        0009
+        port GID:        fe800000000000000005ad00000013e9
+        change ID:       73b0
+        max controllers: 0x01
+
+        controller[  1]
+            GUID:      0005ad00000013e7
+            vendor ID: 0005ad
+            device ID: 0005ad
+            IO class : 0100
+            ID:        Topspin SRP/FC TCA
+            service entries: 2
+                service[  0]: 0000000000000066 / SRP.T10:20030003BA27CC7A
+                service[  1]: 0000000000000066 / SRP.T10:20030003BA27CF53
+
+With the "-c" flag, ibsrpdm displays information in a form that can be
+written to the kernel SRP initiators add_target file to connect to the
+SRP targets.  For example:
+
+    # ibsrpdm -c
+    id_ext=20030003BA27CC7A,ioc_guid=0005ad00000013e7,dgid=fe800000000000000005ad00000013e9,pkey=ffff,service_id=0000000000000066
+    id_ext=20030003BA27CF53,ioc_guid=0005ad00000013e7,dgid=fe800000000000000005ad00000013e9,pkey=ffff,service_id=0000000000000066
+
+Given this, the command below will connect to the first target
+discovered from the first port of the local HCA device "mthca0":
+
+    # echo -n id_ext=20030003BA27CC7A,ioc_guid=0005ad00000013e7,dgid=fe800000000000000005ad00000013e9,pkey=ffff,service_id=0000000000000066 > /sys/class/infiniband_srp/srp-mthca0-1/add_target
diff --git a/srp_daemon/README b/srp_daemon/README
deleted file mode 100644
index c44f11c5c51e..000000000000
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH 23/23] srp_daemon: Use SRP_DEFAULT_START/STOP for substitution
From: Jason Gunthorpe @ 2016-09-21 22:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Bart Van Assche
In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

For clarity.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 srp_daemon/srp_daemon/CMakeLists.txt | 4 ++--
 srp_daemon/srp_daemon/srpd.in        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/srp_daemon/srp_daemon/CMakeLists.txt b/srp_daemon/srp_daemon/CMakeLists.txt
index 29f6088d2855..84d74044186a 100644
--- a/srp_daemon/srp_daemon/CMakeLists.txt
+++ b/srp_daemon/srp_daemon/CMakeLists.txt
@@ -24,8 +24,8 @@ install(FILES srp_daemon.conf DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}")
 # FIXME: The ib init.d file should really be included in rdma-core as well.
 set(RDMA_SERVICE "openibd" CACHE STRING "init.d file service name to order srpd after")
 # NOTE: These defaults are for CentOS, packagers should override.
-set(DEFAULT_START "2 3 4 5" CACHE STRING "Default-Start service data for srpd")
-set(DEFAULT_STOP "0 1 6" CACHE STRING "Default-Stop service data for srpd")
+set(SRP_DEFAULT_START "2 3 4 5" CACHE STRING "Default-Start service data for srpd")
+set(SRP_DEFAULT_STOP "0 1 6" CACHE STRING "Default-Stop service data for srpd")
 configure_file(srpd.in "${CMAKE_CURRENT_BINARY_DIR}/srpd")
 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/srpd"
   DESTINATION "${CMAKE_INSTALL_INITDDIR}"
diff --git a/srp_daemon/srp_daemon/srpd.in b/srp_daemon/srp_daemon/srpd.in
index 6a5d7d70feae..10692e7e0f05 100755
--- a/srp_daemon/srp_daemon/srpd.in
+++ b/srp_daemon/srp_daemon/srpd.in
@@ -10,8 +10,8 @@
 # Provides:       srpd
 # Required-Start: $syslog @RDMA_SERVICE@
 # Required-Stop: $syslog @RDMA_SERVICE@
-# Default-Start: @DEFAULT_START@
-# Default-Stop: @DEFAULT_STOP@
+# Default-Start: @SRP_DEFAULT_START@
+# Default-Stop: @SRP_DEFAULT_STOP@
 # Should-Start:
 # Should-Stop:
 # Short-Description: Starts and stops the InfiniBand SRP client service
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* Unreliable Connection (IBV_QPT_UC) and rdma_accept()
From: Dong Young Yoon @ 2016-09-21 23:07 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Hi all,

I have been trying to implement simple client/server system that uses UC instead of RC in order to test the performance of RDMA Writes under UC against RDMA Reads under RC. When I switch from RC to UC, rdma_accept() at the server fails with “Invalid Argument (EINVAL)”. I have tried various values for queue pair attributes and also tried RDMA_PS_IB, RDMA_PS_UDP for rdma_create_id(), but nothing has worked for me. The problem seems to be very similar to what had been discussed in this thread last year: http://www.spinics.net/lists/linux-rdma/msg23071.html, yet I could not find the solution to the problem in the thread.
Has there been any development regarding UC since then? I am more than happy to provide more information that would help in resolving this issue.

Thanks,
Dong Young
--
Dong Young Yoon
PhD Candidate in Computer Science
University of Michigan
2260 Hayward St.
Ann Arbor, MI 48109-2121
Office: 4957 Beyster
Phone: 734-780-9175
Email: dyoon-63aXycvo3TyHXe+LvDLADg@public.gmane.org 

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH 23/23] srp_daemon: Use SRP_DEFAULT_START/STOP for substitution
From: Bart Van Assche @ 2016-09-21 23:23 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1474495729-17604-24-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On 09/21/16 15:08, Jason Gunthorpe wrote:
> For clarity.

Reviewed-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters
From: Knut Omang @ 2016-09-22  4:35 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Leon Romanovsky, Yishai Hadas, Doug Ledford,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Mukesh Kacker,
	. Coulter, Susan K, Woodruff, Robert J
In-Reply-To: <20160920155136.GF32020-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On Tue, 2016-09-20 at 09:51 -0600, Jason Gunthorpe wrote:
> On Tue, Sep 20, 2016 at 04:05:50PM +0200, Knut Omang wrote:
> 
> > The problem is that libsif is stuck under a BSD only license imposed by 
> > the first set of lawyers involved, and to be compatible, we need it 
> > to be dual license GPLv2 + BSD like the rest of the provider libraries.
> 
> Here is some (not a lawyer) information you may find helpful.
> 
> Oracle is an OFA member and part of the purpose of groups of OFA is to
> manage license issues across companies collaborating on the same code
> base. Oracle will have agreed to various things on this topic when
> they became a member. The OFA may be able to help you with your legal.
> 
> The OFA may choose to not distribute improperly licensed code in
> OFED/etc.
> 
> GPLv2 compatability is important. Not just for the consolidated tree,
> but for everyone. Distors will have complicated questions if asked to
> ship a GPLv2 incompatible plugin at the same time as shipping a GPLv2
> program that uses the plugin. You may find your module undistributed.
> 
> That said, it is widely regarded that the BSD 2 and 3 clause license
> varients are GPLv2 compatible on their own without any additional
> language.
> 
> My view on the OFA dual license scheme is that it is used to
> provide absolute certainty that the code is GPLv2 compatible.
> Many other projects rely on the compatibility without being explicit.
> 
> I would have no objection to a BSD 2/3 clause licensed provider in the
> consolidated tree.  (while being confused why adding the GPLv2 option
> is such a difficult problem, and re-emphasising the view that the code
> will be used and distributed under the GPLv2 in some situations.)
> 
> A GPLv2 incompatible option like the CDDL, Apache license, etc is not
> acceptable. Do not get creative and add new clauses to the stanard BSD
> license.
> 
> So, in short, I would urge you to work with your legal to use the OFA
> dual license. If that is completely impossible then a standard BSD
> license will work to some degree. Remember, it is very hard to change
> licenses after the fact.

Thanks for spending time on this, Jason, appreciated!
I'll bring it forward as best as I can. The point of piggybacking on the OFA
work on licensing is a good point I'll forward to the legal dep.
And this discussion also reinforces my argument that we, the SIF software team 
should persist in our request to get this right from the beginning.

Knut

> 
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH libibverbs v3 1/3] Add new call ibv_cmd_create_ah_ex which supports extra parameters
From: Knut Omang @ 2016-09-22  4:46 UTC (permalink / raw)
  To: Jason Gunthorpe, Yishai Hadas
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Mukesh Kacker
In-Reply-To: <20160920153217.GE32020-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On Tue, 2016-09-20 at 09:32 -0600, Jason Gunthorpe wrote:
> On Tue, Sep 20, 2016 at 02:17:04PM +0300, Yishai Hadas wrote:
> 
> > Any reason to add 1.4 instead of using 1.3 ? in my understanding the idea is
> > that new symbols for next release will use a new ABI version, this is what
> > 1.3 already supplied. Added Jason for his input as well.
> 
> Doug indicated he was going to roll a 1.3 release RSN, up to him what
> number it will be eventually.
>  
> > >+	global:
> > >+		ibv_cmd_create_ah_ex;
> > 
> > When do you plan to contribute the driver code for that ? for now no
> > upstream drivers uses this API, taking some code for future usage with no
> > current usage is not the preferred way.
> 
> Even a github reference with your pre-submission driver would be useful

Tried to find an Oracle employee active user without success so far, 
so I need to validate that this is ok. In parallel I am pursuing getting 
public git repos on the Oracle OSS site for it.

My plan is to post the driver in a big
file-by-file commit series rebased to the latest, but I have 
got a bit delayed by other work, so I think realistically 
that I am not ready until mid-Oct.

Thanks,
Knut

> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* RE: [RFC v2 06/12] qedr: Add support for QP verbs
From: Amrani, Ram @ 2016-09-22  6:51 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Elior, Ariel,
	Kalderon, Michal, Mintz, Yuval, Borundia, Rajesh,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <20160921155509.GC1510-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

> 
> Do you have a git tree?
> 
We don't have a publicly accessible git tree.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox