Re: [PATCH] ib_srp: initialize dma_length in srp_map_idb

2015-11-15 Thread Or Gerlitz
On Sun, Nov 15, 2015, Sagi Grimberg wrote: > On 15/11/2015 19:59, Christoph Hellwig wrote: >> Without this sg_dma_len will return 0 on architectures tha have >> the dma_length field. and what wrong with that? Christoph, probably typo here? "tha" needs to be "that" >> Signed-off-by: Christoph H

[PATCH] staging-EHCA: Delete unnecessary checks before the function call "kmem_cache_destroy"

2015-11-15 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 15 Nov 2015 21:58:45 +0100 The kmem_cache_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --

Re: srp state in current mainline

2015-11-15 Thread Bart Van Assche
On 11/15/15 10:06, Christoph Hellwig wrote: FYI, I sent a patch for the zero S/G length issue. With this xfstests does fine for ext4 and btrfs. With XFS I still run into corruption warnings for the slab use after free poison pattern. I suspect that issue might be related to uniqueue XFS I/O pa

Re: [PATCH] ib_srp: initialize dma_length in srp_map_idb

2015-11-15 Thread Sagi Grimberg
On 15/11/2015 19:59, Christoph Hellwig wrote: Without this sg_dma_len will return 0 on architectures tha have the dma_length field. Signed-off-by: Christoph Hellwig --- drivers/infiniband/ulp/srp/ib_srp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/ulp/srp/ib_

Re: [PATCH libmlx5 0/7] Completion timestamping

2015-11-15 Thread Christoph Lameter
On Sun, 15 Nov 2015, Matan Barak wrote: > This series adds support for completion timestamp. In order to > support this feature, several extended verbs were implemented > (as instructed in libibverbs). This is the portion that implements timestaping for libmlx5 and this patchset depends on anothe

[PATCH 5/9] cxgb3: simplify iwch_get_dma_wr

2015-11-15 Thread Christoph Hellwig
Fold simplified versions of build_phys_page_list and iwch_register_phys_mem into iwch_get_dma_wr now that no other callers are left. Signed-off-by: Christoph Hellwig --- drivers/infiniband/hw/cxgb3/iwch_mem.c | 71 --- drivers/infiniband/hw/cxgb3/iwch_provider.c | 75

[PATCH 6/9] nes: simplify nes_reg_phys_mr calling conventions

2015-11-15 Thread Christoph Hellwig
Just pass and address/size pair instead of an ib_phys_buf array. Signed-off-by: Christoph Hellwig --- drivers/infiniband/hw/nes/nes_cm.c| 10 +-- drivers/infiniband/hw/nes/nes_verbs.c | 140 -- drivers/infiniband/hw/nes/nes_verbs.h | 3 +- 3 files changed,

[PATCH 3/9] IB: remove support for phys MRs

2015-11-15 Thread Christoph Hellwig
We have stopped using phys MRs in the kernel a while ago, so let's remove all the cruft used to implement them. Signed-off-by: Christoph Hellwig --- drivers/infiniband/hw/cxgb3/iwch_mem.c | 31 --- drivers/infiniband/hw/cxgb3/iwch_provider.c | 69 -- drivers/infiniband/hw/cxgb3/iwch

[PATCH 2/9] IB: remove ib_query_mr

2015-11-15 Thread Christoph Hellwig
This functionality has no users and was only supported by the staged out EHCA driver. Signed-off-by: Christoph Hellwig --- drivers/infiniband/core/verbs.c | 7 - drivers/staging/rdma/ehca/ehca_iverbs.h | 2 -- drivers/staging/rdma/ehca/ehca_main.c | 1 - drivers/staging/rdma/ehc

[PATCH 7/9] amso1100: fold c2_reg_phys_mr into c2_get_dma_mr

2015-11-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/staging/rdma/amso1100/c2_provider.c | 67 ++--- 1 file changed, 12 insertions(+), 55 deletions(-) diff --git a/drivers/staging/rdma/amso1100/c2_provider.c b/drivers/staging/rdma/amso1100/c2_provider.c index 6c3e9cc..2de5a8f 10

[PATCH 4/9] IB: remove in-kernel support for memory windows

