[PATCH for-next] iw_cxgb3: Ignore positive return values from the ofld send functions

2015-12-11 Thread Hariprasad Shenai
The cxgb3_*_send() functions return NET_XMIT_ values, which are positive integers values. So don't treat positive return values as an error. Signed-off-by: Steve Wise Signed-off-by: Hariprasad Shenai --- drivers/infiniband/hw/cxgb3/iwch_cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

[PATCH] staging/rdma/hfi1: Change num_rcv_contexts to num_user_contexts and its meaning

2015-12-11 Thread Mike Marciniszyn
From: Sebastian Sanchez num_rcv_contexts sets the number of user contexts, both receive and send. Renaming it to num_user_contexts makes sense to reflect its true meaning. When num_rcv_contexts is 0, the default behavior is the number of CPU cores instead of 0 contexts. This commit changes the va

Re: [PATCH 02/37] IB/rdmavt: Consolidate dma ops in rdmavt.

2015-12-11 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 11:02:02PM -0700, Jason Gunthorpe wrote: > > FYI, I have a patch series in linux-next to switches all remaining > > architectures to use get_dma_ops, and there are plans to allow generic > > per-device dma_ops based on that. > > Great, so once that is merged we can drop the

Re: [PATCH 07/13] IB: add a proper completion queue abstraction

