RE: [PATCH] svcrdma: send_write() must not overflow the device's max sge

2014-07-15 Thread Devesh Sharma
Reported-By: Devesh Sharma Acked-By: Devesh Sharma > -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Steve Wise > Sent: Thursday, July 10, 2014 12:19 AM > To: bfie...@fieldses.org > Cc: linux-rdma@vger.kernel.org; linu

linux-next: manual merge of the infiniband tree with the net-next tree

2014-07-15 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the infiniband tree got a conflict in drivers/infiniband/hw/cxgb4/device.c between commit 7730b4c7e32c ("cxgb4/iw_cxgb4: work request logging feature") from the net-next tree and commit 6b54d54dea82 ("RDMA/cxgb4: Initialize the device status page") from the infi

[PATCH net-next 0/4] cxgb4i: Add ipv6 support

2014-07-15 Thread Anish Bhatt
Hi, The following patchset add ipv6 support for the cxgb4i(iscsi) driver. Patch 1 moves a define from the iw_cxgb4 to cxgb4 to prevent code duplication, as it is used by cxgb4i and iw_cxgb4 both. Patch 2 exports symbols needed by cxgb4i for ipv6 support from cxgb4. Patch 3 & 4 deal with actual

[PATCH net-next 4/4] cxgb4i: Add ipv6 code to driver, call into libcxgbi ipv6 api

2014-07-15 Thread Anish Bhatt
Signed-off-by: Anish Bhatt Signed-off-by: Karen Xie Signed-off-by: Manoj Malviya --- drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 353 + 1 file changed, 314 insertions(+), 39 deletions(-) diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/c

[PATCH net-next 2/4] cxgb4: Export symbols required by cxgb4i for ipv6 support and required defines

2014-07-15 Thread Anish Bhatt
Signed-off-by: Anish Bhatt --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 10 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 4 drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/

[PATCH net-next 1/4] cxgb4/iw_cxgb4: Move common defines to cxgb4

2014-07-15 Thread Anish Bhatt
This define is used by cxgb4i and iw_cxgb4, moving to avoid code duplication Signed-off-by: Anish Bhatt Acked-by: Steve Wise --- drivers/infiniband/hw/cxgb4/t4fw_ri_api.h | 1 - drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/dri

[PATCH net-next 3/4] libcxgbi: Add ipv6 api to driver

2014-07-15 Thread Anish Bhatt
Signed-off-by: Anish Bhatt Signed-off-by: Karen Xie Signed-off-by: Manoj Malviya --- drivers/scsi/cxgbi/libcxgbi.c | 237 ++ drivers/scsi/cxgbi/libcxgbi.h | 37 ++- 2 files changed, 253 insertions(+), 21 deletions(-) diff --git a/drivers/scsi/cxgbi/

Re: [PATCHv2 net-next 0/4] Misc. fixes for iw_cxgb4

2014-07-15 Thread David Miller
From: Hariprasad Shenai Date: Mon, 14 Jul 2014 21:34:50 +0530 > This patch series adds support to determine ingress padding boundary at > runtime. > Advertise a larger max read queue depth for qps, and gather the resource > limits > from fw and use them to avoid exhausting all the resources and

Re: [PATCH v2 0/2] NFS/RDMA server patches for 3.17

2014-07-15 Thread Steve Wise
On 7/15/2014 12:54 PM, Chuck Lever wrote: Hi Steve- Can you include these 3.17 candidate patches in your testing branch? v2: - Second patch replaced with a lower-level fix Done. The for-test branch of git://git.linux-nfs.org/projects/swise/linux.git is now based on 3.16-rc5 plus: Chuck

[PATCH v2 0/2] NFS/RDMA server patches for 3.17

2014-07-15 Thread Chuck Lever
Hi Steve- Can you include these 3.17 candidate patches in your testing branch? v2: - Second patch replaced with a lower-level fix --- Chuck Lever (2): svcrdma: Add zero padding if the client doesn't send it svcrdma: Increase credit limit to 32 include/linux/sunrpc/svc_rdma.h

[PATCH v2 1/2] svcrdma: Increase credit limit to 32

2014-07-15 Thread Chuck Lever
Signed-off-by: Chuck Lever --- include/linux/sunrpc/svc_rdma.h |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index 5cf99a0..975da75 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunr

[PATCH v2 2/2] svcrdma: Add zero padding if the client doesn't send it

2014-07-15 Thread Chuck Lever
See RFC 5666 section 3.7: clients don't have to send zero XDR padding. BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=246 Signed-off-by: Chuck Lever --- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff

[PATCH v3 09/21] xprtrdma: Chain together all MWs in same buffer pool

2014-07-15 Thread Chuck Lever
During connection loss recovery, need to visit every MW in a buffer pool. Any MW that is in use by an RPC will not be on the rb_mws list. Signed-off-by: Chuck Lever Tested-by: Steve Wise --- net/sunrpc/xprtrdma/verbs.c |4 net/sunrpc/xprtrdma/xprt_rdma.h |4 +++- 2 files change

