Skip to contentSkip to conversation

nfsrdma: Miscellanseous Bug Fixes

PATCH In review Tom Tucker 3 participants 10 messages Aug 3, 2010 – Aug 4, 2010 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Tom Tucker

author
#0 lore raw

cover nfsrdma: Miscellanseous Bug Fixes

The following series fixes a number of bugs in the NFSRDMA transport.

---

Steve Wise (1):
xprtrdma: Do not truncate iova_start values in frmr registrations.

Tom Tucker (3):
rpcrdma: Fix SQ size calculation when memreg is FRMR
svcrdma: Cleanup DMA unmapping in error paths.
svcrdma: Change DMA mapping logic to avoid the page_address kernel API

 net/sunrpc/xprtrdma/rpc_rdma.c           |    2 +
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c  |   19 ++++---
 net/sunrpc/xprtrdma/svc_rdma_sendto.c    |   82 ++++++++++++++++++++++--------
 net/sunrpc/xprtrdma/svc_rdma_transport.c |   41 +++++++--------
 net/sunrpc/xprtrdma/verbs.c              |   22 ++++++--
 5 files changed, 111 insertions(+), 55 deletions(-)
Signature · 1 line
Signed-off-by: Tom Tucker <[email protected]>
author
#1 lore raw

PATCH 1/4 xprtrdma: Do not truncate iova_start values in frmr registrations.

From: Steve Wise <[email protected]>

A bad cast causes the iova_start, which in this case is a 64b DMA bus address, to be truncated on 32b systems. This breaks frmrs on 32b systems. No cast is needed.

---

 net/sunrpc/xprtrdma/verbs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/sunrpc/xprtrdma/verbs.c +1 -1
