Re: 4.4's rdma plate

2015-10-13 Thread Or Gerlitz
On Sun, Oct 11, 2015 at 11:58 PM, Or Gerlitz wrote: > Hi Doug, > As we're soon on 4.3-rc5, could you please update how things look for 4.4? > > The mutlicast loopback prevention patches from Eran were intially > posted ~two months ago and went through testing by Christoph and Co. [...] Hi Doug,

Re: [PATCH infiniband-diags] ibqueryerrors.c: Removed unused passed parameters to print_port_config and query_and_dump

2015-10-13 Thread ira.weiny
On Tue, Oct 13, 2015 at 08:38:20AM -0400, Hal Rosenstock wrote: > > src/ibqueryerrors.c: In function ?print_port_config?: > src/ibqueryerrors.c:176: warning: unused parameter ?node_name? > src/ibqueryerrors.c: In function ?query_and_dump?: > src/ibqueryerrors.c:367: warning: unused parameter ?node

Re: [PATCH infiniband-diags] ibcacheedit.c: Eliminate unused parameter passed to update_switchportguids

2015-10-13 Thread ira.weiny
On Tue, Oct 13, 2015 at 08:38:02AM -0400, Hal Rosenstock wrote: > > src/ibcacheedit.c: In function ?update_switchportguids?: > src/ibcacheedit.c:168: warning: unused parameter ?guid? > > Signed-off-by: Hal Rosenstock Thanks applied, Ira > --- > diff --git a/src/ibcacheedit.c b/src/ibcacheedit.

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

2015-10-13 Thread Hefty, Sean
> On Mon, Oct 12, 2015 at 7:42 PM, Hefty, Sean wrote: > >> 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,

Re: [PATCH v5 12/26] xprtrdma: Port to new memory registration API

2015-10-13 Thread Chuck Lever
> On Oct 13, 2015, at 12:11 PM, Sagi Grimberg wrote: > > 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: Ste

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

2015-10-13 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 (q

[PATCH v2 2/2] IB/iser: Enable SG clustering

2015-10-13 Thread Sagi Grimberg
iser is perfectly capable supporting SG clustering as it translates the SG list to a page vector. Enabling SG clustering can dramatically reduce the number of SG elements, which doesn't make much of a difference at this point, but with arbitrary SG list support, reducing the number of SG elements c

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

2015-10-13 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 --- drivers/infiniband/hw/cxgb3/iwch_qp.c | 47 --

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

2015-10-13 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 --- drivers/infiniband/hw/mlx4/mr.c |

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

2015-10-13 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 --- drivers/infiniband/ulp/iser/iscsi_iser.

[PATCH v2 0/2] iser bounce buffering cleanup

2015-10-13 Thread Sagi Grimberg
Up until now, iser used bounce buffering to mitigate the RDMA alignment limitations. Since kernel 4.3, the block layer can reliably guarantee that SG lists won't contain gaps (page alignment is not met) if a driver set a virt_boundary. The block layer will: - refuse merges if bios are not aligned

[PATCH v5 11/26] iser-target: Port to new memory registration API

2015-10-13 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 --- drivers/infiniband/ulp/isert/ib_isert.c

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

2015-10-13 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 Tested-by: Selvin Xavier --- include/linux/sunrpc/svc_rdma.h

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

2015-10-13 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 insertions(+), 9 deletions(-) diff --git a/drivers/infinib

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

2015-10-13 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 +--- drivers/infiniband/hw/qib/qib_verbs.c |

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

2015-10-13 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 insertion(+), 167 deletions(-) diff --

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

2015-10-13 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 files changed, 79 deletions(-) diff

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

2015-10-13 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: Bart Van Assche --- dr

[PATCH v2 1/2] IB/iser: set block queue_virt_boundary

2015-10-13 Thread Sagi Grimberg
The block layer can reliably guarantee that SG lists won't contain gaps (page unaligned) if a driver set the queue virt_boundary. With this setting the block layer will: - refuse merges if bios are not aligned to the virtual boundary - split bios/requests that are not aligned to the virtual bounda

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

2015-10-13 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 - drivers/infiniband/hw/mlx5/mlx5_ib.h | 14

[PATCH v5 23/26] iw_cxgb4: Remove old FRWR API

2015-10-13 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/cxgb4/cq.c | 2 +- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 18 drivers/infiniband/hw/cxgb4/mem.c | 45 drivers/infiniband

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

2015-10-13 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 +--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | 4 --

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

2015-10-13 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, lengt

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

2015-10-13 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 Hellwig Acked-by: Sa

[PATCH v5 12/26] xprtrdma: Port to new memory registration API

2015-10-13 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 Tested-by: Selvin Xavier --- net/sunrpc/xprtrdma/frwr_ops.c

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

2015-10-13 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 --- drivers/infiniband/ulp/srp/ib_s

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

2015-10-13 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 b/drivers/infiniband/ulp/srp/ib_srp.c index 6d399378928d..d4a5a9b86390

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

2015-10-13 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 v5 03/26] IB/mlx5: Support the new memory registration API

