RE: [PATCH RFC] RDMA/core: add rdma_get_dma_mr()

2015-06-29 Thread Steve Wise
-Original Message- From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma-ow...@vger.kernel.org] On Behalf Of Haggai Eran Sent: Sunday, June 28, 2015 10:47 AM To: Steve Wise; jguntho...@obsidianresearch.com Cc: sa...@mellanox.com; r...@mellanox.com; ogerl...@mellanox.com;

[PATCH] IB: Add rdma_cap_ib_switch helper and use where appropriate

2015-06-29 Thread Hal Rosenstock
Persuant to Liran's comments on node_type on linux-rdma mailing list: In an effort to reform the RDMA core and ULPs to minimize use of node_type in struct ib_device, an additional bit is added to struct ib_device for is_switch (IB switch). This is needed to be initialized by any IB switch device

Re: [PATCH for-next V6 00/10] Move RoCE GID management to IB/Core

2015-06-29 Thread Or Gerlitz
On Thu, Jun 25, 2015 at 9:13 PM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: On Thu, Jun 25, 2015 at 11:34:43AM +0300, Or Gerlitz wrote: So... are we finally OK wrt the feedback you provided? I've been looking at Yishai's series, I though it was almost good to go, but the error

RE: [PATCH RFC] RDMA/core: add rdma_get_dma_mr()