[PATCH v3 01/21] xprtrdma: Fix panic in rpcrdma_register_frmr_external()

2014-07-15 Thread Chuck Lever
seg1->mr_nsegs is not yet initialized when it is used to unmap segments during an error exit. Use the same unmapping logic for all error exits. "if (frmr_wr.wr.fast_reg.length < len) {" used to be a BUG_ON check. The broken code will never be executed under normal operation. Fixes: c977dea (xprtr

[PATCH v3 03/21] xprtrdma: Limit data payload size for ALLPHYSICAL

2014-07-15 Thread Chuck Lever
When the client uses physical memory registration, each page in the payload gets its own array entry in the RPC/RDMA header's chunk list. Therefore, don't advertise a maximum payload size that would require more array entries than can fit in the RPC buffer where RPC/RDMA headers are built. BugLin

[PATCH v3 00/21] NFS/RDMA client patches for 3.17

2014-07-15 Thread Chuck Lever
The main purpose of this series is to address connection drop recovery issues by fixing FRMR re-use to make it less likely the client will deadlock due to a memory management operation error. Some clean-ups and other fixes are present as well. See topic branch nfs-rdma-for-3.17 in git://git.linu

[PATCH v3 16/21] xprtrdma: Rename frmr_wr

2014-07-15 Thread Chuck Lever
Clean up: Name frmr_wr after the opcode of the Work Request, consistent with the send and local invalidation paths. Signed-off-by: Chuck Lever Tested-by: Steve Wise --- net/sunrpc/xprtrdma/verbs.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a

[PATCH v3 20/21] xprtrdma: Remove RPCRDMA_PERSISTENT_REGISTRATION macro

2014-07-15 Thread Chuck Lever
Clean up. RPCRDMA_PERSISTENT_REGISTRATION was a compile-time switch between RPCRDMA_REGISTER mode and RPCRDMA_ALLPHYSICAL mode. Since RPCRDMA_REGISTER has been removed, there's no need for the extra conditional compilation. Signed-off-by: Chuck Lever Tested-by: Steve Wise --- include/linux/su

[PATCH v3 18/21] xprtrdma: Schedule reply tasklet once per upcall

2014-07-15 Thread Chuck Lever
Minor optimization: grab rpcrdma_tk_lock_g and disable hard IRQs just once after clearing the receive completion queue. Signed-off-by: Chuck Lever Tested-by: Steve Wise --- net/sunrpc/xprtrdma/verbs.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) dif

[PATCH v3 17/21] xprtrdma: Allocate each struct rpcrdma_mw separately

2014-07-15 Thread Chuck Lever
Currently rpcrdma_buffer_create() allocates struct rpcrdma_mw's as a single contiguous area of memory. It amounts to quite a bit of memory, and there's no requirement for these to be carved from a single piece of contiguous memory. Signed-off-by: Chuck Lever Tested-by: Steve Wise --- net/sunrpc

[PATCH v3 21/21] xprtrdma: Handle additional connection events

2014-07-15 Thread Chuck Lever
Commit 38ca83a5 added RDMA_CM_EVENT_TIMEWAIT_EXIT. But that status is relevant only for consumers that re-use their QPs on new connections. xprtrdma creates a fresh QP on reconnection, so that event should be explicitly ignored. Squelch the alarming "unexpected CM event" message. Signed-off-by: C

[PATCH v3 15/21] xprtrdma: Disable completions for LOCAL_INV Work Requests

2014-07-15 Thread Chuck Lever
Instead of relying on a completion to change the state of an FRMR to FRMR_IS_INVALID, set it in advance. If an error occurs, a completion will fire anyway and mark the FRMR FRMR_IS_STALE. Signed-off-by: Chuck Lever Tested-by: Steve Wise --- net/sunrpc/xprtrdma/verbs.c | 17 -

[PATCH v3 14/21] xprtrdma: Disable completions for FAST_REG_MR Work Requests

2014-07-15 Thread Chuck Lever
Instead of relying on a completion to change the state of an FRMR to FRMR_IS_VALID, set it in advance. If an error occurs, a completion will fire anyway and mark the FRMR FRMR_IS_STALE. Signed-off-by: Chuck Lever Tested-by: Steve Wise --- net/sunrpc/xprtrdma/verbs.c |9 - 1 file cha

[PATCH v3 12/21] xprtrdma: Reset FRMRs after a flushed LOCAL_INV Work Request

2014-07-15 Thread Chuck Lever
When a LOCAL_INV Work Request is flushed, it leaves an FRMR in the VALID state. This FRMR can be returned by rpcrdma_buffer_get(), and must be knocked down in rpcrdma_register_frmr_external() before it can be re-used. Instead, capture these in rpcrdma_buffer_get(), and reset them. Signed-off-by:

[PATCH v3 13/21] xprtrdma: Don't post a LOCAL_INV in rpcrdma_register_frmr_external()

2014-07-15 Thread Chuck Lever
Any FRMR arriving in rpcrdma_register_frmr_external() is now guaranteed to be either invalid, or to be targeted by a queued LOCAL_INV that will invalidate it before the adapter processes the FAST_REG_MR being built here. The problem with current arrangement of chaining a LOCAL_INV to the FAST_REG_

[PATCH v3 19/21] xprtrdma: Make rpcrdma_ep_disconnect() return void

2014-07-15 Thread Chuck Lever
Clean up: The return code is used only for dprintk's that are already redundant. Signed-off-by: Chuck Lever Tested-by: Steve Wise --- net/sunrpc/xprtrdma/transport.c |2 +- net/sunrpc/xprtrdma/verbs.c | 14 -- net/sunrpc/xprtrdma/xprt_rdma.h |2 +- 3 files changed, 6 i

[PATCH v3 08/21] xprtrdma: Back off rkey when FAST_REG_MR fails

2014-07-15 Thread Chuck Lever
If posting a FAST_REG_MR Work Reqeust fails, revert the rkey update to avoid subsequent IB_WC_MW_BIND_ERR completions. Suggested-by: Steve Wise Signed-off-by: Chuck Lever --- include/rdma/ib_verbs.h | 11 +++ net/sunrpc/xprtrdma/verbs.c | 12 +--- 2 files changed, 16 ins

[PATCH v3 11/21] xprtrdma: Reset FRMRs when FAST_REG_MR is flushed by a disconnect

2014-07-15 Thread Chuck Lever
FAST_REG_MR Work Requests update a Memory Region's rkey. Rkey's are used to block unwanted access to the memory controlled by an MR. The rkey is passed to the receiver (the NFS server, in our case), and is also used by xprtrdma to invalidate the MR when the RPC is complete. When a FAST_REG_MR Work

[PATCH v3 10/21] xprtrdma: Properly handle exhaustion of the rb_mws list

2014-07-15 Thread Chuck Lever
If the rb_mws list is exhausted, clean up and return NULL so that call_allocate() will delay and try again. Signed-off-by: Chuck Lever Tested-by: Steve Wise --- net/sunrpc/xprtrdma/verbs.c | 103 ++- 1 file changed, 71 insertions(+), 32 deletions(-) dif

[PATCH v3 05/21] xprtrdma: On disconnect, don't ignore pending CQEs

2014-07-15 Thread Chuck Lever
xprtrdma is currently throwing away queued completions during a reconnect. RPC replies posted just before connection loss, or successful completions that change the state of an FRMR, can be missed. Signed-off-by: Chuck Lever Tested-by: Steve Wise --- net/sunrpc/xprtrdma/verbs.c | 14 +

[PATCH v3 06/21] xprtrdma: Don't invalidate FRMRs if registration fails

2014-07-15 Thread Chuck Lever
If FRMR registration fails, it's likely to transition the QP to the error state. Or, registration may have failed because the QP is _already_ in ERROR. Thus calling rpcrdma_deregister_external() in rpcrdma_create_chunks() is useless in FRMR mode: the LOCAL_INVs just get flushed. It is safe to lea

[PATCH v3 04/21] xprtrdma: Update rkeys after transport reconnect

2014-07-15 Thread Chuck Lever
Various reports of: rpcrdma_qp_async_error_upcall: QP error 3 on device mlx4_0 ep 8800bfd3e848 Ensure that rkeys in already-marshalled RPC/RDMA headers are refreshed after the QP has been replaced by a reconnect. BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=249 S

[PATCH v3 07/21] xprtrdma: Unclutter struct rpcrdma_mr_seg

2014-07-15 Thread Chuck Lever
Clean ups: - make it obvious that the rl_mw field is a pointer -- allocated separately, not as part of struct rpcrdma_mr_seg - promote "struct {} frmr;" to a named type - promote the state enum to a named type - name the MW state field the same way other fields in rpcrdma_mw are named Si

[PATCH v3 02/21] xprtrdma: Protect ia->ri_id when unmapping/invalidating MRs

2014-07-15 Thread Chuck Lever
Ensure ia->ri_id remains valid while invoking dma_unmap_page() or posting LOCAL_INV during a transport reconnect. Otherwise, ia->ri_id->device or ia->ri_id->qp is NULL, which triggers a panic. BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=259 Fixes: ec62f40 'xprtrdma: Ensure ia->ri_id->q

Re: [PATCH for 3.16] IB/mlx5: Enable block multicast loopback for kernel consumers too

2014-07-15 Thread Or Gerlitz
On 25/06/2014 16:44, Or Gerlitz wrote: Under commit f360d88 we advertize blocking multicast loopback to both kernel and user-space consumers, but disallow the kernel ones (e.g IPoIB) to use it with their UD QPs, fix that. Fixes: f360d88 ('IB/mlx5: Add block multicast loopback support') Reported-