Re: Seeing WARN_ON in ib_dealloc_pd from ipoib in kernel 4.3-rc1-debug

2015-10-12 Thread Sagi Grimberg
The following fixup patch is needed: Subject: ipoib: For sendonly join free the multicast group on leave When we leave the multicast group on expiration of a neighbor we do not free the mcast structure. This results in a memory leak. Signed-off-by: Christoph Lameter

Possible circular locking when unloading device driver

2015-10-12 Thread Sagi Grimberg
Hey, I stepped on this lockdep circular locking complaint on 4.3-rc when unloading the device driver (mlx5 in my case). Has anyone seen this? I have seen such warnings with kernfs_mutex when deleting iscsi devices on the fly. I wander if kernfs_remove() should use mutex_lock_nested? output:

[PATCH] IB: merge struct ib_device_attr into struct ib_device

2015-10-12 Thread Christoph Hellwig
Avoid the need to query for device attributes and store them in a separate structure by merging struct ib_device_attr into struct ib_device. This matches how the device structures are used in most Linux subsystems. Signed-off-by: Christoph Hellwig --- drivers/infiniband/core/cm.c

merge struct ib_device_attr into struct ib_device V2

2015-10-12 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. Changes since V1: - rebased on top of the Sagi's latest reg_api.6 branch -- To unsubscribe from this list: send the line "unsubscribe

Re: merge struct ib_device_attr into struct ib_device V2

2015-10-12 Thread Sagi Grimberg
On 10/12/2015 9:57 AM, Christoph Hellwig wrote: 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. Changes since V1: - rebased on top of the Sagi's latest reg_api.6 branch

[PATCH v4 04/26] IB/mlx4: Support the new memory registration API

2015-10-12 Thread Sagi Grimberg
Support the new memory registration API by allocating a private page list array in mlx4_ib_mr and populate it when mlx4_ib_map_mr_sg is invoked. Also, support IB_WR_REG_MR by setting the exact WQE as IB_WR_FAST_REG_MR, just take the needed information from different places: - page_size, iova,

[PATCH v4 00/26] New fast registration API

2015-10-12 Thread Sagi Grimberg
Hi all, As discussed on the linux-rdma list, there is plenty of room for improvement in our memory registration APIs. We keep finding ULPs that are duplicating code, sometimes use wrong strategies and mis-use our current API. As a first step, this patch set replaces the fast registration API to

RE: [PATCH rdma-RC] IB/cm: Fix sleeping while atomic when creating AH from WC