index 27015c6..3bdbd9f 100644
@@ -1490,7 +1490,7 @@ rpcrdma_register_frmr_external(struct rpcrdma_mr_seg *seg,
 	memset(&frmr_wr, 0, sizeof frmr_wr);
 	frmr_wr.opcode = IB_WR_FAST_REG_MR;
 	frmr_wr.send_flags = 0;			/* unsignaled */
-	frmr_wr.wr.fast_reg.iova_start = (unsigned long)seg1->mr_dma;
+	frmr_wr.wr.fast_reg.iova_start = seg1->mr_dma;
 	frmr_wr.wr.fast_reg.page_list = seg1->mr_chunk.rl_mw->r.frmr.fr_pgl;
 	frmr_wr.wr.fast_reg.page_list_len = i;
 	frmr_wr.wr.fast_reg.page_shift = PAGE_SHIFT;
author
#2 lore raw

PATCH 2/4 svcrdma: Change DMA mapping logic to avoid the page_address kernel API

In reply to Tom Tucker

There was logic in the send path that assumed that a page containing data to send to the client has a KVA. This is not always the case and can result in data corruption when page_address returns zero and we end up DMA mapping zero.

This patch changes the bus mapping logic to avoid page_address() where necessary and converts all calls from ib_dma_map_single to ib_dma_map_page in order to keep the map/unmap calls symmetric.

---

 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c  |   18 ++++---
 net/sunrpc/xprtrdma/svc_rdma_sendto.c    |   80 ++++++++++++++++++++++--------
 net/sunrpc/xprtrdma/svc_rdma_transport.c |   18 +++----
 3 files changed, 78 insertions(+), 38 deletions(-)
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +11 -7
index 0194de8..926bdb4 100644
@@ -263,9 +263,9 @@ static int fast_reg_read_chunks(struct svcxprt_rdma *xprt,
 	frmr->page_list_len = PAGE_ALIGN(byte_count) >> PAGE_SHIFT;
 	for (page_no = 0; page_no < frmr->page_list_len; page_no++) {
 		frmr->page_list->page_list[page_no] =
-			ib_dma_map_single(xprt->sc_cm_id->device,
-					  page_address(rqstp->rq_arg.pages[page_no]),
-					  PAGE_SIZE, DMA_FROM_DEVICE);
+			ib_dma_map_page(xprt->sc_cm_id->device,
+					rqstp->rq_arg.pages[page_no], 0,
+					PAGE_SIZE, DMA_FROM_DEVICE);
 		if (ib_dma_mapping_error(xprt->sc_cm_id->device,
 					 frmr->page_list->page_list[page_no]))
 			goto fatal_err;
@@ -309,17 +309,21 @@ static int rdma_set_ctxt_sge(struct svcxprt_rdma *xprt,
 			     int count)
 {
 	int i;
+	unsigned long off;
 
 	ctxt->count = count;
 	ctxt->direction = DMA_FROM_DEVICE;
 	for (i = 0; i < count; i++) {
 		ctxt->sge[i].length = 0; /* in case map fails */
 		if (!frmr) {
+			BUG_ON(0 == virt_to_page(vec[i].iov_base));
+			off = (unsigned long)vec[i].iov_base & ~PAGE_MASK;
 			ctxt->sge[i].addr =
-				ib_dma_map_single(xprt->sc_cm_id->device,
-						  vec[i].iov_base,
-						  vec[i].iov_len,
-						  DMA_FROM_DEVICE);
+				ib_dma_map_page(xprt->sc_cm_id->device,
+						virt_to_page(vec[i].iov_base),
+						off,
+						vec[i].iov_len,
+						DMA_FROM_DEVICE);
 			if (ib_dma_mapping_error(xprt->sc_cm_id->device,
 						 ctxt->sge[i].addr))
 				return -EINVAL;
net/sunrpc/xprtrdma/svc_rdma_sendto.c +58 -22

150 lines not on this page · raw message

net/sunrpc/xprtrdma/svc_rdma_transport.c +9 -9
index edea15a..23f90c3 100644
@@ -120,7 +120,7 @@ void svc_rdma_unmap_dma(struct svc_rdma_op_ctxt *ctxt)
 		 */
 		if (ctxt->sge[i].lkey == xprt->sc_dma_lkey) {
 			atomic_dec(&xprt->sc_dma_used);
-			ib_dma_unmap_single(xprt->sc_cm_id->device,
+			ib_dma_unmap_page(xprt->sc_cm_id->device,
 					    ctxt->sge[i].addr,
 					    ctxt->sge[i].length,
 					    ctxt->direction);
@@ -502,8 +502,8 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt)
 		BUG_ON(sge_no >= xprt->sc_max_sge);
 		page = svc_rdma_get_page();
 		ctxt->pages[sge_no] = page;
-		pa = ib_dma_map_single(xprt->sc_cm_id->device,
-				     page_address(page), PAGE_SIZE,
+		pa = ib_dma_map_page(xprt->sc_cm_id->device,
+				     page, 0, PAGE_SIZE,
 				     DMA_FROM_DEVICE);
 		if (ib_dma_mapping_error(xprt->sc_cm_id->device, pa))
 			goto err_put_ctxt;
@@ -798,8 +798,8 @@ static void frmr_unmap_dma(struct svcxprt_rdma *xprt,
 		if (ib_dma_mapping_error(frmr->mr->device, addr))
 			continue;
 		atomic_dec(&xprt->sc_dma_used);
-		ib_dma_unmap_single(frmr->mr->device, addr, PAGE_SIZE,
-				    frmr->direction);
+		ib_dma_unmap_page(frmr->mr->device, addr, PAGE_SIZE,
+				  frmr->direction);
 	}
 }
 
@@ -1274,7 +1274,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
 				   atomic_read(&xprt->sc_sq_count) <
 				   xprt->sc_sq_depth);
 			if (test_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags))
-				return 0;
+				return -ENOTCONN;
 			continue;
 		}
 		/* Take a transport ref for each WR posted */
@@ -1320,8 +1320,8 @@ void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
 	length = svc_rdma_xdr_encode_error(xprt, rmsgp, err, va);
 
 	/* Prepare SGE for local address */
-	sge.addr = ib_dma_map_single(xprt->sc_cm_id->device,
-				   page_address(p), PAGE_SIZE, DMA_FROM_DEVICE);
+	sge.addr = ib_dma_map_page(xprt->sc_cm_id->device,
+				   p, 0, PAGE_SIZE, DMA_FROM_DEVICE);
 	if (ib_dma_mapping_error(xprt->sc_cm_id->device, sge.addr)) {
 		put_page(p);
 		return;
@@ -1348,7 +1348,7 @@ void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
 	if (ret) {
 		dprintk("svcrdma: Error %d posting send for protocol error\n",
 			ret);
-		ib_dma_unmap_single(xprt->sc_cm_id->device,
+		ib_dma_unmap_page(xprt->sc_cm_id->device,
 				  sge.addr, PAGE_SIZE,
 				  DMA_FROM_DEVICE);
 		svc_rdma_put_context(ctxt, 1);
author
#3 lore raw

PATCH 3/4 svcrdma: Cleanup DMA unmapping in error paths.

In reply to Tom Tucker

There are several error paths in the code that do not unmap DMA. This patch adds calls to svc_rdma_unmap_dma to free these DMA contexts.

---

 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c  |    1 +
 net/sunrpc/xprtrdma/svc_rdma_sendto.c    |    2 ++
 net/sunrpc/xprtrdma/svc_rdma_transport.c |   29 ++++++++++++++---------------
 3 files changed, 17 insertions(+), 15 deletions(-)
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +1 -0
index 926bdb4..df67211 100644
@@ -495,6 +495,7 @@ next_sge:
 			printk(KERN_ERR "svcrdma: Error %d posting RDMA_READ\n",
 			       err);
 			set_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags);
+			svc_rdma_unmap_dma(ctxt);
 			svc_rdma_put_context(ctxt, 0);
 			goto out;
 		}
net/sunrpc/xprtrdma/svc_rdma_sendto.c +2 -0
index d4f5e0e..249a835 100644
@@ -367,6 +367,8 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp,
 		goto err;
 	return 0;
  err:
+	svc_rdma_unmap_dma(ctxt);
+	svc_rdma_put_frmr(xprt, vec->frmr);
 	svc_rdma_put_context(ctxt, 0);
 	/* Fatal error, close transport */
 	return -EIO;
net/sunrpc/xprtrdma/svc_rdma_transport.c +14 -15
index 23f90c3..d22a44d 100644
@@ -511,9 +511,9 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt)
 		ctxt->sge[sge_no].addr = pa;
 		ctxt->sge[sge_no].length = PAGE_SIZE;
 		ctxt->sge[sge_no].lkey = xprt->sc_dma_lkey;
+		ctxt->count = sge_no + 1;
 		buflen += PAGE_SIZE;
 	}
-	ctxt->count = sge_no;
 	recv_wr.next = NULL;
 	recv_wr.sg_list = &ctxt->sge[0];
 	recv_wr.num_sge = ctxt->count;
@@ -529,6 +529,7 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt)
 	return ret;
 
  err_put_ctxt:
+	svc_rdma_unmap_dma(ctxt);
 	svc_rdma_put_context(ctxt, 1);
 	return -ENOMEM;
 }
@@ -1306,7 +1307,6 @@ void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
 			 enum rpcrdma_errcode err)
 {
 	struct ib_send_wr err_wr;
-	struct ib_sge sge;
 	struct page *p;
 	struct svc_rdma_op_ctxt *ctxt;
 	u32 *va;
@@ -1319,26 +1319,27 @@ void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
 	/* XDR encode error */
 	length = svc_rdma_xdr_encode_error(xprt, rmsgp, err, va);
 
+	ctxt = svc_rdma_get_context(xprt);
+	ctxt->direction = DMA_FROM_DEVICE;
+	ctxt->count = 1;
+	ctxt->pages[0] = p;
+
 	/* Prepare SGE for local address */
-	sge.addr = ib_dma_map_page(xprt->sc_cm_id->device,
-				   p, 0, PAGE_SIZE, DMA_FROM_DEVICE);
-	if (ib_dma_mapping_error(xprt->sc_cm_id->device, sge.addr)) {
+	ctxt->sge[0].addr = ib_dma_map_page(xprt->sc_cm_id->device,
+					    p, 0, length, DMA_FROM_DEVICE);
+	if (ib_dma_mapping_error(xprt->sc_cm_id->device, ctxt->sge[0].addr)) {
 		put_page(p);
 		return;
 	}
 	atomic_inc(&xprt->sc_dma_used);
-	sge.lkey = xprt->sc_dma_lkey;
-	sge.length = length;
-
-	ctxt = svc_rdma_get_context(xprt);
-	ctxt->count = 1;
-	ctxt->pages[0] = p;
+	ctxt->sge[0].lkey = xprt->sc_dma_lkey;
+	ctxt->sge[0].length = length;
 
 	/* Prepare SEND WR */
 	memset(&err_wr, 0, sizeof err_wr);
 	ctxt->wr_op = IB_WR_SEND;
 	err_wr.wr_id = (unsigned long)ctxt;
-	err_wr.sg_list = &sge;
+	err_wr.sg_list = ctxt->sge;
 	err_wr.num_sge = 1;
 	err_wr.opcode = IB_WR_SEND;
 	err_wr.send_flags = IB_SEND_SIGNALED;
@@ -1348,9 +1349,7 @@ void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
 	if (ret) {
 		dprintk("svcrdma: Error %d posting send for protocol error\n",
 			ret);
-		ib_dma_unmap_page(xprt->sc_cm_id->device,
-				  sge.addr, PAGE_SIZE,
-				  DMA_FROM_DEVICE);
+		svc_rdma_unmap_dma(ctxt);
 		svc_rdma_put_context(ctxt, 1);
 	}
 }
author
#4 lore raw

PATCH 4/4 rpcrdma: Fix SQ size calculation when memreg is FRMR

In reply to Tom Tucker

This patch updates the computation to include the worst case situation where three FRMR are required to map a single RPC REQ.

---

 net/sunrpc/xprtrdma/rpc_rdma.c |    2 ++
 net/sunrpc/xprtrdma/verbs.c    |   20 ++++++++++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)
