Re: [PATCH 3/3] IB/mlx4: Report checksum offload cap when query device

2015-09-21 Thread Or Gerlitz
On Tue, Sep 22, 2015 at 12:59 AM, Doug Ledford wrote: > Here's the only matrix of IP checksumming that makes sense: > > 1) UD over IB (because it is one of the supported IPoIB types) > 2) RC over IB (same as above) > 3) Raw ETH over Eth (because IP over Eth makes sense and is a common > type of p

Re: [PATCH v1 00/24] New fast registration API

2015-09-21 Thread santosh.shilim...@oracle.com
Hi Sagi, On 9/20/15 2:36 AM, Sagi Grimberg wrote: Hi Santosh, Nice to see this consolidaton happening. I too don't have access to iWARP hardware for RDS test but will use this series and convert our WIP IB fastreg code and see how it goes. I'm very pleased to hear about this WIP. Please feel

Re: [PATCH v1 05/18] xprtrdma: Replace send and receive arrays

2015-09-21 Thread Chuck Lever
> On Sep 20, 2015, at 3:52 AM, Sagi Grimberg wrote: > > On 9/17/2015 11:44 PM, Chuck Lever wrote: >> The rb_send_bufs and rb_recv_bufs arrays are used to implement a >> pair of stacks for keeping track of free rpcrdma_req and rpcrdma_rep >> structs. Replace those arrays with free lists. >> >> T

Re: [PATCH v1 08/18] xprtrdma: Pre-allocate Work Requests for backchannel

2015-09-21 Thread Chuck Lever
> On Sep 21, 2015, at 3:33 AM, Devesh Sharma > wrote: > > On Fri, Sep 18, 2015 at 2:15 AM, Chuck Lever wrote: >> Pre-allocate extra send and receive Work Requests needed to handle >> backchannel receives and sends. >> >> The transport doesn't know how many extra WRs to pre-allocate until >> t

Re: [PATCH v1 15/18] svcrdma: Add svc_rdma_get_context() API that is allowed to fail

2015-09-21 Thread Chuck Lever
> On Sep 20, 2015, at 5:40 AM, Sagi Grimberg wrote: > > On 9/17/2015 11:46 PM, Chuck Lever wrote: >> To support backward direction calls, I'm going to add an >> svc_rdma_get_context() call in the client RDMA transport. >> >> Called from ->buf_alloc(), we can't sleep waiting for memory. >> So ad

Re: [patch] IB/hfi1: checking for NULL instead of IS_ERR

2015-09-21 Thread Greg Kroah-Hartman
On Mon, Sep 21, 2015 at 01:03:52PM -0400, Doug Ledford wrote: > On 09/21/2015 12:48 PM, Greg Kroah-Hartman wrote: > > > But, that's already not happening, as is obvious by my inbox. > > Yeah, I see that. > > > So, how about you forward on what you have so far to me, and I'll keep > > these. Oth

Re: [PATCH 3/3] IB/mlx4: Report checksum offload cap when query device

2015-09-21 Thread Doug Ledford
On 09/21/2015 05:41 PM, Or Gerlitz wrote: > On Fri, Sep 18, 2015 at 5:46 AM, Doug Ledford wrote: >> On 09/16/2015 11:56 AM, Bodong Wang wrote: >>> Signed-off-by: Bodong Wang >>> --- >>> drivers/infiniband/hw/mlx4/main.c | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/drivers/in

Re: [PATCH 3/3] IB/mlx4: Report checksum offload cap when query device

2015-09-21 Thread Or Gerlitz
On Fri, Sep 18, 2015 at 5:46 AM, Doug Ledford wrote: > On 09/16/2015 11:56 AM, Bodong Wang wrote: >> Signed-off-by: Bodong Wang >> --- >> drivers/infiniband/hw/mlx4/main.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/infiniband/hw/mlx4/main.c >> b/drivers/infiniband/hw

merge struct ib_device_attr into struct ib_device

2015-09-21 Thread Christoph Hellwig
This patch gets rid of struct ib_device_attr and cleans up drivers nicely. It goes on top of my send_wr cleanups and the memory registration udpates from Sagi. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More major

Re: [PATCH rdma-rc v1 0/4] Remove mlx5 support for IB_DEVICE_LOCAL_DMA_LKEY

