Re: [PATCH] IB/usnic: delete unneeded IS_ERR test

2015-12-22 Thread Dave Goodell
[copying Nelson too] On Sat, Dec 19, 2015 at 09:48:59PM +0100, Julia Lawall wrote: > kzalloc doesn't return ERR_PTR, so there is no need to test for it. > > The semantic match that finds this problem is as follows: > (http://coccinelle.lip6.fr/) > > // > @@ > expression x,e; > @@ > > * x =

Re: [RFC contig pages support 1/2] IB: Supports contiguous memory operations

2015-12-22 Thread Vlastimil Babka
On 12/13/2015 01:48 PM, Shachar Raindel wrote: -Original Message- From: Christoph Hellwig [mailto:h...@infradead.org] Sent: Wednesday, December 09, 2015 8:40 PM On Wed, Dec 09, 2015 at 10:00:02AM +, Shachar Raindel wrote: As far as gain is concerned, we are seeing gains in two

Re: [PATCH] IB/cma: cma_match_net_dev needs to take into account port_num

2015-12-22 Thread Doug Ledford
On 12/22/2015 05:47 AM, Or Gerlitz wrote: > On 12/21/2015 5:01 PM, Matan Barak wrote: >> Previously, cma_match_net_dev called cma_protocol_roce which >> tried to verify that the IB device uses RoCE protocol. However, >> if rdma_id didn't have a bounded port, it used the first port >> of the

Re: [RFC PATCH 00/15] staging/rdma/hfi1: Initial patches to add rdmavt support in HFI1

2015-12-22 Thread ira.weiny
On Mon, Dec 21, 2015 at 05:01:48PM -0800, gre...@linuxfoundation.org wrote: > On Mon, Dec 21, 2015 at 07:19:43PM -0500, ira.weiny wrote: > > On Mon, Dec 21, 2015 at 02:02:35PM -0800, gre...@linuxfoundation.org wrote: > > > On Mon, Dec 21, 2015 at 01:12:14AM -0500, ira.weiny wrote: > > > > Greg,

Re: device attr cleanup

2015-12-22 Thread Doug Ledford
On 12/22/2015 02:19 PM, Doug Ledford wrote: > On 12/22/2015 02:56 AM, Or Gerlitz wrote: >> On Wed, Dec 16, 2015 at 7:53 AM, Or Gerlitz wrote: >>> On 12/15/2015 9:03 PM, Doug Ledford wrote: >> Or, you specifically asked me to wait until this week. I made my

Re: [PATCH] IB/cma: cma_match_net_dev needs to take into account port_num

2015-12-22 Thread Matan Barak
On Tue, Dec 22, 2015 at 8:58 PM, Doug Ledford wrote: > On 12/22/2015 05:47 AM, Or Gerlitz wrote: >> On 12/21/2015 5:01 PM, Matan Barak wrote: >>> Previously, cma_match_net_dev called cma_protocol_roce which >>> tried to verify that the IB device uses RoCE protocol. However,

Re: [RFC PATCH 00/15] staging/rdma/hfi1: Initial patches to add rdmavt support in HFI1

2015-12-22 Thread gre...@linuxfoundation.org
On Tue, Dec 22, 2015 at 02:15:08PM -0500, ira.weiny wrote: > On Mon, Dec 21, 2015 at 05:01:48PM -0800, gre...@linuxfoundation.org wrote: > > On Mon, Dec 21, 2015 at 07:19:43PM -0500, ira.weiny wrote: > > > On Mon, Dec 21, 2015 at 02:02:35PM -0800, gre...@linuxfoundation.org > > > wrote: > > > >

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Jason Gunthorpe
On Tue, Dec 22, 2015 at 06:58:14PM +0200, Sagi Grimberg wrote: > > >The ULP decides if this MR is going to be used as a lkey or rkey > >by passing IB_REG_LKEY or IB_REG_RKEY. The HCA driver will then > >fill mr->key by the lkey or rkey based on that and everything will > >work fine. > > But the

Re: [PATCH V1 00/16] add Intel(R) X722 iWARP driver

2015-12-22 Thread Doug Ledford
On 12/21/2015 06:13 PM, Faisal Latif wrote: > This (V1) series contains the addition of the i40iw.ko driver after > incorporating the feedback from Christoph Hellwig and Joe Perches for > initial series. > > This driver provides iWARP RDMA functionality for the Intel(R) X722 Ethernet > controller

Re: [PATCH] IB/cma: cma_match_net_dev needs to take into account port_num

2015-12-22 Thread Doug Ledford
On 12/22/2015 02:26 PM, Matan Barak wrote: > On Tue, Dec 22, 2015 at 8:58 PM, Doug Ledford wrote: >> On 12/22/2015 05:47 AM, Or Gerlitz wrote: >>> On 12/21/2015 5:01 PM, Matan Barak wrote: Previously, cma_match_net_dev called cma_protocol_roce which tried to verify