net/sunrpc/xprtrdma/rpc_rdma.c +2 -0
index e5e28d1..2ac3f6e 100644
@@ -249,6 +249,8 @@ rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf *target,
 	req->rl_nchunks = nchunks;
 
 	BUG_ON(nchunks == 0);
+	BUG_ON((r_xprt->rx_ia.ri_memreg_strategy == RPCRDMA_FRMR)
+	       && (nchunks > 3));
 
 	/*
 	 * finish off header. If write, marshal discrim and nchunks.
net/sunrpc/xprtrdma/verbs.c +16 -4
index 3bdbd9f..5f4c7b3 100644
@@ -650,10 +650,22 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
 	ep->rep_attr.cap.max_send_wr = cdata->max_requests;
 	switch (ia->ri_memreg_strategy) {
 	case RPCRDMA_FRMR:
-		/* Add room for frmr register and invalidate WRs */
-		ep->rep_attr.cap.max_send_wr *= 3;
-		if (ep->rep_attr.cap.max_send_wr > devattr.max_qp_wr)
-			return -EINVAL;
+		/* Add room for frmr register and invalidate WRs.
+		 * 1. FRMR reg WR for head
+		 * 2. FRMR invalidate WR for head
+		 * 3. FRMR reg WR for pagelist
+		 * 4. FRMR invalidate WR for pagelist
+		 * 5. FRMR reg WR for tail
+		 * 6. FRMR invalidate WR for tail
+		 * 7. The RDMA_SEND WR
+		 */
+		ep->rep_attr.cap.max_send_wr *= 7;
+		if (ep->rep_attr.cap.max_send_wr > devattr.max_qp_wr) {
+			cdata->max_requests = devattr.max_qp_wr / 7;
+			if (!cdata->max_requests)
+				return -EINVAL;
+			ep->rep_attr.cap.max_send_wr = cdata->max_requests * 7;
+		}
 		break;
 	case RPCRDMA_MEMWINDOWS_ASYNC:
 	case RPCRDMA_MEMWINDOWS:

A message that is not in the archive (sent off-list or not yet received): 20100803164517.2567.50208.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org

#6 lore raw

Re: [PATCH 4/4] rpcrdma: Fix SQ size calculation when memreg is FRMR

Hi Tom

Quoted 15 lines · Tom Tucker

This patch updates the computation to include the worst case situation where three FRMR are required to map a single RPC REQ.

---

 net/sunrpc/xprtrdma/rpc_rdma.c |    2 ++
 net/sunrpc/xprtrdma/verbs.c    |   20 ++++++++++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)
net/sunrpc/xprtrdma/rpc_rdma.c +0 -0
index e5e28d1..2ac3f6e 100644

net/sunrpc/xprtrdma/rpc_rdma.c rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf *target, · line 253

Quoted 5 lines
net/sunrpc/xprtrdma/rpc_rdma.c +2 -0
@@ -249,6 +249,8 @@ rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf *target,
 	req->rl_nchunks = nchunks;
 
 	BUG_ON(nchunks == 0);
+	BUG_ON((r_xprt->rx_ia.ri_memreg_strategy == RPCRDMA_FRMR)
+	       && (nchunks > 3));

Where does the number 3 come from?

Quoted 34 lines
net/sunrpc/xprtrdma/rpc_rdma.c +0 -0
 	/*
 	 * finish off header. If write, marshal discrim and nchunks.
net/sunrpc/xprtrdma/verbs.c +16 -4
index 3bdbd9f..5f4c7b3 100644
@@ -650,10 +650,22 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
 	ep->rep_attr.cap.max_send_wr = cdata->max_requests;
 	switch (ia->ri_memreg_strategy) {
 	case RPCRDMA_FRMR:
-		/* Add room for frmr register and invalidate WRs */
-		ep->rep_attr.cap.max_send_wr *= 3;
-		if (ep->rep_attr.cap.max_send_wr > devattr.max_qp_wr)
-			return -EINVAL;
+		/* Add room for frmr register and invalidate WRs.
+		 * 1. FRMR reg WR for head
+		 * 2. FRMR invalidate WR for head
+		 * 3. FRMR reg WR for pagelist
+		 * 4. FRMR invalidate WR for pagelist
+		 * 5. FRMR reg WR for tail
+		 * 6. FRMR invalidate WR for tail
+		 * 7. The RDMA_SEND WR
+		 */
+		ep->rep_attr.cap.max_send_wr *= 7;
+		if (ep->rep_attr.cap.max_send_wr > devattr.max_qp_wr) {
+			cdata->max_requests = devattr.max_qp_wr / 7;
+			if (!cdata->max_requests)
+				return -EINVAL;
+			ep->rep_attr.cap.max_send_wr = cdata->max_requests * 7;
+		}
 		break;
 	case RPCRDMA_MEMWINDOWS_ASYNC:
 	case RPCRDMA_MEMWINDOWS:
#7 lore raw

Re: [PATCH 4/4] rpcrdma: Fix SQ size calculation when memreg is FRMR

Quoted 21 lines · Trond Myklebust

Hi Tom

Quoted 17 lines · Tom Tucker

This patch updates the computation to include the worst case situation where three FRMR are required to map a single RPC REQ.

---

 net/sunrpc/xprtrdma/rpc_rdma.c |    2 ++
 net/sunrpc/xprtrdma/verbs.c    |   20 ++++++++++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)
net/sunrpc/xprtrdma/rpc_rdma.c +0 -0
index e5e28d1..2ac3f6e 100644
@@ -249,6 +249,8 @@ rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf *target,
 	req->rl_nchunks = nchunks;
 
Quoted 7 lines

net/sunrpc/xprtrdma/rpc_rdma.c rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf *target, · line 254

Quoted 4 lines
net/sunrpc/xprtrdma/rpc_rdma.c +2 -0
 	BUG_ON(nchunks == 0);
+	BUG_ON((r_xprt->rx_ia.ri_memreg_strategy == RPCRDMA_FRMR)
+	       && (nchunks > 3));
 

Where does the number 3 come from?

The assumption below is based on the premise that there is one chunk for the header, one for the pagelist, and one for the tail == 3. I guess I should have a comment -- sorry :-\

Quoted 38 lines
Quoted 36 lines
net/sunrpc/xprtrdma/rpc_rdma.c +0 -0
 	/*
 	 * finish off header. If write, marshal discrim and nchunks.
net/sunrpc/xprtrdma/verbs.c +16 -4
index 3bdbd9f..5f4c7b3 100644
@@ -650,10 +650,22 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
 	ep->rep_attr.cap.max_send_wr = cdata->max_requests;
 	switch (ia->ri_memreg_strategy) {
 	case RPCRDMA_FRMR:
-		/* Add room for frmr register and invalidate WRs */
-		ep->rep_attr.cap.max_send_wr *= 3;
-		if (ep->rep_attr.cap.max_send_wr > devattr.max_qp_wr)
-			return -EINVAL;
+		/* Add room for frmr register and invalidate WRs.
+		 * 1. FRMR reg WR for head
+		 * 2. FRMR invalidate WR for head
+		 * 3. FRMR reg WR for pagelist
+		 * 4. FRMR invalidate WR for pagelist
+		 * 5. FRMR reg WR for tail
+		 * 6. FRMR invalidate WR for tail
+		 * 7. The RDMA_SEND WR
+		 */
+		ep->rep_attr.cap.max_send_wr *= 7;
+		if (ep->rep_attr.cap.max_send_wr > devattr.max_qp_wr) {
+			cdata->max_requests = devattr.max_qp_wr / 7;
+			if (!cdata->max_requests)
+				return -EINVAL;
+			ep->rep_attr.cap.max_send_wr = cdata->max_requests * 7;
+		}
 		break;
 	case RPCRDMA_MEMWINDOWS_ASYNC:
 	case RPCRDMA_MEMWINDOWS:
#8 lore raw
In reply to Tom Tucker
Quoted 13 lines · Tom Tucker

The following series fixes a number of bugs in the NFSRDMA transport.

---

Steve Wise (1):
xprtrdma: Do not truncate iova_start values in frmr registrations.

Tom Tucker (3):
rpcrdma: Fix SQ size calculation when memreg is FRMR
svcrdma: Cleanup DMA unmapping in error paths.
svcrdma: Change DMA mapping logic to avoid the page_address kernel API

Quoted 6 lines
 net/sunrpc/xprtrdma/rpc_rdma.c           |    2 +
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c  |   19 ++++---
 net/sunrpc/xprtrdma/svc_rdma_sendto.c    |   82 ++++++++++++++++++++++--------
 net/sunrpc/xprtrdma/svc_rdma_transport.c |   41 +++++++--------
 net/sunrpc/xprtrdma/verbs.c              |   22 ++++++--
 5 files changed, 111 insertions(+), 55 deletions(-)

Hi Tom,

How do you want to split these patches? The first one looks definitely like a client bug, and the next 2 look like server bugs, but what about the last patch?

Cheers
Trond

#9 lore raw
Quoted 23 lines · Trond Myklebust
Quoted 13 lines · Tom Tucker

The following series fixes a number of bugs in the NFSRDMA transport.

---

Steve Wise (1):
xprtrdma: Do not truncate iova_start values in frmr registrations.

Tom Tucker (3):
rpcrdma: Fix SQ size calculation when memreg is FRMR
svcrdma: Cleanup DMA unmapping in error paths.
svcrdma: Change DMA mapping logic to avoid the page_address kernel API

Quoted 7 lines
 net/sunrpc/xprtrdma/rpc_rdma.c           |    2 +
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c  |   19 ++++---
 net/sunrpc/xprtrdma/svc_rdma_sendto.c    |   82 ++++++++++++++++++++++--------
 net/sunrpc/xprtrdma/svc_rdma_transport.c |   41 +++++++--------
 net/sunrpc/xprtrdma/verbs.c              |   22 ++++++--
 5 files changed, 111 insertions(+), 55 deletions(-)
Quoted 7 lines

Hi Tom,

How do you want to split these patches? The first one looks definitely like a client bug, and the next 2 look like server bugs, but what about the last patch?

Yes, I wrestled with that, but decided to post them as a collection since it's the 'same transport' for review. But obviously, the client ones will go to your tree and the server ones to Bruce's tree. I'll split and repost the final after the review.

Will that work?

Tom

Quoted 3 lines

Cheers
Trond

#10 lore raw
In reply to Trond Myklebust

Hi Trond,

Sorry my last note avoided answering the actual question.

Quoted 10 lines · Trond Myklebust
Quoted 8 lines · Tom Tucker

The following series fixes a number of bugs in the NFSRDMA transport.

---

Steve Wise (1):
xprtrdma: Do not truncate iova_start values in frmr registrations.

client bug.

Quoted 3 lines
Quoted 3 lines

Tom Tucker (3):
rpcrdma: Fix SQ size calculation when memreg is FRMR

client bug.

Quoted 4 lines
Quoted 4 lines

svcrdma: Cleanup DMA unmapping in error paths.
svcrdma: Change DMA mapping logic to avoid the page_address kernel API

server bugs.

Quoted 21 lines
Quoted 7 lines
 net/sunrpc/xprtrdma/rpc_rdma.c           |    2 +
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c  |   19 ++++---
 net/sunrpc/xprtrdma/svc_rdma_sendto.c    |   82 ++++++++++++++++++++++--------
 net/sunrpc/xprtrdma/svc_rdma_transport.c |   41 +++++++--------
 net/sunrpc/xprtrdma/verbs.c              |   22 ++++++--
 5 files changed, 111 insertions(+), 55 deletions(-)

Hi Tom,

How do you want to split these patches? The first one looks definitely like a client bug, and the next 2 look like server bugs, but what about the last patch?

Cheers
Trond
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html