2015-11-15 Thread Christoph Hellwig
Remove the unused ib_allow_mw and ib_bind_mw functions, remove the unused IB_WR_BIND_MW and IB_WC_BIND_MW opcodes and move ib_dealloc_mw into the uverbs module. Signed-off-by: Christoph Hellwig --- Documentation/infiniband/core_locking.txt | 2 - drivers/infiniband/core/uverbs.h|

[PATCH 1/9] IB: start documenting device capabilities

2015-11-15 Thread Christoph Hellwig
Just IB_DEVICE_LOCAL_DMA_LKEY and IB_DEVICE_MEM_MGT_EXTENSIONS for now as I'm most familar with those. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-By: Jason Gunthorpe --- include/rdma/ib_verbs.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/in

garbage collect old memory registration code

2015-11-15 Thread Christoph Hellwig
This series removes huge chunks of code related to old memory registration methods that we don't use anymore. This expects my "IB: merge struct ib_device_attr into struct ib_device" patch to be already applied. Also available as a git tree: http://git.infradead.org/users/hch/rdma.git/sh

[PATCH 9/9] IB: remove the struct ib_phys_buf definition

2015-11-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/rdma/ib_verbs.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 0bbbd4b..3253563 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1145,11 +1145,6 @@ enum ib_access_fl

[PATCH 8/9] ehca: stop using struct ib_phys_buf

2015-11-15 Thread Christoph Hellwig
And simplify the calling convention for full-memory registrations. Signed-off-by: Christoph Hellwig --- drivers/staging/rdma/ehca/ehca_classes.h | 5 +- drivers/staging/rdma/ehca/ehca_mrmw.c| 94 +++- 2 files changed, 46 insertions(+), 53 deletions(-) diff --git

Re: srp state in current mainline

2015-11-15 Thread Christoph Hellwig
FYI, I sent a patch for the zero S/G length issue. With this xfstests does fine for ext4 and btrfs. With XFS I still run into corruption warnings for the slab use after free poison pattern. I suspect that issue might be related to uniqueue XFS I/O patterns. One thing that might be related is th

[PATCH] ib_srp: initialize dma_length in srp_map_idb

2015-11-15 Thread Christoph Hellwig
Without this sg_dma_len will return 0 on architectures tha have the dma_length field. Signed-off-by: Christoph Hellwig --- drivers/infiniband/ulp/srp/ib_srp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 3

Re: [PATCH 2/9] IB: add a proper completion queue abstraction

2015-11-15 Thread Sagi Grimberg
On 15/11/2015 14:55, Christoph Hellwig wrote: On Sun, Nov 15, 2015 at 11:40:02AM +0200, Sagi Grimberg wrote: I doubt INT_MAX is useful as a budget in any use-case. it can easily hog the CPU. If the consumer is given access to poll a CQ, it must be able to provide some way to budget it. Why not

Re: [PATCH 1/9] move blk_iopoll to limit and make it generally available

2015-11-15 Thread Sagi Grimberg
On 15/11/2015 11:04, Or Gerlitz wrote: On Sun, Nov 15, 2015 at 10:48 AM, Sagi Grimberg wrote: Or is correct, I have attempted to convert iser to use blk_iopoll in the past, however I've seen inconsistent performance and latency skews (comparing to tasklets iser is using today). This was mani

Re: [PATCH 2/9] IB: add a proper completion queue abstraction

2015-11-15 Thread Christoph Hellwig
On Sun, Nov 15, 2015 at 11:40:02AM +0200, Sagi Grimberg wrote: > I doubt INT_MAX is useful as a budget in any use-case. it can easily > hog the CPU. If the consumer is given access to poll a CQ, it must be > able to provide some way to budget it. Why not expose a budget argument > to the consumer?

Re: [PATCH 1/9] move blk_iopoll to limit and make it generally available

2015-11-15 Thread Christoph Hellwig
On Sun, Nov 15, 2015 at 10:48:41AM +0200, Sagi Grimberg wrote: > I have attempted to convert iser to use blk_iopoll in the past, however > I've seen inconsistent performance and latency skews (comparing to > tasklets iser is using today). This was manifested in IOPs test cases > where I ran multipl

[PATCH libmlx5 2/7] Add ibv_poll_cq_ex support

