Re: [PATCH rdma-next 1/6] IB/core: Save the device attributes on the device structure

2015-12-18 Thread Or Gerlitz
On 12/17/2015 7:41 PM, Jason Gunthorpe wrote: On Thu, Dec 17, 2015 at 03:44:19PM +0200, Sagi Grimberg wrote: + ret = ib_query_device(device, &device->attrs); + if (ret) { + printk(KERN_WARNING "Couldn't query the device attributes\n"); + goto out; +

Re: RoCE passive side failures on 4.4-rc5

2015-12-18 Thread Or Gerlitz
On 12/17/2015 4:18 PM, Sagi Grimberg wrote: I'm using 4.4-rc2+ and I have RoCE working. I tried 4.4-rc2 and I see the same problem. I will make my .config available to you and Moni so you can try it out on your systems Sunday. I see this over both CX2 and CX3-pro, both are in VPI config. BTW

[PATCH rdma-next V1 0/7] dev attr cleanup (less is more)

2015-12-18 Thread Or Gerlitz
OK, Doug, this is my suggestion for the dev attr cleanup -- it has the advantages of leaving the attrs on a well defined location, a field in the IB device, the ability to get that through smaller patches, avoid touching any of the HW drivers, etc. Or. changes from V0: - addressed Sagi's com

[PATCH rdma-next V1 2/7] IB/core: Avoid calling ib_query_device

2015-12-18 Thread Or Gerlitz
Use the cached copy of the attributes present on the device, except for the case of a query originating from user-space, where we have to invoke the driver query_device entry, so they can fill in their udata. Signed-off-by: Or Gerlitz --- drivers/infiniband/core/cm.c | 12 +--- d

[PATCH rdma-next V1 4/7] net/rds: Avoid calling ib_query_device

2015-12-18 Thread Or Gerlitz
Instead, use the cached copy of the attributes present on the device. Signed-off-by: Or Gerlitz --- net/rds/ib.c | 34 +++--- net/rds/iw.c | 23 +-- 2 files changed, 16 insertions(+), 41 deletions(-) diff --git a/net/rds/ib.c b/net/rds/ib.c index

[PATCH rdma-next V1 5/7] xprtrdma: Avoid calling ib_query_device

2015-12-18 Thread Or Gerlitz
Instead, use the cached copy of the attributes present on the device. Signed-off-by: Or Gerlitz --- net/sunrpc/xprtrdma/frwr_ops.c | 7 ++--- net/sunrpc/xprtrdma/svc_rdma_transport.c | 48 +--- net/sunrpc/xprtrdma/verbs.c | 24 ++--

[PATCH rdma-next V1 3/7] IB/ulps: Avoid calling ib_query_device

2015-12-18 Thread Or Gerlitz
Instead, use the cached copy of the attributes present on the device. Signed-off-by: Or Gerlitz --- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 19 --- drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 14 +++-- drivers/infiniband/ulp/ipoib/ipoib_main.c| 21 + drivers

[PATCH rdma-next V1 1/7] IB/core: Save the device attributes on the device structure

2015-12-18 Thread Or Gerlitz
From: Ira Weiny This way both the IB core and upper level drivers can access these cached device attributes rather than querying or caching them on their own. Signed-off-by: Ira Weiny Signed-off-by: Or Gerlitz --- drivers/infiniband/core/device.c | 8 include/rdma/ib_verbs.h

[PATCH rdma-next V1 6/7] staging/o2iblnd: Avoid calling ib_query_device

2015-12-18 Thread Or Gerlitz
Instead, use the cached copy of the attributes present on the device. Signed-off-by: Or Gerlitz --- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b

[PATCH rdma-next V1 7/7] IB/core: Remove ib_query_device

2015-12-18 Thread Or Gerlitz
The copy of the attributes present on the device is now used by all consumers expect for uverbs in case of serving user-space query, where dev->query_device is called. Signed-off-by: Or Gerlitz --- drivers/infiniband/core/device.c | 19 --- include/rdma/ib_verbs.h | 3 -

Re: [PATCH rdma-next 1/6] IB/core: Save the device attributes on the device structure

2015-12-18 Thread Or Gerlitz
On Fri, Dec 18, 2015 at 7:16 AM, ira.weiny wrote: > More than anything what I hate is all the places that allocate struct > ib_device_attr just to free it after the query call. did you care to look on patches 2-6, this is exactly what they are doing. -- To unsubscribe from this list: send the li

[PATCH] IB/mlx5: report tx/rx checksum cap when query device

2015-12-18 Thread bodong
From: Bodong Wang This patch will report the tx/rx checksum cap for raw qp Signed-off-by: Bodong Wang --- drivers/infiniband/hw/mlx5/main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 38aa490..101c17a 1006

[PATCH] libmlx5: Add support for RAW_ETH TX/RX checksum offload

2015-12-18 Thread bodong
From: Bodong Wang RX checksum verification status is reported through wc_flag when polling CQ. When IBV_WC_IP_CSUM_OK is set, that means both IPv4 header checksum and TCP/UDP checksum are OK. TX checksum offload will be enabled for TCP/UDP over IPv4 if user sets send_flag IBV_SEND_IP_CSUM. A ne

Re: [PATCH 3/3] bject: IB Core: Display extended counter set if available

2015-12-18 Thread Christoph Lameter
On Thu, 17 Dec 2015, Hal Rosenstock wrote: > > + if (cpi.capability_mask && IB_PMA_CLASS_CAP_EXT_WIDTH) { > > + /* We have extended counters */ > > + > > + if (cpi.capability_mask && IB_PMA_CLASS_CAP_EXT_WIDTH_NOIETF) > > + /* But not the IETF ones */ > > +

Re: [PATCH 3/3] bject: IB Core: Display extended counter set if available

2015-12-18 Thread Hal Rosenstock
On 12/18/2015 8:39 AM, Christoph Lameter wrote: > On Thu, 17 Dec 2015, Hal Rosenstock wrote: > >>> + if (cpi.capability_mask && IB_PMA_CLASS_CAP_EXT_WIDTH) { >>> + /* We have extended counters */ >>> + >>> + if (cpi.capability_mask && IB_PMA_CLASS_CAP_EXT_WIDTH_NOIETF) >>> +

MR cleanups

2015-12-18 Thread Christoph Hellwig
Hi Doug, this series (on top of your k.o/for-4.5 branch) has various MR-related cleanups: starting to document the device capabilities, removing lots of dead MR/MW code and removing a useless field in struct ib_mr. This should be fairly uncontroversial I hope, so I'd like to get it in before the

[PATCH 02/10] IB: remove ib_query_mr

2015-12-18 Thread Christoph Hellwig
This functionality has no users and was only supported by the staged out EHCA driver. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe [core] Reviewed-by: Steve Wise --- drivers/infiniband/core/verbs.c | 7 - drivers/staging/rdma/ehca/ehca_

[PATCH 03/10] IB: remove support for phys MRs

2015-12-18 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 Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe [core] Reviewed-By: Devesh Sharma [ocrdma] Reviewed-by: Steve Wise --- drivers/infiniband/hw

[PATCH 04/10] IB: remove in-kernel support for memory windows

2015-12-18 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 Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe [core] Reviewed-by: Steve Wise --- Document

[PATCH 06/10] nes: simplify nes_reg_phys_mr calling conventions

2015-12-18 Thread Christoph Hellwig
Just pass and address/size pair instead of an ib_phys_buf array. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe [core] Reviewed-by: Steve Wise --- drivers/infiniband/hw/nes/nes_cm.c| 10 +-- drivers/infiniband/hw/nes/nes_verbs.c | 140 ---

[PATCH 05/10] cxgb3: simplify iwch_get_dma_wr

2015-12-18 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 Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe [core] Reviewed-by: Steve Wise --- drivers/infiniband/hw/cxgb3/iwch_mem

[PATCH 01/10] IB: start documenting device capabilities

2015-12-18 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

[PATCH 07/10] amso1100: fold c2_reg_phys_mr into c2_get_dma_mr

2015-12-18 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe [core] Reviewed-by: Steve Wise --- drivers/staging/rdma/amso1100/c2_provider.c | 71 ++--- 1 file changed, 14 insertions(+), 57 deletions(-) diff --git a/drivers/staging/rdma/amso1

[PATCH 08/10] ehca: stop using struct ib_phys_buf

2015-12-18 Thread Christoph Hellwig
And simplify the calling convention for full-memory registrations. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe [core] Reviewed-by: Steve Wise --- drivers/staging/rdma/ehca/ehca_classes.h | 5 +- drivers/staging/rdma/ehca/ehca_mrmw.c| 94 ++

[PATCH 10/10] IB: remove the unused usecnt field from struct ib_mr

2015-12-18 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/infiniband/core/uverbs_cmd.c| 6 -- drivers/infiniband/core/verbs.c | 8 +--- drivers/infiniband/hw/cxgb3/iwch_provider.c | 3 --- drivers/infiniband/hw/cxgb4/mem.c | 3 --- drivers/staging/rdma/ehca/ehca_mrmw.c

[PATCH 09/10] IB: remove the struct ib_phys_buf definition

2015-12-18 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe [core] Reviewed-by: Steve Wise --- 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 ea093ee..284916d 100644 --- a/incl

[PATCH] rds: use local_dma_lkey

2015-12-18 Thread Christoph Hellwig
We now alwasy have a per-PD local_dma_lkey available. Make use of that fact in rds and stop registering our own MR. Signed-off-by: Christoph Hellwig --- drivers/staging/rdma/ehca/ehca_mrmw.c | 1 - net/rds/iw.c | 19 +-- net/rds/iw.h

Re: [PATCH rdma-next V1 0/7] dev attr cleanup (less is more)

2015-12-18 Thread Bart Van Assche
On 12/18/2015 09:59 AM, Or Gerlitz wrote: OK, Doug, this is my suggestion for the dev attr cleanup -- it has the advantages of leaving the attrs on a well defined location, a field in the IB device, the ability to get that through smaller patches, avoid touching any of the HW drivers, etc. Hel

Re: [PATCH rdma-next V1 3/7] IB/ulps: Avoid calling ib_query_device

2015-12-18 Thread Bart Van Assche
On 12/18/2015 09:59 AM, Or Gerlitz wrote: Instead, use the cached copy of the attributes present on the device. Signed-off-by: Or Gerlitz --- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 19 --- drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 14 +++-- drivers/infiniband/ulp/ip

Re: [PATCH 10/10] IB: remove the unused usecnt field from struct ib_mr

2015-12-18 Thread Bart Van Assche
On 12/18/2015 02:55 PM, Christoph Hellwig wrote: Signed-off-by: Christoph Hellwig Shouldn't the description of this patch be changed into something like "Remove the usecnt field from ib_mr since it is always zero" ? Anyway: Reviewed-by: Bart Van Assche -- To unsubscribe from this list: se

Re: [Cocci] [PATCH] staging/rdma/hfi1: Fix a possible null pointer dereference

2015-12-18 Thread Nicholas Mc Guire
On Fri, Dec 18, 2015 at 07:33:36AM +0100, Julia Lawall wrote: > > > On Mon, 14 Dec 2015, Nicholas Mc Guire wrote: > > > On Thu, Dec 10, 2015 at 11:13:38AM -0500, Mike Marciniszyn wrote: > > > From: Easwar Hariharan > > > > > > A code inspection pointed out that kmalloc_array may return NULL an

Re: [PATCH 3/3] bject: IB Core: Display extended counter set if available

2015-12-18 Thread Christoph Lameter
On Fri, 18 Dec 2015, Hal Rosenstock wrote: > > This case would then use the 64 bit counters despite of the > > IB_PMA_CLASS_CAP_EXT_WIDTH not being set. > > Yes, IB_PMA_CLASS_CAP_EXT_WIDTH means all extended counters including > IETF ones whereas IB_PMA_CLASS_CAP_EXT_WIDTH_NOIETF means extended >

Re: [PATCH 3/3] bject: IB Core: Display extended counter set if available

2015-12-18 Thread Hal Rosenstock
On 12/18/2015 10:46 AM, Christoph Lameter wrote: > Subject: IB core counters: Support noietf extended counters V2 > > V1-V2: Fix logic to detect when 64 bit counter are available > based on Hal's suggestions. > > Detect if we have extended counters but not IETF counters. > For that we need

Re: [PATCH rdma-next 1/6] IB/core: Save the device attributes on the device structure

2015-12-18 Thread Jason Gunthorpe
On Fri, Dec 18, 2015 at 10:08:41AM +0200, Or Gerlitz wrote: > On 12/17/2015 7:41 PM, Jason Gunthorpe wrote: > >On Thu, Dec 17, 2015 at 03:44:19PM +0200, Sagi Grimberg wrote: > >>>+ ret = ib_query_device(device, &device->attrs); > >>>+ if (ret) { > >>>+ printk(KERN_WARNING "Couldn't query

[ANNOUNCE] libcxgb4-1.3.6 release

2015-12-18 Thread Steve Wise
Hello, A new release of libcxgb4, version 1.3.6, is available at: https://www.openfabrics.org/downloads/cxgb4/libcxgb4-1.3.6.tar.gz with md5sum: 129b8cd955c6de29258697f98dfbb351 libcxgb4-1.3.6.tar.gz I also pushed this to: git://git.openfabrics.org/~swise/libcxgb4 The tag is named v1.3.6.

Re: [PATCH 2/3] staging/rdma/hfi1: Fix module parameter spelling

2015-12-18 Thread Jubin John
On Fri, Dec 18, 2015 at 09:42:20AM +0300, Dan Carpenter wrote: > Nice. Whenever you see a bug like this, you should report it to > kernel-janitors because you know that 10 other people have made the same > mistake. Sure, I will do that for similar bugs. > > I will take care of it. Thank you. >

Re: [PATCH rdma-next 1/6] IB/core: Save the device attributes on the device structure

2015-12-18 Thread ira.weiny
On Fri, Dec 18, 2015 at 11:01:24AM +0200, Or Gerlitz wrote: > On Fri, Dec 18, 2015 at 7:16 AM, ira.weiny wrote: > > > More than anything what I hate is all the places that allocate struct > > ib_device_attr just to free it after the query call. > > did you care to look on patches 2-6, this is ex