2015-09-21 Thread Sagi Grimberg
On 9/21/2015 11:03 PM, Or Gerlitz wrote: On Mon, Sep 21, 2015 at 11:03 PM, Or Gerlitz wrote: On Mon, Sep 21, 2015 at 7:41 PM, Sagi Grimberg wrote: Changes from v0: - Replace xprtrdma patch to Chuck's one - Fixed typo in iser modparam description The change log of patch #3 needs isn't phrase

Re: [PATCH rdma-rc v1 1/4] xprtrdma: Replace global lkey with lkey local to PD

2015-09-21 Thread Sagi Grimberg
On 9/21/2015 8:03 PM, Chuck Lever wrote: On Sep 21, 2015, at 9:41 AM, Sagi Grimberg wrote: From: Chuck Lever The core API has changed so that devices that do not have a global DMA lkey automatically create an mr, per-PD, and make that lkey available. The global DMA lkey interface is going a

Re: [PATCH rdma-rc v1 0/4] Remove mlx5 support for IB_DEVICE_LOCAL_DMA_LKEY

2015-09-21 Thread Or Gerlitz
On Mon, Sep 21, 2015 at 11:03 PM, Or Gerlitz wrote: > On Mon, Sep 21, 2015 at 7:41 PM, Sagi Grimberg wrote: >> Changes from v0: >> - Replace xprtrdma patch to Chuck's one >> - Fixed typo in iser modparam description > > The change log of patch #3 needs isn't phrased clearly, this is quick > feedb

Re: [PATCH rdma-rc v1 0/4] Remove mlx5 support for IB_DEVICE_LOCAL_DMA_LKEY

2015-09-21 Thread Or Gerlitz
On Mon, Sep 21, 2015 at 7:41 PM, Sagi Grimberg wrote: > Changes from v0: > - Replace xprtrdma patch to Chuck's one > - Fixed typo in iser modparam description The change log of patch #3 needs isn't phrased clearly, this is quick feedback I provided you for V0 and you didn't apply here, please do.

[PATCH 3/3] xprtrdma: don't log warnings for flushed completions

2015-09-21 Thread Steve Wise
Unsignaled send WRs can get flushed as part of normal unmount, so don't log them as warnings. Signed-off-by: Steve Wise --- net/sunrpc/xprtrdma/frwr_ops.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops

[PATCH 1/3] xprtrdma: disconnect and flush cqs before freeing buffers

2015-09-21 Thread Steve Wise
Otherwise a FRMR completion can cause a touch-after-free crash. In xprt_rdma_destroy(), call rpcrdma_buffer_destroy() only after calling rpcrdma_ep_destroy(). In rpcrdma_ep_destroy(), disconnect the cm_id first which should flush the qp, then drain the cqs, then destroy the qp, and finally destro

[PATCH 2/3] svcrdma: handle rdma read with a non-zero initial page offset

2015-09-21 Thread Steve Wise
The server rdma_read_chunk_lcl() and rdma_read_chunk_frmr() functions were not taking into account the initial page_offset when determining the rdma read length. This resulted in a read who's starting address and length exceeded the base/bounds of the frmr. Most work loads don't tickle this bug a

Re: [PATCH rdma-rc v1 1/4] xprtrdma: Replace global lkey with lkey local to PD

2015-09-21 Thread Chuck Lever
> On Sep 21, 2015, at 9:41 AM, Sagi Grimberg wrote: > > From: Chuck Lever > > The core API has changed so that devices that do not have a global > DMA lkey automatically create an mr, per-PD, and make that lkey > available. The global DMA lkey interface is going away in favor of > the per-PD D

Re: [patch] IB/hfi1: checking for NULL instead of IS_ERR

2015-09-21 Thread Doug Ledford
On 09/21/2015 12:48 PM, Greg Kroah-Hartman wrote: > But, that's already not happening, as is obvious by my inbox. Yeah, I see that. > So, how about you forward on what you have so far to me, and I'll keep > these. Otherwise you will end up with nasty merge issues very quickly > as people will c

Re: [patch] IB/hfi1: checking for NULL instead of IS_ERR