2015-11-15 Thread Matan Barak
Extended poll_cq supports writing only user's required work completion fields. Adding support for this extended verb. Signed-off-by: Matan Barak --- src/cq.c | 699 + src/mlx5.c | 5 + src/mlx5.h | 14 ++ 3 files changed, 584 inser

[PATCH libmlx5 3/7] Add timestmap support for ibv_poll_cq_ex

2015-11-15 Thread Matan Barak
Add support for filling the timestamp field in ibv_poll_cq_ex (if it's required by the user). Signed-off-by: Matan Barak --- src/cq.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/cq.c b/src/cq.c index 0185696..5e06990 100644 --- a/src/cq.c +++ b/src/cq.c @@ -913,6 +913,11 @@ inli

[PATCH libmlx5 7/7] Add always_inline check

2015-11-15 Thread Matan Barak
Always inline isn't supported by every compiler. Adding it to configure.ac in order to support it only when possible. Inline other poll_one data path functions in order to eliminate "ifs". Signed-off-by: Matan Barak --- configure.ac | 17 + src/cq.c | 42 +

[PATCH libmlx5 6/7] Optimize poll_cq

2015-11-15 Thread Matan Barak
The current ibv_poll_cq_ex mechanism needs to query every field for its existence. In order to avoid this penalty at runtime, add optimized functions for special cases. Signed-off-by: Matan Barak --- src/cq.c| 363 +--- src/mlx5.h | 1

[PATCH libmlx5 4/7] Add ibv_create_cq_ex support

2015-11-15 Thread Matan Barak
In order to create a CQ which supports timestamp, the user needs to specify the timestamp flag for ibv_create_cq_ex. Adding support for ibv_create_cq_ex in the mlx5's vendor library. Signed-off-by: Matan Barak --- src/mlx5.c | 1 + src/mlx5.h | 2 ++ src/verbs.c | 68

[PATCH libmlx5 5/7] Add ibv_query_values support

2015-11-15 Thread Matan Barak
In order to query the current HCA's core clock, libmlx5 should support ibv_query_values verb. Querying the hardware's cycles register is done by mmaping this register to user-space. Therefore, when libmlx5 initializes we mmap the cycles register. This assumes the machine's architecture places the P

[PATCH libmlx5 0/7] Completion timestamping

2015-11-15 Thread Matan Barak
Hi Eli, This series adds support for completion timestamp. In order to support this feature, several extended verbs were implemented (as instructed in libibverbs). ibv_query_device_ex was extended to support reading the hca_core_clock and timestamp mask. The same verb was extended with vendor dep

[PATCH libmlx5 1/7] Add timestamp support query_device_ex

2015-11-15 Thread Matan Barak
Add timestamp support for query_device extended verb. This is necessary in order to support hca_core_clock and timestamp_mask. In addition, hca_core_clock_offset is added to the vendor specific part in order to map the cycles register correctly. Signed-off-by: Matan Barak --- src/mlx5-abi.h | 9

[PATCH libmlx5 v1 0/5] Support CQE versions

2015-11-15 Thread Hagay Abramovsky
From: Haggai Abramovsky This series adds support for CQE (cookie) versions in libmlx5 Non-default cookie versions are a must for RAW PACKET Eth QPs. The code is capable to work over kernels which don't have this support yet for the sake of creating other QP types. Haggai Changes from v0:

[PATCH libmlx5 v1 1/5] libmlx5: Add infrastructure for resource identification

2015-11-15 Thread Hagay Abramovsky
From: Haggai Abramonvsky Add new struct member, mlx5_resource, for each tracked object, mlx5_srq and mlx5_qp, to allow retrieving the object in the poll_cq once we need it. Change-Id: Id7d1356cc866fa0aa06d256df9f3612dc1988e6a Signed-off-by: Haggai Abramovsky --- src/mlx5.h | 18 ++

[PATCH libmlx5 v1 5/5] libmlx5: Work with CQE version 1

2015-11-15 Thread Hagay Abramovsky
From: Haggai Abramonvsky >From now on, if the kernel supports CQE version 1, the library will choose to work with it. Change-Id: I22aff64a5f98dde8cb1b6d771424df52ac5d682b Signed-off-by: Haggai Abramovsky --- src/mlx5.c | 3 +++ src/verbs.c | 9 +++-- 2 files changed, 6 insertions(+), 6 de

[PATCH libmlx5 v1 4/5] libmlx5: Added QP and XSRQ create/destroy flow with user index

2015-11-15 Thread Hagay Abramovsky
From: Haggai Abramonvsky When wokring with CQE version 1, the library allocates a user-index for each new QP/XSRQ, and this user-index is passed to the kernel. Also in the destruction of a QP/XSRQ, the library needs to free the user-index, so it can be reused. In this stage, the library still d

[PATCH libmlx5 v1 3/5] libmlx5: Added new poll_cq according to the new CQE format

2015-11-15 Thread Hagay Abramovsky
From: Haggai Abramonvsky When working with CQE version 1, the CQE format is different, therefore we need a new poll_cq function that is compatible with the new CQE format. When allocating the user-context, we decide on the CQE version, and according to this, we choose which poll_cq function t

[PATCH libmlx5 v1 2/5] libmlx5: Add QPs and XSRQs resource tracking

2015-11-15 Thread Hagay Abramovsky
From: Haggai Abramonvsky Add new database that stores all the QPs and XSRQs context. Insertions and deletions to the database are done using the object's user-index. This database will allow us to retrieve the objects; QPs and XSRQs; by their user-index in the poll_one. Change-Id: I3b87e79be35c

Re: [PATCH 2/9] IB: add a proper completion queue abstraction

2015-11-15 Thread Sagi Grimberg
+/** + * ib_process_direct_cq - process a CQ in caller context + * @cq:CQ to process + * + * This function is used to process all outstanding CQ entries on a + * %IB_POLL_DIRECT CQ. It does not offload CQ processing to a different + * context and does not ask from completion in

Re: [PATCH 3/9] IB: add a helper to safely drain a QP

2015-11-15 Thread Sagi Grimberg
+ +struct ib_stop_cqe { + struct ib_cqe cqe; + struct completion done; +}; + +static void ib_stop_done(struct ib_cq *cq, struct ib_wc *wc) +{ + struct ib_stop_cqe *stop = + container_of(wc->wr_cqe, struct ib_stop_cqe, cqe); + + complete(&stop->done); +} +

Re: [PATCH 9/9] IB/iser: Convert to CQ abstraction

2015-11-15 Thread Or Gerlitz
On 11/13/2015 3:46 PM, Christoph Hellwig wrote: From: Sagi Grimberg Care to sparse some text here to assist a reviewer and future bisections?! I have asked multiple times to avoid empty change-logs for patches in this driver. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig -

Re: [PATCH 7/9] IB/iser: Use a dedicated descriptor for login

2015-11-15 Thread Or Gerlitz
On 11/13/2015 3:46 PM, Christoph Hellwig wrote: From: Sagi Grimberg Makes better sense and we'll need it later with CQ abstraction. iser switch login bufs to void Sagi, few quick comments on this patch, please address for next version.. The 2nd sentence of the change-log needs better phrasing

Re: [PATCH 1/9] move blk_iopoll to limit and make it generally available

2015-11-15 Thread Or Gerlitz
On Sun, Nov 15, 2015 at 10:48 AM, Sagi Grimberg wrote: > Or is correct, > > I have attempted to convert iser to use blk_iopoll in the past, however > I've seen inconsistent performance and latency skews (comparing to > tasklets iser is using today). This was manifested in IOPs test cases > where I

Re: [PATCH 1/9] move blk_iopoll to limit and make it generally available

2015-11-15 Thread Sagi Grimberg
On Fri, Nov 13, 2015 at 3:46 PM, Christoph Hellwig wrote: The new name is irq_poll as iopoll is already taken. Better suggestions welcome. Sagi (or Christoph if you can address that), @ some pointer over the last 18 months there was a port done at mellanox for iser to use blk-iopoll and AF

Re: [PATCH] IB/mad: In validate_mad, validate CM method and attribute

2015-11-15 Thread Sagi Grimberg
Hello Hal, With which SRP target has this behavior been observed ? Has this patch been tested with the LIO SRP target ? Hi Bart, This issue was detected when testing a new array with SRP support. This does not involve LIO as the Linux CM stack does not behave in the way described in this pat