2015-10-13 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, lengt

[PATCH v5 00/26] New fast registration API

2015-10-13 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 a

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

2015-10-13 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 vecto

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

2015-10-13 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: Christoph Hellwig --- drivers/infiniband/hw/mlx5/mlx5_

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

2015-10-13 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) - pa

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

2015-10-13 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 v5 06/26] RDMA/cxgb3: Support the new memory registration API

2015-10-13 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 (

Re: [PATCH] OpenSM: LFT update breaks if IB_SMP_DATA_SIZE changes

2015-10-13 Thread Hal Rosenstock
On 10/13/2015 9:25 AM, Jens Domke wrote: > This is only a precautionary patch for a theoretical > bug which would arise if someone redefines IB_SMP_DATA_SIZE > to a values !=64. > > ucast_mgr_pipeline_fwd_tbl() calculates the max. number of > blocks to update using 64 explicitly, while set_lft_blo

[PATCH] OpenSM: LFT update breaks if IB_SMP_DATA_SIZE changes

2015-10-13 Thread Jens Domke
This is only a precautionary patch for a theoretical bug which would arise if someone redefines IB_SMP_DATA_SIZE to a values !=64. ucast_mgr_pipeline_fwd_tbl() calculates the max. number of blocks to update using 64 explicitly, while set_lft_block() uses IB_SMP_DATA_SIZE. If IB_SMP_DATA_SIZE != 64

[PATCH infiniband-diags] ibqueryerrors.c: Removed unused passed parameters to print_port_config and query_and_dump

2015-10-13 Thread Hal Rosenstock
src/ibqueryerrors.c: In function ?print_port_config?: src/ibqueryerrors.c:176: warning: unused parameter ?node_name? src/ibqueryerrors.c: In function ?query_and_dump?: src/ibqueryerrors.c:367: warning: unused parameter ?node? Signed-off-by: Hal Rosenstock --- diff --git a/src/ibqueryerrors.c b/s

[PATCH infiniband-diags] ibcacheedit.c: Eliminate unused parameter passed to update_switchportguids

2015-10-13 Thread Hal Rosenstock
src/ibcacheedit.c: In function ?update_switchportguids?: src/ibcacheedit.c:168: warning: unused parameter ?guid? Signed-off-by: Hal Rosenstock --- diff --git a/src/ibcacheedit.c b/src/ibcacheedit.c index 983c0ab..b520839 100644 --- a/src/ibcacheedit.c +++ b/src/ibcacheedit.c @@ -165,7 +165,7 @@

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

2015-10-13 Thread Matan Barak
On 10/12/2015 3:59 PM, Devesh Sharma wrote: Looks good, just one doubt inline: Thanks for looking at this patch. On Sun, Oct 11, 2015 at 6:28 PM, Matan Barak wrote: When IP based addressing was introduced, ib_create_ah_from_wc was changed in order to support a suitable AH. Since this AH

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

2015-10-13 Thread Matan Barak
On Mon, Oct 12, 2015 at 7:42 PM, Hefty, Sean wrote: >> 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 sh

Re: [PATCH for-next 0/9] Add RoCE v2 support

2015-10-13 Thread Matan Barak
On Mon, Oct 12, 2015 at 5:41 PM, Doug Ledford wrote: > On 10/11/2015 10:40 AM, Matan Barak wrote: > >> Hi, >> >> I've rebased the patches against your k.o/for-4.4 tree. I've also added >> some fixes to bugs we found lately. I can re-spin the whole series if >> necessary (with the fixes squashed).