2015-09-21 Thread Greg Kroah-Hartman
On Mon, Sep 21, 2015 at 11:42:28AM -0400, Doug Ledford wrote: > On 09/18/2015 11:01 PM, Greg Kroah-Hartman wrote: > > On Fri, Sep 18, 2015 at 11:51:09AM -0400, Doug Ledford wrote: > >> On 09/16/2015 02:22 AM, Dan Carpenter wrote: > >>> __get_txreq() returns an ERR_PTR() but this checks for NULL so

Re: [PATCH rdma-rc 2/4] IB/iser: Add module parameter for always register memory

2015-09-21 Thread Sagi Grimberg
On 9/21/2015 7:39 PM, Jason Gunthorpe wrote: On Sun, Sep 20, 2015 at 12:52:45PM +0300, Sagi Grimberg wrote: This module parameter forces memory registration even for a continuous memory region. It is true by default as sending an all-physical rkey with remote permissions might be insecure. Sign

[PATCH rdma-rc v1 2/4] IB/iser: Add module parameter for always register memory

2015-09-21 Thread Sagi Grimberg
This module parameter forces memory registration even for a continuous memory region. It is true by default as sending an all-physical rkey with remote permissions might be insecure. Signed-off-by: Sagi Grimberg --- drivers/infiniband/ulp/iser/iscsi_iser.c | 5 + drivers/infiniband/ulp/ise

[PATCH rdma-rc v1 1/4] xprtrdma: Replace global lkey with lkey local to PD

2015-09-21 Thread Sagi Grimberg
From: Chuck Lever The core API has changed so that devices that do not have a global DMA lkey automatically create an mr, per-PD, and make that lkey available. The global DMA lkey interface is going away in favor of the per-PD DMA lkey. The per-PD DMA lkey is always available. Convert xprtrdma t

[PATCH rdma-rc v1 0/4] Remove mlx5 support for IB_DEVICE_LOCAL_DMA_LKEY

2015-09-21 Thread Sagi Grimberg
The Connect-IB device has a specific issue with memory registration using the reserved lkey (device global_dma_lkey). This caused user-space memory registration which usually uses cached pre-registered memory keys to fail due to a device access error during registration. kernel-space memory registr

[PATCH rdma-rc v1 4/4] IB/mlx5: Remove pa_lkey usages

2015-09-21 Thread Sagi Grimberg
Since mlx5 driver cannot rely on registration using the reserved lkey (global_dma_lkey) it used to allocate a private physical address lkey for each allocated pd. Commit 96249d70dd70 ("IB/core: Guarantee that a local_dma_lkey is available") just does it in the core layer so we can go ahead and use

[PATCH rdma-rc v1 3/4] IB/mlx5: Remove support for IB_DEVICE_LOCAL_DMA_LKEY

2015-09-21 Thread Sagi Grimberg
ConnectIB has some known issues with memory registration using the local_dma_lkey (SEND, RDMA, RECV seems to work ok). Thus don't expose support for it (and remove device->local_dma_lkey setting). since commit 96249d70dd70 ("IB/core: Guarantee that a local_dma_lkey is available") addressed that by

Re: [PATCH rdma-rc 0/4] Remove mlx5 support for IB_DEVICE_LOCAL_DMA_LKEY

2015-09-21 Thread Jason Gunthorpe
On Sun, Sep 20, 2015 at 12:52:43PM +0300, Sagi Grimberg wrote: > The Connect-IB device has a specific issue with memory registration using > the reserved lkey (device global_dma_lkey). This caused user-space memory > registration which usually uses cached pre-registered memory keys to fail > due to

Re: [PATCH rdma-rc 2/4] IB/iser: Add module parameter for always register memory

2015-09-21 Thread Jason Gunthorpe
On Sun, Sep 20, 2015 at 12:52:45PM +0300, Sagi Grimberg wrote: > This module parameter forces memory registration even for > a continuous memory region. It is true by default as sending > an all-physical rkey with remote permissions might be insecure. > > Signed-off-by: Sagi Grimberg > drivers/i

Re: [PATCH 00/15] RDS: connection scalability and performance improvements