2015-10-12 Thread Hefty, Sean
> When IP based addressing was introduced, ib_create_ah_from_wc was > changed in order to support a suitable AH. Since this AH should > now contains the DMAC (which isn't a simple derivative of the GID). > In order to find the DMAC, an ARP should sometime be sent. This ARP > is a sleeping context.

[PATCH v4 16/26] IB/srp: Convert to new registration API

2015-10-12 Thread Sagi Grimberg
Instead of constructing a page list, call ib_map_mr_sg and post a new ib_reg_wr. srp_map_finish_fr now returns the number of sg elements registered. Remove srp_finish_mapping since no one is calling it. Signed-off-by: Sagi Grimberg Tested-by: Bart Van Assche

[PATCH v4 02/26] IB/mlx5: Remove dead fmr code

2015-10-12 Thread Sagi Grimberg
Just function declarations - no need for those laying arround. If for some reason someone will want FMR support in mlx5, it should be easy enough to restore a few structs. Signed-off-by: Sagi Grimberg Reviewed-by: Bart Van Assche Acked-by:

[PATCH v4 17/26] IB/srp: Remove srp_finish_mapping

2015-10-12 Thread Sagi Grimberg
No callers left, remove it. Signed-off-by: Sagi Grimberg Tested-by: Bart Van Assche --- drivers/infiniband/ulp/srp/ib_srp.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c

[PATCH v4 03/26] IB/mlx5: Support the new memory registration API

2015-10-12 Thread Sagi Grimberg
Support the new memory registration API by allocating a private page list array in mlx5_ib_mr and populate it when mlx5_ib_map_mr_sg is invoked. Also, support IB_WR_REG_MR by setting the exact WQE as IB_WR_FAST_REG_MR, just take the needed information from different places: - page_size, iova,

[PATCH v4 26/26] IB/core: Remove old fast registration API

2015-10-12 Thread Sagi Grimberg
No callers and no providers left, go ahead and remove it. Signed-off-by: Sagi Grimberg Acked-by: Christoph Hellwig --- drivers/infiniband/core/verbs.c | 25 --- include/rdma/ib_verbs.h | 54 - 2

[PATCH v4 07/26] iw_cxgb4: Support the new memory registration API

2015-10-12 Thread Sagi Grimberg
Support the new memory registration API by allocating a private page list array in c4iw_mr and populate it when c4iw_map_mr_sg is invoked. Also, support IB_WR_REG_MR by duplicating build_fastreg just take the needed information from different places: - page_size, iova, length (ib_mr) - page array

[PATCH v4 14/26] RDS/IW: Convert to new memory registration API

2015-10-12 Thread Sagi Grimberg
Get rid of fast_reg page list and its construction. Instead, just pass the RDS sg list to ib_map_mr_sg and post the new ib_reg_wr. This is done both for server IW RDMA_READ registration and the client remote key registration. Signed-off-by: Sagi Grimberg Acked-by: Christoph

[PATCH v4 18/26] IB/srp: Dont allocate a page vector when using fast_reg

2015-10-12 Thread Sagi Grimberg
The new fast registration API does not reuqire a page vector so we can't avoid allocating it. Signed-off-by: Sagi Grimberg Tested-by: Bart Van Assche --- drivers/infiniband/ulp/srp/ib_srp.c | 20 +++- 1 file changed, 11

[PATCH v4 13/26] svcrdma: Port to new memory registration API

2015-10-12 Thread Sagi Grimberg
Instead of maintaining a fastreg page list, keep an sg table and convert an array of pages to a sg list. Then call ib_map_mr_sg and construct ib_reg_wr. Signed-off-by: Sagi Grimberg Acked-by: Christoph Hellwig Tested-by: Steve Wise

[PATCH v4 22/26] RDMA/cxgb3: Remove old FRWR API

2015-10-12 Thread Sagi Grimberg
No ULP uses it anymore, go ahead and remove it. Signed-off-by: Sagi Grimberg Acked-by: Christoph Hellwig --- drivers/infiniband/hw/cxgb3/iwch_cq.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_provider.c | 24 ---

[PATCH v4 21/26] RDMA/ocrdma: Remove old FRWR API

2015-10-12 Thread Sagi Grimberg
No ULP uses it anymore, go ahead and remove it. Signed-off-by: Sagi Grimberg Acked-by: Christoph Hellwig --- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 - drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 104 +---

[PATCH v4 25/26] RDMA/nes: Remove old FRWR API

2015-10-12 Thread Sagi Grimberg
No ULP uses it anymore, go ahead and remove it. Signed-off-by: Sagi Grimberg Acked-by: Christoph Hellwig --- drivers/infiniband/hw/nes/nes_hw.h| 6 -- drivers/infiniband/hw/nes/nes_verbs.c | 162 +- 2 files changed, 1

[PATCH v4 20/26] IB/mlx4: Remove old FRWR API support

2015-10-12 Thread Sagi Grimberg
No ULP uses it anymore, go ahead and remove it. Signed-off-by: Sagi Grimberg Acked-by: Christoph Hellwig --- drivers/infiniband/hw/mlx4/cq.c | 3 +-- drivers/infiniband/hw/mlx4/main.c| 2 -- drivers/infiniband/hw/mlx4/mlx4_ib.h | 15 ---

[PATCH v4 19/26] IB/mlx5: Remove old FRWR API support

2015-10-12 Thread Sagi Grimberg
No ULP uses it anymore, go ahead and remove it. Keep only the local invalidate part of the handlers. Signed-off-by: Sagi Grimberg Acked-by: Christoph Hellwig --- drivers/infiniband/hw/mlx5/cq.c | 3 -- drivers/infiniband/hw/mlx5/main.c| 2 -

[PATCH v4 10/26] IB/iser: Port to new fast registration API

2015-10-12 Thread Sagi Grimberg
Remove fastreg page list allocation as the page vector is now private to the provider. Instead of constructing the page list and fast_req work request, call ib_map_mr_sg and construct ib_reg_wr. Signed-off-by: Sagi Grimberg Acked-by: Christoph Hellwig ---

[PATCH v4 24/26] IB/qib: Remove old FRWR API

2015-10-12 Thread Sagi Grimberg
No ULP uses it anymore, go ahead and remove it. Signed-off-by: Sagi Grimberg Acked-by: Christoph Hellwig --- drivers/infiniband/hw/qib/qib_keys.c | 56 --- drivers/infiniband/hw/qib/qib_mr.c| 32 +---

[PATCH v4 15/26] IB/srp: Split srp_map_sg

2015-10-12 Thread Sagi Grimberg
This is a preparation patch for the new registration API conversion. It splits srp_map_sg per registration strategy (srp_map_sg[fmr|fr|dma]. On its own it adds some code duplication, but it makes the API switch easier to comprehend. Signed-off-by: Sagi Grimberg Tested-by:

[PATCH v4 05/26] RDMA/ocrdma: Support the new memory registration API

2015-10-12 Thread Sagi Grimberg
Support the new memory registration API by allocating a private page list array in ocrdma_mr and populate it when ocrdma_map_mr_sg is invoked. Also, support IB_WR_REG_MR by duplicating IB_WR_FAST_REG_MR, but take the needed information from different places: - page_size, iova, length, access flags

[PATCH v4 09/26] RDMA/nes: Support the new memory registration API

2015-10-12 Thread Sagi Grimberg
Support the new memory registration API by allocating a private page list array in nes_mr and populate it when nes_map_mr_sg is invoked. Also, support IB_WR_REG_MR by duplicating IB_WR_FAST_REG_MR handling and take the needed information from different places: - page_size, iova, length (ib_mr) -

RE: [PATCH rdma-RC] IB/cm: Fix rb-tree duplicate free and use-after-free

2015-10-12 Thread Hefty, Sean
> ib_send_cm_sidr_rep could sometimes erase the node from the sidr > (depending on errors in the process). Since ib_send_cm_sidr_rep is > called both from cm_sidr_req_handler and cm_destroy_id, cm_id_priv This should clarify that it is the app calling from the callback, and not a direct call

[PATCH v4 01/26] IB/core: Introduce new fast registration API

2015-10-12 Thread Sagi Grimberg
The new fast registration verb ib_map_mr_sg receives a scatterlist and converts it to a page list under the verbs API thus hiding the specific HW mapping details away from the consumer. The provider drivers are provided with a generic helper ib_sg_to_pages that converts a scatterlist into a

[PATCH v4 06/26] RDMA/cxgb3: Support the new memory registration API

2015-10-12 Thread Sagi Grimberg
Support the new memory registration API by allocating a private page list array in iwch_mr and populate it when iwch_map_mr_sg is invoked. Also, support IB_WR_REG_MR by duplicating build_fastreg just take the needed information from different places: - page_size, iova, length (ib_mr) - page array

[PATCH v4 08/26] IB/qib: Support the new memory registration API

2015-10-12 Thread Sagi Grimberg
Support the new memory registration API by allocating a private page list array in qib_mr and populate it when qib_map_mr_sg is invoked. Also, support IB_WR_REG_MR by duplicating qib_fastreg_mr just take the needed information from different places: - page_size, iova, length (ib_mr) - page array

Re: [Ksummit-discuss] [TECH TOPIC] IRQ affinity

2015-10-12 Thread Theodore Ts'o
Hi Christoph, Do you think this is still an issue that would be worth discsussing at the kernel summit as a technical topic? If so, would you be willing to be responsible for kicking off the discussion for this topic? Thanks, - Ted On Wed, Jul 15,

[PATCH infiniband-diags] perfquery.c: Fix smp_query_via return value checks

2015-10-12 Thread Hal Rosenstock
smp_query_via returns pointer so < 0 comparison is wrong: src/perfquery.c: In function ?is_rsfec_mode_active?: src/perfquery.c:481: warning: ordered comparison of pointer with integer zero src/perfquery.c: In function ?main?: src/perfquery.c:919: warning: ordered comparison of pointer with

[PATCH TRIVIAL infiniband-diags] ibdiag_common.c: Move static to beginning of get_build_version declaration

2015-10-12 Thread Hal Rosenstock
Eliminate compiler warning: src/ibdiag_common.c:85: warning: ?static? is not at beginning of declaration Signed-off-by: Hal Rosenstock --- diff --git a/src/ibdiag_common.c b/src/ibdiag_common.c index e09623d..5424845 100644 --- a/src/ibdiag_common.c +++ b/src/ibdiag_common.c

Re: merge struct ib_device_attr into struct ib_device V2

2015-10-12 Thread Christoph Hellwig
On Mon, Oct 12, 2015 at 12:26:06PM +0300, Sagi Grimberg wrote: > First go with this looks OK for mlx4. mlx5 needs the below incremental > patch to be folded in. > > we need dev->ib_dev.max_pkeys set when get_port_caps() is called. Thanks, I've folded your patch and force pushed out the updated

RE: [PATCH for-next 0/2] RDMA/cxgb4: Add iWARP support for T6 adapter

2015-10-12 Thread Steve Wise
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] On > Behalf Of Hariprasad Shenai > Sent: Wednesday, September 23, 2015 6:49 AM > To: linux-rdma@vger.kernel.org; net...@vger.kernel.org > Cc: dledf...@redhat.com; da...@davemloft.net;

Re: [PATCH] svcrdma: Fix NFS server crash triggered by 1MB NFS WRITE

2015-10-12 Thread J. Bruce Fields
On Mon, Oct 12, 2015 at 10:53:39AM -0400, Chuck Lever wrote: > Now that the NFS server advertises a maximum payload size of 1MB > for RPC/RDMA again, it crashes in svc_process_common() when NFS > client sends a 1MB NFS WRITE on an NFS/RDMA mount. > > The server has set up a 259 element array of

Re: [Ksummit-discuss] [TECH TOPIC] IRQ affinity

2015-10-12 Thread Christoph Hellwig
On Mon, Oct 12, 2015 at 12:09:48PM -0400, Theodore Ts'o wrote: > Hi Christoph, > > Do you think this is still an issue that would be worth discsussing at > the kernel summit as a technical topic? If so, would you be willing > to be responsible for kicking off the discussion for this topic? Hi

Re: [PATCH TRIVIAL infiniband-diags] ibdiag_common.c: Move static to beginning of get_build_version declaration

2015-10-12 Thread ira.weiny
On Mon, Oct 12, 2015 at 08:31:23AM -0400, Hal Rosenstock wrote: > > Eliminate compiler warning: > src/ibdiag_common.c:85: warning: ?static? is not at beginning of declaration > > Signed-off-by: Hal Rosenstock Thanks applied, Ira > --- > diff --git a/src/ibdiag_common.c

Re: [PATCH infiniband-diags] perfquery.c: Fix smp_query_via return value checks

2015-10-12 Thread ira.weiny
On Mon, Oct 12, 2015 at 08:30:31AM -0400, Hal Rosenstock wrote: > > smp_query_via returns pointer so < 0 comparison is wrong: > src/perfquery.c: In function ?is_rsfec_mode_active?: > src/perfquery.c:481: warning: ordered comparison of pointer with integer zero > src/perfquery.c: In function

Re: Create a common verbs transport library

2015-10-12 Thread Moni Shoua
Hi Denny, We initially thought to implement a shared library that contains the transport logic. However, it seems that a SW Verbs transport driver would allow better code sharing. In fact, the VT driver would need only a single user-space driver for all "backends". Any direct HW access from

[ANNOUNCE] infiniband-diags 1.6.6 release

2015-10-12 Thread ira.weiny
There is a new release of infiniband-diags at: https://www.openfabrics.org/downloads/management/infiniband-diags-1.6.6.tar.gz md5sum: b855ca3b98afefc2ad6a2de378ab71dd infiniband-diags-1.6.6.tar.gz Dependencies: 1) libibmad >= 1.3.12 2) libibumad >= 1.3.7 3)