Re: [RFC PATCH 00/15] staging/rdma/hfi1: Initial patches to add rdmavt support in HFI1

2015-12-22 Thread Doug Ledford
On 12/22/2015 09:27 PM, gre...@linuxfoundation.org wrote: > On Tue, Dec 22, 2015 at 02:15:08PM -0500, ira.weiny wrote: >> On Mon, Dec 21, 2015 at 05:01:48PM -0800, gre...@linuxfoundation.org wrote: >>> On Mon, Dec 21, 2015 at 07:19:43PM -0500, ira.weiny wrote: On Mon, Dec 21, 2015 at

Re: [PATCH] IB/cma: cma_match_net_dev needs to take into account port_num

2015-12-22 Thread Or Gerlitz
On 12/21/2015 5:01 PM, Matan Barak wrote: Previously, cma_match_net_dev called cma_protocol_roce which tried to verify that the IB device uses RoCE protocol. However, if rdma_id didn't have a bounded port, it used the first port of the device. In VPI systems, the first port might be an IB port

[PATCH] i40iw: fix compare_const_fl.cocci warnings

2015-12-22 Thread Julia Lawall
Move constants to the right of binary operators. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci CC: Faisal Latif Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- It's a minor point, but when I

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Sagi Grimberg
Hi Christoph, While IB supports the notion of returning separate local and remote keys from a memory registration, the iWarp spec doesn't and neither does any of our in-tree HCA drivers [1] nor consumers. Consolidate the in-kernel API to provide only a single key and make everyones life

[PATCH] svc_rdma: use local_dma_lkey

2015-12-22 Thread Christoph Hellwig
We now alwasy have a per-PD local_dma_lkey available. Make use of that fact in svc_rdma and stop registering our own MR. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe Reviewed-by:

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Christoph Hellwig
On Tue, Dec 22, 2015 at 11:17:54AM +0200, Sagi Grimberg wrote: > What makes me worried here is that the IB/RoCE specification really > defines different keys for local and remote access. I'm less concerned > about our consumers but more about our providers. We keep seeing new > providers come

[RFC] Generic InfiniBand transport done in software

2015-12-22 Thread Moni Shoua
Hi, In the past months the need for a kernel module that implements the InfiniBand transport in software and unify all the InfiniBand software drivers has been raised. Since then, nobody has submitted any design proposal that satisfy the initial thoughts and can serve various back-ends. The

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Sagi Grimberg
The ULP decides if this MR is going to be used as a lkey or rkey by passing IB_REG_LKEY or IB_REG_RKEY. The HCA driver will then fill mr->key by the lkey or rkey based on that and everything will work fine. But the ULP *can* register a memory buffer with local and remote access permissions.

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Christoph Hellwig
On Tue, Dec 22, 2015 at 03:50:12PM +0200, Sagi Grimberg wrote: > This is why I said that the problem here is not the ULPs. But if a new > HW comes along with distinction between rkeys and lkeys it will have a > problem. For example a HW allocates two different keys, rkey and lkey. > And, it

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Sagi Grimberg
On 22/12/2015 15:13, Christoph Hellwig wrote: On Tue, Dec 22, 2015 at 11:17:54AM +0200, Sagi Grimberg wrote: What makes me worried here is that the IB/RoCE specification really defines different keys for local and remote access. I'm less concerned about our consumers but more about our

Re: [PATCH] IB/cma: cma_match_net_dev needs to take into account port_num

2015-12-22 Thread Or Gerlitz
On 12/22/2015 9:17 AM, Or Gerlitz wrote: On 12/21/2015 5:01 PM, Matan Barak wrote: This patch fixes a bug in VPI systems, where the first port is configured as IB and the second one is configured as Ethernet. In this case, if the rdma_id isn't bounded to a port, cma_match_net_dev will try to

Re: [RFC] Generic InfiniBand transport done in software

2015-12-22 Thread Dennis Dalessandro
On Tue, Dec 22, 2015 at 02:38:10PM +0200, Moni Shoua wrote: Hi, In the past months the need for a kernel module that implements the InfiniBand transport in software and unify all the InfiniBand software drivers has been raised. Since then, nobody has submitted any design proposal that satisfy

Re: device attr cleanup

2015-12-22 Thread Doug Ledford
On 12/22/2015 02:56 AM, Or Gerlitz wrote: > On Wed, Dec 16, 2015 at 7:53 AM, Or Gerlitz wrote: >> On 12/15/2015 9:03 PM, Doug Ledford wrote: > >>> Or, you specifically asked me to wait until this week. I made my >>> initial impressions clear (I don't necessarily like the