2015-12-11 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 10:42:22AM -0800, Bart Van Assche wrote: >> +struct ib_cq *ib_alloc_cq(struct ib_device *dev, void *private, >> +int nr_cqe, int comp_vector, enum ib_poll_context poll_ctx) >> +{ > > [ ... ] >> +cq->wc = kmalloc_array(IB_POLL_BATCH, sizeof(*cq->wc), GFP_KERNE

Re: [PATCH 10/13] IB/srp: use the new CQ API

2015-12-11 Thread Christoph Hellwig
Hi Bart, thanks for all the reviews. I've updated the git branch with your suggestions and reviewed-by tags. I'm going to wait a little bit longer for other reviews to come in before reposting the series. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a m

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-11 Thread Doug Ledford
On 12/11/2015 01:14 AM, Jason Gunthorpe wrote: > On Thu, Dec 10, 2015 at 11:56:50PM -0500, Doug Ledford wrote: > >> Looking at struct netdevice, it has the sort of organization I would >> call reasonable. Things like struct tx_stats is a struct, even though >> it's embedded in the parent struct a

Re: [PATCH 10/13] IB/srp: use the new CQ API

2015-12-11 Thread Doug Ledford
On 12/11/2015 09:22 AM, Christoph Hellwig wrote: > Hi Bart, > > thanks for all the reviews. I've updated the git branch with your > suggestions and reviewed-by tags. I'm going to wait a little bit > longer for other reviews to come in before reposting the series. Indeed, thanks for all the catc

[PATCH 2/2] ipoib mcast sendonly join: Move multicast specific code out of ipoib_main.c.

2015-12-11 Thread Christoph Lameter
Code cleanup to move multicast specific code that checks for a sendonly join to ipoib_multicast.c. This allows the removal of the export of __ipoib_mcast_find(). Signed-off-by: Christoph Lameter --- drivers/infiniband/ulp/ipoib/ipoib.h | 3 ++- drivers/infiniband/ulp/ipoib/ipoib_main.

[PATCH 1/2] ipoib mcast sendonly join: Isolate common list remove code

2015-12-11 Thread Christoph Lameter
Code cleanup to remove multicast specific code from ipoib_main.c The removal of a list of multicast groups occurs in three places. Create a new function ipoib_mcast_remove_list(). Use this new function in ipoib_main.c too. That in turn allows the dropping of two functions that were exported from i

[PATCH 0/2] IB multicast cleanup patches

2015-12-11 Thread Christoph Lameter
This patchset cleans up the code a bit after the last round of multicast patches related to the sendonly join logic. Some of the bits of code landed in ipoib_main.c instead of ipoib_multicast.c. - Move the multicast bits into that file so that everything is neatly together - Reduce the number of f

[PATCH 0/3] IB 64 bit counter support

2015-12-11 Thread Christoph Lameter
Currently we only use 32 bits for the packet and byte counters. There have been extended countes available for some time but we have no support for those yet upstream. We keep having issues with 32 bit counters wrapping. Especially the byte counter can wrap frequently (as in multiple times per minu

[PATCH 3/3] IB core: Display 64 bit counters from the extended set

2015-12-11 Thread Christoph Lameter
Display the additional 64 bit counters available through the extended set and replace the existing 32 bit counters if there is a 64 bit alternative available. Note: This requires universal support of extended counters in the devices. If there are still devices around that do not support extended c

[PATCH 2/3] IB core: Support 64 bit values in the port counters

2015-12-11 Thread Christoph Lameter
Add a branch to display 64 bit values Signed-off-by: Christoph Lameter --- drivers/infiniband/core/sysfs.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index 1c8716f..0083a4f 100644 --- a/drivers/infiniband/core/sysfs.

[PATCH 1/3] IB core: Allow specification of attr_id in PORT_PMA_ATTR macro

2015-12-11 Thread Christoph Lameter
This is necessary to support the extended attributes which involves a different attribute id. Signed-off-by: Christoph Lameter --- drivers/infiniband/core/sysfs.c | 41 ++--- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/drivers/infiniband/co

Re: [PATCH V3] IB/mlx4: Use vmalloc for WR buffers when needed

2015-12-11 Thread Matthew Finlay
Hi Wengang, I was going through your patch set here, and it seems that you missed changing kfree to kvfree in mlx4_ib_destroy_srq(). In the current code if the srq wrid is allocated using vmalloc, then on cleanup we will use kfree, which is a bug. Thanks, -matt On 10/7/15, 10:27 PM, "linux

Re: [PATCH 1/2] ipoib mcast sendonly join: Isolate common list remove code

2015-12-11 Thread ira.weiny
On Fri, Dec 11, 2015 at 12:16:53PM -0600, Christoph Lameter wrote: > Code cleanup to remove multicast specific code from ipoib_main.c > > The removal of a list of multicast groups occurs in three places. > Create a new function ipoib_mcast_remove_list(). Use this new > function in ipoib_main.c too

Re: [PATCH 2/2] ipoib mcast sendonly join: Move multicast specific code out of ipoib_main.c.

2015-12-11 Thread ira.weiny
On Fri, Dec 11, 2015 at 12:16:54PM -0600, Christoph Lameter wrote: > Code cleanup to move multicast specific code that checks for > a sendonly join to ipoib_multicast.c. This allows the removal > of the export of __ipoib_mcast_find(). > > Signed-off-by: Christoph Lameter > --- > drivers/infiniba

Re: [PATCH 2/2] ipoib mcast sendonly join: Move multicast specific code out of ipoib_main.c.

2015-12-11 Thread ira.weiny
On Fri, Dec 11, 2015 at 06:21:43PM -0500, ira. weiny wrote: > On Fri, Dec 11, 2015 at 12:16:54PM -0600, Christoph Lameter wrote: > > Code cleanup to move multicast specific code that checks for > > a sendonly join to ipoib_multicast.c. This allows the removal > > of the export of __ipoib_mcast_find

Re: [PATCH 1/3] IB core: Allow specification of attr_id in PORT_PMA_ATTR macro

2015-12-11 Thread ira.weiny
On Fri, Dec 11, 2015 at 12:25:33PM -0600, Christoph Lameter wrote: > This is necessary to support the extended attributes which involves > a different attribute id. > > Signed-off-by: Christoph Lameter Reviewed-by: Ira Weiny > --- > drivers/infiniband/core/sysfs.c | 41 >

Re: [PATCH 2/3] IB core: Support 64 bit values in the port counters

2015-12-11 Thread ira.weiny
On Fri, Dec 11, 2015 at 12:25:34PM -0600, Christoph Lameter wrote: > Add a branch to display 64 bit values > > Signed-off-by: Christoph Lameter Reviewed-by: Ira Weiny > --- > drivers/infiniband/core/sysfs.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/infiniband/core

Re: [PATCH 3/3] IB core: Display 64 bit counters from the extended set

2015-12-11 Thread ira.weiny
On Fri, Dec 11, 2015 at 12:25:35PM -0600, Christoph Lameter wrote: > Display the additional 64 bit counters available through the extended > set and replace the existing 32 bit counters if there is a 64 bit > alternative available. > > Note: This requires universal support of extended counters in

Re: [PATCH 3/3] IB core: Display 64 bit counters from the extended set

2015-12-11 Thread Jason Gunthorpe
> qib, mlx4 are fine. mlx5 should be as well I would think (I don't have that > hardware.) I have no specifics to add, but I keep running into systems, even today, where the 64 bit counters don't work. The MAD might be there, but several counters are wired to 0. Not sure exactly which HW though.

Re: [PATCH 3/3] IB core: Display 64 bit counters from the extended set

2015-12-11 Thread ira.weiny
On Fri, Dec 11, 2015 at 05:00:47PM -0700, Jason Gunthorpe wrote: > > FWIW, I also hate the sysfs counters that reflect the PMA, these would > be much better are free running, wrapping, non-resetting counters > unrelated to the PMA. Something that doesn't zero after the SM samples > it. Sounds like

Re: [PATCH 3/3] IB core: Display 64 bit counters from the extended set

2015-12-11 Thread Jason Gunthorpe
On Fri, Dec 11, 2015 at 07:23:13PM -0500, ira.weiny wrote: > On Fri, Dec 11, 2015 at 05:00:47PM -0700, Jason Gunthorpe wrote: > > > > FWIW, I also hate the sysfs counters that reflect the PMA, these would > > be much better are free running, wrapping, non-resetting counters > > unrelated to the PM

Re: [PATCH 3/3] IB core: Display 64 bit counters from the extended set

2015-12-11 Thread ira.weiny
On Fri, Dec 11, 2015 at 05:47:15PM -0700, Jason Gunthorpe wrote: > On Fri, Dec 11, 2015 at 07:23:13PM -0500, ira.weiny wrote: > > On Fri, Dec 11, 2015 at 05:00:47PM -0700, Jason Gunthorpe wrote: > > > > > > FWIW, I also hate the sysfs counters that reflect the PMA, these would > > > be much better

Re: [PATCH] IB/usnic: Handle 0 counts in resource allocation

2015-12-11 Thread Leon Romanovsky
> Thanks for looking at the code. I am still not understanding your point. >> Old code: >> usnic_vnic_res_free_cnt(vnic, type) == 0 and cnt == 1 will return EINVAL > Yes: > if (0 < 1 || 1 < 1 || !owner) > return -EINVAL; >> New code >> snic_vnic_res_free_cnt(vnic, type) ==