2015-09-21 Thread santosh shilimkar
On 9/20/2015 1:37 AM, Sagi Grimberg wrote: On 9/20/2015 2:04 AM, Santosh Shilimkar wrote: This series addresses RDS connection bottlenecks on massive workloads and improve the RDMA performance almost by 3X. RDS TCP also gets a small gain of about 12%. RDS is being used in massive systems with h

Re: [PATCH v1 03/18] xprtrdma: Remove completion polling budgets

2015-09-21 Thread Chuck Lever
> On Sep 21, 2015, at 1:51 AM, Devesh Sharma > wrote: > > On Sun, Sep 20, 2015 at 4:05 PM, Sagi Grimberg > wrote: It is possible that in a given poll_cq call you end up getting on 1 completion, the other completion is delayed due to some reason. >>> >>> >>> If a CQE is allowe

Re: [patch] IB/hfi1: checking for NULL instead of IS_ERR

2015-09-21 Thread Doug Ledford
On 09/18/2015 11:01 PM, Greg Kroah-Hartman wrote: > On Fri, Sep 18, 2015 at 11:51:09AM -0400, Doug Ledford wrote: >> On 09/16/2015 02:22 AM, Dan Carpenter wrote: >>> __get_txreq() returns an ERR_PTR() but this checks for NULL so it would >>> oops on failure. >>> >>> Signed-off-by: Dan Carpenter >>

[PATCH] staging: rdma: add a blank line after function

2015-09-21 Thread Geliang Tang
Fixed warnings found by checkpatch.pl: Please use a blank line after function/struct/union/enum declarations FILE: drivers/staging/rdma/amso1100/c2_mq.c:158: FILE: drivers/staging/rdma/hfi1/file_ops.c:2069: FILE: drivers/staging/rdma/hfi1/sdma.c:744: FILE: drivers/staging/rdma/hfi1/verbs.c

[PATCH] IB/hfi1: class_name_user() should be static

2015-09-21 Thread Geliang Tang
Fixes the following sparse warning: drivers/staging/rdma/hfi1/device.c:127:12: warning: symbol 'class_name_user' was not declared. Should it be static? Signed-off-by: Geliang Tang --- drivers/staging/rdma/hfi1/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

RE: [PATCH] staging/rdma/hfi1: do not use u8 to store a 32-bit integer

2015-09-21 Thread Marciniszyn, Mike
> Subject: [PATCH] staging/rdma/hfi1: do not use u8 to store a 32-bit integer > Thanks for the patch! Acked-by: Mike Marciniszyn -- 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.ker

RE: [PATCH] IB/hfi1: class_name_user() should be static

2015-09-21 Thread Marciniszyn, Mike
> Subject: [PATCH] IB/hfi1: class_name_user() should be static > > Fixes the following sparse warning: > drivers/staging/rdma/hfi1/device.c:127:12: > warning: symbol 'class_name_user' was not declared. Should it be static? > > Signed-off-by: Geliang Tang > --- Thanks for the patch! Acked-b

Re: [PATCH v1 for-next 0/7] Add support for multicast loopback prevention to mlx4

2015-09-21 Thread eran ben elisha
On Thu, Aug 20, 2015 at 5:34 PM, Eran Ben Elisha wrote: > Hi Doug, > > This patch-set adds a new implementation for multicast loopback prevention > for > mlx4 driver. The current implementation is very limited, especially if link > layer is Ethernet. The new implementation is based on HW featur

[PATCH 04/38] IB/ehca: fix handling idr_alloc result

2015-09-21 Thread Andrzej Hajda
The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda --- drivers/staging/rdma/ehca/ehca_cq.c | 13

Re: [PATCH 00/38] Fixes related to incorrect usage of unsigned types

2015-09-21 Thread David Howells
Andrzej Hajda wrote: > Semantic patch finds comparisons of types: > unsigned < 0 > unsigned >= 0 > The former is always false, the latter is always true. > Such comparisons are useless, so theoretically they could be > safely removed, but their presence quite often indicates bugs. Or som

RE: [PATCH] IB/hfi1: use kvfree() in sdma.c

2015-09-21 Thread Marciniszyn, Mike
> Subject: [PATCH] IB/hfi1: use kvfree() in sdma.c > > Use kvfree() instead of open-coding it. > > Signed-off-by: Geliang Tang > --- > drivers/staging/rdma/hfi1/sdma.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) Thanks for the patch. Acked-by: Mike Marciniszyn -- To unsubscri