2015-06-29 Thread Hefty, Sean
+enum rdma_mr_roles { + RDMA_MRR_RECV = 1, + RDMA_MRR_SEND = (11), + RDMA_MRR_READ_SOURCE= (12), + RDMA_MRR_READ_SINK = (13), Maybe it's just me, but it took me a second to figure out

Re: [PATCH RFC] RDMA/core: add rdma_get_dma_mr()

2015-06-29 Thread Jason Gunthorpe
On Mon, Jun 29, 2015 at 08:47:55AM -0500, Steve Wise wrote: On 26/06/2015 00:29, Steve Wise wrote: +enum rdma_mr_roles { + RDMA_MRR_RECV = 1, + RDMA_MRR_SEND = (11), + RDMA_MRR_READ_SOURCE= (12), + RDMA_MRR_READ_SINK =

Re: [PATCH for-next V5 1/5] IB/uverbs: Fix reference counting usage of event files

2015-06-29 Thread Jason Gunthorpe
On Sun, Jun 28, 2015 at 05:33:04PM +0300, Yishai Hadas wrote: You are wrong here, we have here balanced put, the first is done as part of fput(filp) - ib_uverbs_event_close_file - kref_put(file-ref, ib_uverbs_release_event_file) and the second at the end of this function as part of the err:

Re: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-29 Thread Jason Gunthorpe
On Sat, Jun 27, 2015 at 12:12:11PM +0300, Sagi Grimberg wrote: Also since we have the new rdma_cap_read_multi_sge() helper, I thought I should use it. :) I think that reading the exact device caps max_sge, max_sge_is better and more straight forward... Right, rdma_cap_read_multi_sge was

Re: [PATCH] mlx4, mlx5, mthca: Expose max_sge_rd correctly

2015-06-29 Thread Steve Wise
On 6/29/2015 1:12 PM, Sagi Grimberg wrote: Applications must not assume that max_sge and max_sge_rd are the same, Hence expose max_sge_rd correctly as well. Reported-by: Steve Wise sw...@opengridcomputing.com Signed-off-by: Sagi Grimberg sa...@mellanox.com How about I pull this into my iSER

[PATCH] mlx4, mlx5, mthca: Expose max_sge_rd correctly

2015-06-29 Thread Sagi Grimberg
Applications must not assume that max_sge and max_sge_rd are the same, Hence expose max_sge_rd correctly as well. Reported-by: Steve Wise sw...@opengridcomputing.com Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/hw/mlx4/main.c| 1 +

Re: [PATCH] mlx4, mlx5, mthca: Expose max_sge_rd correctly

2015-06-29 Thread Jason Gunthorpe
On Mon, Jun 29, 2015 at 01:14:50PM -0500, Steve Wise wrote: On 6/29/2015 1:12 PM, Sagi Grimberg wrote: Applications must not assume that max_sge and max_sge_rd are the same, Hence expose max_sge_rd correctly as well. Reported-by: Steve Wise sw...@opengridcomputing.com Signed-off-by: Sagi

[PATCH V2 1/5] mlx4, mlx5, mthca: Expose max_sge_rd correctly

2015-06-29 Thread Steve Wise
From: Sagi Grimberg sa...@mellanox.com Applications must not assume that max_sge and max_sge_rd are the same, Hence expose max_sge_rd correctly as well. Reported-by: Steve Wise sw...@opengridcomputing.com Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/hw/mlx4/main.c

[PATCH V2 0/5] iSER support for iWARP

2015-06-29 Thread Steve Wise
The following series implements support for iWARP transports in the iSER initiator and target. This is based on Doug's k.o/for-4.2 branch. I've tested this on cxgb4 and mlx4 hardware. Changes since V1: Introduce and use transport-independent RDMA core services for allocating DMA MRs and

[PATCH V2 2/5] ipath,qib: Expose max_sge_rd correctly

2015-06-29 Thread Steve Wise
Applications must not assume that max_sge and max_sge_rd are the same, Hence expose max_sge_rd correctly as well. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/ipath/ipath_verbs.c |1 + drivers/infiniband/hw/qib/qib_verbs.c |1 + 2 files changed, 2

[PATCH V2 3/5] RDMA/core: transport-independent access flags

2015-06-29 Thread Steve Wise
The semantics for MR access flags are not consistent across RDMA protocols. So rather than have applications try and glean what they need, have them pass in the intended roles and attributes for the MR to be allocated and let the RDMA core select the appropriate access flags given the roles,

[PATCH V2 4/5] RDMA/iser: support iWARP devices

2015-06-29 Thread Steve Wise
Limit the sg tablesize based on the device fast reg depth. Use rdma_get_dma_mr() to allocate the DMA MR. Use rdma_fast_reg_access_flags() to set the access_flags for fast register work requests. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/ulp/iser/iscsi_iser.c

[PATCH V2 5/5] RDMA/isert: support iWARP devices

2015-06-29 Thread Steve Wise
Use rdma_get_dma_mr() to allocate the DMA MR. Use rdma_fast_reg_access_flags() to set the access_flags for fast register work requests. Use the device's max_sge_rd capability to compute the target's read sge depth. Save both the read and write max_sge values in the isert_conn struct, and use

Re: [PATCH for-next V5 1/5] IB/uverbs: Fix reference counting usage of event files

2015-06-29 Thread Jason Gunthorpe
On Tue, Jun 30, 2015 at 12:22:02AM +0300, Yishai Hadas wrote: It should be: kref_put(uverbs_file-async_file-ref, ib_uverbs_release_event_file) instead of: kref_put(uverbs_file-async_file-ref, ib_uverbs_release_file); Right Please note that in that approach we duplicate above line as it

Re: [PATCH for-next V5 1/5] IB/uverbs: Fix reference counting usage of event files

2015-06-29 Thread Yishai Hadas
On 6/29/2015 8:40 PM, Jason Gunthorpe wrote: On Sun, Jun 28, 2015 at 05:33:04PM +0300, Yishai Hadas wrote: You are wrong here, we have here balanced put, the first is done as part of fput(filp) - ib_uverbs_event_close_file - kref_put(file-ref, ib_uverbs_release_event_file) and the second at

Re: [PATCH for-next V5 3/5] IB/uverbs: Enable device removal when there are active user space applications

2015-06-29 Thread Yishai Hadas
On 6/25/2015 8:09 PM, Jason Gunthorpe wrote: On Thu, Jun 25, 2015 at 04:51:49PM +0300, Yishai Hadas wrote: On 6/24/2015 9:25 PM, Jason Gunthorpe wrote: Is not holding the RCU lock while ib_uverbs_release_dev is reading ib_dev. The barriers in kref are not strong enough to guarentee the RCU

Re: [PATCH v2 2/2] x86/mm/pat, drivers/media/ivtv: move pat warn and replace WARN() with pr_warn()

2015-06-29 Thread Ingo Molnar
* Andy Walls a...@silverblocksystems.net wrote: On Fri, 2015-06-26 at 10:45 +0200, Ingo Molnar wrote: * Luis R. Rodriguez mcg...@suse.com wrote: On Thu, Jun 25, 2015 at 08:51:47AM +0200, Ingo Molnar wrote: * Luis R. Rodriguez mcg...@do-not-panic.com wrote: From: Luis

RE: [PATCH] mlx4, mlx5, mthca: Expose max_sge_rd correctly

2015-06-29 Thread Steve Wise
-Original Message- From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma-ow...@vger.kernel.org] On Behalf Of Jason Gunthorpe Sent: Monday, June 29, 2015 1:17 PM To: Steve Wise Cc: Sagi Grimberg; linux-rdma@vger.kernel.org; Eli Cohen; Or Gerlitz Subject: Re: [PATCH] mlx4,