[PATCH] IB/cma: Potential NULL dereference in cma_id_from_event

2015-09-21 Thread Haggai Eran
If the lookup of a listening ID failed for an AF_IB request, the code would try to call dev_put() on a NULL net_dev. Fixes: be688195bd08 ("IB/cma: Fix net_dev reference leak with failed requests") Reported-by: Dan Carpenter Signed-off-by: Haggai Eran --- drivers/infiniband/core/cma.c | 2 +- 1

[PATCH] IB/hfi1: use kvfree() in sdma.c

2015-09-21 Thread Geliang Tang
Use kvfree() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/staging/rdma/hfi1/sdma.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rdma/hfi1/sdma.c b/drivers/staging/rdma/hfi1/sdma.c index aecd1a7..9c02a3d 100644 --- a/drivers/staging

Re: [PATCH v1 08/18] xprtrdma: Pre-allocate Work Requests for backchannel

2015-09-21 Thread Devesh Sharma
On Fri, Sep 18, 2015 at 2:15 AM, Chuck Lever wrote: > Pre-allocate extra send and receive Work Requests needed to handle > backchannel receives and sends. > > The transport doesn't know how many extra WRs to pre-allocate until > the xprt_setup_backchannel() call, but that's long after the WRs are

Re: [PATCH v1 07/18] xprtrdma: Pre-allocate backward rpc_rqst and send/receive buffers

2015-09-21 Thread Devesh Sharma
Looks good. On Fri, Sep 18, 2015 at 2:15 AM, Chuck Lever wrote: > xprtrdma's backward direction send and receive buffers are the same > size as the forechannel's inline threshold, and must be pre- > registered. > > The consumer has no control over which receive buffer the adapter > chooses to cat

Re: [PATCH v1 04/18] xprtrdma: Refactor reply handler error handling

2015-09-21 Thread Devesh Sharma
Looks good. On Fri, Sep 18, 2015 at 2:14 AM, Chuck Lever wrote: > Clean up: The error cases in rpcrdma_reply_handler() almost never > execute. Ensure the compiler places them out of the hot path. > > No behavior change expected. > > Signed-off-by: Chuck Lever > --- > net/sunrpc/xprtrdma/rpc_rdm

Re: [PATCH v1 02/18] xprtrdma: Replace global lkey with lkey local to PD

2015-09-21 Thread Devesh Sharma
Looks good, will test this ocrdma and update you. On Fri, Sep 18, 2015 at 2:14 AM, Chuck Lever wrote: > The core API has changed so that devices that do not have a global > DMA lkey automatically create an mr, per-PD, and make that lkey > available. The global DMA lkey interface is going away in

Re: [PATCH v1 01/18] xprtrdma: Enable swap-on-NFS/RDMA

2015-09-21 Thread Devesh Sharma
Looks Good. On Fri, Sep 18, 2015 at 2:14 AM, Chuck Lever wrote: > After adding a swapfile on an NFS/RDMA mount and removing the > normal swap partition, I was able to push the NFS client well > into swap without any issue. > > I forgot to swapoff the NFS file before rebooting. This pinned > the N

Re: [PATCH v1 03/18] xprtrdma: Remove completion polling budgets

2015-09-21 Thread Devesh Sharma
On Sun, Sep 20, 2015 at 4:05 PM, Sagi Grimberg wrote: >>> It is possible that in a given poll_cq >>> call you end up getting on 1 completion, the other completion is >>> delayed due to some reason. >> >> >> If a CQE is allowed to be delayed, how does polling >> again guarantee that the consumer ca

Re: [PATCH v1 03/18] xprtrdma: Remove completion polling budgets

2015-09-21 Thread Devesh Sharma
On Fri, Sep 18, 2015 at 7:49 PM, Chuck Lever wrote: > Hi Devesh- > > > On Sep 18, 2015, at 2:52 AM, Devesh Sharma > wrote: > >> On Fri, Sep 18, 2015 at 2:14 AM, Chuck Lever wrote: >>> >>> Commit 8301a2c047cc ("xprtrdma: Limit work done by completion >>> handler") was supposed to prevent xprtrdm