Re: [PATCH] infiniband: hw: hfi1: constify mmu_notifier_ops structure

2016-11-22 Thread ira.weiny
On Sat, Nov 19, 2016 at 03:17:48PM +0530, Bhumika Goyal wrote: > Declare the structure mmu_notifier_ops as const as it is only stored in > the ops field of a mmu_notifier structure. The ops field is of type > const struct mmu_notifier_ops *, so mmu_notifier_ops structures having > this property can

Re: [PATCH 0252/1285] Replace numeric parameter like 0444 with macro

2016-08-03 Thread ira.weiny
On Tue, Aug 02, 2016 at 06:53:28PM +0800, Baole Ni wrote: > I find that the developers often just specified the numeric value > when calling a macro which is defined with a parameter for access permission. > As we know, these numeric value for access permission have had the > corresponding macro,

Re: [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands

2016-05-13 Thread ira.weiny
On Thu, May 12, 2016 at 01:40:06PM -0600, Jason Gunthorpe wrote: > On Thu, May 12, 2016 at 03:27:27PM -0400, Dennis Dalessandro wrote: > > > >>+static inline int check_ioctl_access(unsigned int cmd, unsigned long arg) > > >>+{ > > >>+ int read_cmd, write_cmd, read_ok, write_ok; > > >>+ > > >>+ rea

Re: [PATCH][V2] IB/sysfs: remove unused va_list args

2016-01-25 Thread ira.weiny
On Mon, Jan 25, 2016 at 06:38:06PM +, Colin King wrote: > From: Colin Ian King > > _show_port_gid_attr performs a va_end on some unused va_list args. > Clean this up by removing the args completely. > > Fixes: 470be516a226e8 ("IB/core: Add gid attributes to sysfs") > Signed-off-by: Colin Ian

Re: [PATCH] IB/sysfs: remove unused va_list args

2016-01-25 Thread ira.weiny
On Mon, Jan 25, 2016 at 05:23:47PM +, Colin King wrote: > From: Colin Ian King > > _show_port_gid_attr performs a va_end on some unused va_list args. > Clean this up by removing the args completely. > > Signed-off-by: Colin Ian King Reviewed-by: Ira Weiny > --- > drivers/infiniband/core

Re: [PATCH RESEND] infiniband:core:Add needed error path in cm_init_av_by_path

2015-12-15 Thread ira.weiny
On Tue, Dec 15, 2015 at 10:30:22AM -0700, Jason Gunthorpe wrote: > On Tue, Dec 15, 2015 at 05:38:34PM +0100, Michael Wang wrote: > > The hop_limit is only suggest that the package allowed to be > > routed, not have to, correct? > > If the hop limit is >= 2 (?) then the GRH is mandatory. Yes >= 2.

Re: [BUG] IB/hfi1: might sleep under spinlock in hfi1_ioctl()

2015-11-10 Thread ira.weiny
On Fri, Oct 30, 2015 at 07:58:18PM -0400, ira. weiny wrote: > On Sat, Oct 31, 2015 at 12:32:29AM +0300, Alexey Khoroshilov wrote: > > Hello, > > > > hfi1_ioctl() contains many calls to might sleep functions with > > dd->hfi1_snoop.snoop_lock spinlock held (for example, access_ok, > > copy_from_use

Re: [PATCH 1/1] staging: rdma: hfi1 : Prefer using the BIT macro

2015-11-05 Thread ira.weiny
On Thu, Nov 05, 2015 at 05:28:03PM +0530, Sunny Kumar wrote: > This patch replaces bit shifting on 1 with the BIT(x) macro > > Signed-off-by: Sunny Kumar Also, NAK as has been covered in other responses. However, I wanted to add, similar to the hfi1_ioctl fix, we have follow on checkpatch patch

Re: [BUG] IB/hfi1: might sleep under spinlock in hfi1_ioctl()

2015-10-30 Thread ira.weiny
On Sat, Oct 31, 2015 at 12:32:29AM +0300, Alexey Khoroshilov wrote: > Hello, > > hfi1_ioctl() contains many calls to might sleep functions with > dd->hfi1_snoop.snoop_lock spinlock held (for example, access_ok, > copy_from_user, kzalloc(GFP_KERNEL), etc.). > > Should dd->hfi1_snoop.snoop_lock be

Re: [PATCH] IB/sa: replace GFP_KERNEL with GFP_ATOMIC

2015-10-27 Thread ira.weiny
On Tue, Oct 27, 2015 at 12:16:52PM -0600, Jason Gunthorpe wrote: > On Tue, Oct 27, 2015 at 02:12:36PM -0400, ira.weiny wrote: > > On Tue, Oct 27, 2015 at 09:17:40PM +0530, Saurabh Sengar wrote: > > > replace GFP_KERNEL with GFP_ATOMIC, as code while holding a spinlock >

Re: [PATCH] IB/sa: replace GFP_KERNEL with GFP_ATOMIC

2015-10-27 Thread ira.weiny
On Tue, Oct 27, 2015 at 09:17:40PM +0530, Saurabh Sengar wrote: > replace GFP_KERNEL with GFP_ATOMIC, as code while holding a spinlock > should be atomic > GFP_KERNEL may sleep and can cause deadlock, where as GFP_ATOMIC may > fail but certainly avoids deadlock Great catch. Thanks! However, gfp_

Re: [PATCH v8 00/23] IB/Verbs: IB Management Helpers

2015-05-11 Thread ira.weiny
I have run with this series and the only issue I have found is not with this patch set directly. This patch: > IB/Verbs: Use management helper rdma_cap_ib_mad() causes an error when you actually use the port passed from the ib_umad module. I have a patch to fix that which I found while trying

Re: [PATCH] MAINTAINERS: add include/rdma/ to InfiniBand subsystem

2015-05-04 Thread ira.weiny
On Mon, May 04, 2015 at 02:31:03PM +0200, Yann Droneaud wrote: > Most headers for InfiniBand/RDMA are located under > include/rdma/ and include/uapi/rdma. > > Signed-off-by: Yann Droneaud Reviewed-by: Ira Weiny > --- > Hi, > > While checking if Doug Ledford was added as maintainer for IB subs

Re: [PATCH v7 00/23] IB/Verbs: IB Management Helpers

2015-04-30 Thread ira.weiny
On Tue, Apr 28, 2015 at 05:10:00PM +0200, Michael Wang wrote: > Since v6: > * Thanks to Ira, Devesh for the review and testing :-) > * Thanks for the comments from Sean, Tom, Jason, Doug, Devesh, Ira, > Liran :-) Please remind me if anything missed :-P > * Use query_protocol() and enum pr

Re: [PATCH v6 01/26] IB/Verbs: Implement new callback query_transport()

2015-04-27 Thread ira.weiny
On Mon, Apr 27, 2015 at 09:39:05AM +0200, Michael Wang wrote: > > > On 04/24/2015 05:12 PM, Liran Liss wrote: > >> From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > >> > > [snip] > >> a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index > >> 65994a1..d54f91e 100644 > >> --- a/incl

Re: [PATCH v5 00/27] IB/Verbs: IB Management Helpers

2015-04-27 Thread ira.weiny
On Fri, Apr 24, 2015 at 02:53:37PM +, Liran Liss wrote: > > From: ira.weiny [mailto:ira.we...@intel.com] > > [snip] > > > > > > > > > > 2)The name rdma_tech_* is lame. > > > > rdma_transport_*(), adhering to the above (*) remark, is much

Re: [PATCH v5 00/27] IB/Verbs: IB Management Helpers

2015-04-27 Thread ira.weiny
On Fri, Apr 24, 2015 at 02:44:29PM +, Liran Liss wrote: > > From: Michael Wang [mailto:yun.w...@profitbricks.com] > > > > [snip] > > > > > > Depends on who is "we". > > > For ULPs, you are probably right. > > > > > > However, core services (e.g., mad management, CM, SA) do care about > > vari

Re: [PATCH v5 00/27] IB/Verbs: IB Management Helpers

2015-04-27 Thread ira.weiny
On Fri, Apr 24, 2015 at 10:42:26AM -0600, Jason Gunthorpe wrote: > On Fri, Apr 24, 2015 at 03:00:15PM +, Liran Liss wrote: > > > Currently, the only code in the kernel that has an SMI interface is IB. > > When OPA is introduced, add the proper helper. > > We already have tests checking for SM

Re: [PATCH v5 00/27] IB/Verbs: IB Management Helpers

2015-04-22 Thread ira.weiny
On Wed, Apr 22, 2015 at 10:59:52AM -0400, Doug Ledford wrote: > On Tue, 2015-04-21 at 23:36 +, Liran Liss wrote: [snip] > > > > 2)The name rdma_tech_* is lame. > > rdma_transport_*(), adhering to the above (*) remark, is much better. > > For example, both IB and ROCE *do* use the same transp

Re: [PATCH v5 22/27] IB/Verbs: Use management helper cap_ipoib()

2015-04-22 Thread ira.weiny
On Wed, Apr 22, 2015 at 10:49:44AM +0200, Michael Wang wrote: > > On 04/22/2015 07:40 AM, Jason Gunthorpe wrote: > > On Mon, Apr 20, 2015 at 10:41:38AM +0200, Michael Wang wrote: > > > >> Introduce helper cap_ipoib() to help us check if the port of an > >> IB device support IP over Infiniband. >

Re: [PATCH v5 09/27] IB/Verbs: Reform IB-core verbs/uverbs_cmd/sysfs

2015-04-22 Thread ira.weiny
On Wed, Apr 22, 2015 at 09:38:57AM +0200, Michael Wang wrote: > Hi, Ira > > Thanks for the review :-) > > On 04/22/2015 01:19 AM, ira.weiny wrote: > [snip] > >> diff --git a/drivers/infiniband/core/sysfs.c > >> b/drivers/infiniband/core/sysfs.c > >

Re: [PATCH v5 01/27] IB/Verbs: Implement new callback query_transport()

2015-04-22 Thread ira.weiny
On Wed, Apr 22, 2015 at 03:21:43PM +, Devesh Sharma wrote: > > -Original Message- > > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > > ow...@vger.kernel.org] On Behalf Of Doug Ledford > > Sent: Wednesday, April 22, 2015 8:33 PM > > To: Michael Wang > > Cc: Roland Dreier; S

Re: [PATCH v5 00/27] IB/Verbs: IB Management Helpers

2015-04-21 Thread ira.weiny
On Tue, Apr 21, 2015 at 11:36:40PM +, Liran Liss wrote: > Hi Michael, > > The spirit of this patch-set is great, but I think that we need to clarify > some concepts. > Since this will affect the whole patch-set, I am laying out my concerns here > instead. > > A suggestion for the resulting

Re: [PATCH v5 00/27] IB/Verbs: IB Management Helpers

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:28:57AM +0200, Michael Wang wrote: > > Since v4: > * Thanks for the comments from Hal, Sean, Tom, Or Gerlitz, Jason, > Roland, Ira and Steve :-) Please remind me if anything missed :-P > * Fix logical issue inside 3#, 14# > * Refine 3#, 4#, 5# with label 'free'

Re: [PATCH v5 26/27] IB/Verbs: Clean up rdma_ib_or_iboe()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:43:26AM +0200, Michael Wang wrote: > > We have finished introducing the cap_XX(), and raw helper rdma_ib_or_iboe() > is no longer necessary, thus clean it up. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ir

Re: [PATCH v5 27/27] IB/Verbs: Cleanup rdma_node_get_transport()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:43:51AM +0200, Michael Wang wrote: > > We have get rid of all the scene using legacy rdma_node_get_transport(), > now clean it up. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty >

Re: [PATCH v5 24/27] IB/Verbs: Use management helper cap_af_ib()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:42:33AM +0200, Michael Wang wrote: > > Introduce helper cap_af_ib() to help us check if the port of an > IB device support Native Infiniband Address. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny

Re: [PATCH v5 25/27] IB/Verbs: Use management helper cap_eth_ah()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:43:03AM +0200, Michael Wang wrote: > > Introduce helper cap_eth_ah() to help us check if the port of an > IB device support Ethernet Address Handler. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny

Re: [PATCH v5 21/27] IB/Verbs: Use management helper cap_ib_mcast()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:41:14AM +0200, Michael Wang wrote: > > Introduce helper cap_ib_mcast() to help us check if the port of an > IB device support Infiniband Multicast. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny >

Re: [PATCH v5 23/27] IB/Verbs: Use management helper cap_read_multi_sge()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:42:07AM +0200, Michael Wang wrote: > > Introduce helper cap_read_multi_sge() to help us check if the port of an > IB device support RDMA Read Multiple Scatter-Gather Entries. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug L

Re: [PATCH v5 22/27] IB/Verbs: Use management helper cap_ipoib()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:41:38AM +0200, Michael Wang wrote: > > Introduce helper cap_ipoib() to help us check if the port of an > IB device support IP over Infiniband. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: S

Re: [PATCH v5 20/27] IB/Verbs: Use management helper cap_ib_sa()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:40:50AM +0200, Michael Wang wrote: > > Introduce helper cap_ib_sa() to help us check if the port of an > IB device support Infiniband Subnet Administration. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira

Re: [PATCH v5 19/27] IB/Verbs: Use management helper cap_iw_cm()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:40:27AM +0200, Michael Wang wrote: > > Introduce helper cap_iw_cm() to help us check if the port of an > IB device support IWARP Communication Manager. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny

Re: [PATCH v5 18/27] IB/Verbs: Use management helper cap_ib_cm()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:40:04AM +0200, Michael Wang wrote: > > Introduce helper cap_ib_cm() to help us check if the port of an > IB device support Infiniband Communication Manager. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira

Re: [PATCH v5 17/27] IB/Verbs: Use management helper cap_ib_smi()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:39:37AM +0200, Michael Wang wrote: > > Introduce helper cap_ib_smi() to help us check if the port of an > IB device support Infiniband Subnet Management Interface. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > C

Re: [PATCH v5 16/27] IB/Verbs: Use management helper cap_ib_mad()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:39:12AM +0200, Michael Wang wrote: > > Introduce helper cap_ib_mad() to help us check if the port of an > IB device support Infiniband Management Datagrams. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira

Re: [PATCH v5 15/27] IB/Verbs: Reform rest part in IB-core cma

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:38:49AM +0200, Michael Wang wrote: > > Use raw management helpers to reform rest part in IB-core cma. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Michael Wang

Re: [PATCH v5 14/27] IB/Verbs: Reform cma_acquire_dev()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:38:23AM +0200, Michael Wang wrote: > > Reform cma_acquire_dev() with management helpers, introduce > cma_validate_port() to make the code more clean. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny

Re: [PATCH v5 13/27] IB/Verbs: Reserve legacy transport type in 'dev_addr'

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:38:00AM +0200, Michael Wang wrote: > > Reserve the legacy transport type for the 'transport' member > of 'struct rdma_dev_addr' until we make sure this is no > longer needed. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug L

Re: [PATCH v5 12/27] IB/Verbs: Reform mcast related part in IB-core cma

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:37:35AM +0200, Michael Wang wrote: > > Use raw management helpers to reform mcast related part in IB-core cma. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Mich

Re: [PATCH v5 11/27] IB/Verbs: Reform route related part in IB-core cma

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:37:13AM +0200, Michael Wang wrote: > > Use raw management helpers to reform route related part in IB-core cma. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Mich

Re: [PATCH v5 10/27] IB/Verbs: Reform cm related part in IB-core cma/ucm

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:36:36AM +0200, Michael Wang wrote: > > Use raw management helpers to reform cm related part in IB-core cma/ucm. > > Few checks focus on the device cm type rather than the port capability, > directly pass port 1 works currently, but can't support mixing cm type > device

Re: [PATCH v5 08/27] IB/Verbs: Reform IB-ulp xprtrdma

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:35:47AM +0200, Michael Wang wrote: > > Use raw management helpers to reform IB-ulp xprtrdma. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Michael Wang Reviewe

Re: [PATCH v5 06/27] IB/Verbs: Reform IB-core multicast

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:34:48AM +0200, Michael Wang wrote: > > Use raw management helpers to reform IB-core multicast. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Michael Wang Revie

Re: [PATCH v5 04/27] IB/Verbs: Reform IB-core cm

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:33:45AM +0200, Michael Wang wrote: > > Use raw management helpers to reform IB-core cm. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Michael Wang Reviewed-by:

Re: [PATCH v5 02/27] IB/Verbs: Implement raw management helpers

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:32:32AM +0200, Michael Wang wrote: > > Add raw helpers: > rdma_tech_ib > rdma_tech_iboe > rdma_tech_iwarp > rdma_ib_or_iboe (transition, clean up later) > To help us detect which technology the port supported. > > Cc: Hal Rosenstock > Cc: Steve

Re: [PATCH v5 05/27] IB/Verbs: Reform IB-core sa_query

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:34:23AM +0200, Michael Wang wrote: > > Use raw management helpers to reform IB-core sa_query. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Michael Wang > Revi

Re: [PATCH v5 03/27] IB/Verbs: Reform IB-core mad/agent/user_mad

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:33:11AM +0200, Michael Wang wrote: > > Use raw management helpers to reform IB-core mad/agent/user_mad. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Michael Wan

Re: [PATCH v5 07/27] IB/Verbs: Reform IB-ulp ipoib

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:35:15AM +0200, Michael Wang wrote: > > Use raw management helpers to reform IB-ulp ipoib. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Michael Wang Reviewed-b

Re: [PATCH v5 01/27] IB/Verbs: Implement new callback query_transport()

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:32:01AM +0200, Michael Wang wrote: > > Add new callback query_transport() and implement for each HW. > > Mapping List: > node-type link-layer old-transport new-transport > nes RNICETH IWARP IWARP > a

Re: [PATCH v5 09/27] IB/Verbs: Reform IB-core verbs/uverbs_cmd/sysfs

2015-04-21 Thread ira.weiny
On Mon, Apr 20, 2015 at 10:36:12AM +0200, Michael Wang wrote: > > Use raw management helpers to reform IB-core verbs/uverbs_cmd/sysfs. > > Cc: Hal Rosenstock > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Michael

Re: [PATCH v3 01/28] IB/Verbs: Implement new callback query_transport()

2015-04-15 Thread ira.weiny
On Wed, Apr 15, 2015 at 01:29:31PM -0600, Hefty, Sean wrote: > > libibverbs also exposes transport at the device level. Isn't a change to > > make transport per port rather than per device needed there as well to > > be consistent with these proposed kernel changes ? If so, would the > > additional

Re: [PATCH v3 01/28] IB/Verbs: Implement new callback query_transport()

2015-04-15 Thread ira.weiny
On Wed, Apr 15, 2015 at 02:36:13PM -0400, Hal Rosenstock wrote: > On 4/13/2015 8:22 AM, Michael Wang wrote: > > diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h > > index 65994a1..d54f91e 100644 > > --- a/include/rdma/ib_verbs.h > > +++ b/include/rdma/ib_verbs.h > > @@ -75,10 +75,13 @

Re: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib

2015-04-14 Thread ira.weiny
On Tue, Apr 14, 2015 at 11:25:15AM -0600, Jason Gunthorpe wrote: > On Tue, Apr 14, 2015 at 10:18:07AM -0400, ira.weiny wrote: > > > After more thought and reading other opinions, I must agree we should not > > have cap_foo_dev. > > I looked at it a bit, and I think Sean

Re: [PATCH v3 10/28] IB/Verbs: Reform cm related part in IB-core cma

2015-04-14 Thread ira.weiny
On Tue, Apr 14, 2015 at 10:35:34AM +0200, Michael Wang wrote: > > > On 04/13/2015 09:25 PM, Hefty, Sean wrote: > >> @@ -1037,17 +1033,13 @@ void rdma_destroy_id(struct rdma_cm_id *id) > >>mutex_unlock(&id_priv->handler_mutex); > >> > >>if (id_priv->cma_dev) { > >> - switch (rdma_

Re: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib

2015-04-14 Thread ira.weiny
On Tue, Apr 14, 2015 at 04:32:57PM +0200, Michael Wang wrote: > > > On 04/14/2015 04:18 PM, ira.weiny wrote: > [snip] > > > > /** > > - * cap_ib_cm_dev - Check if any port of device has the capability > > Infiniband > > - * Communication Manager.

Re: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib

2015-04-14 Thread ira.weiny
On Mon, Apr 13, 2015 at 02:01:38PM -0600, Jason Gunthorpe wrote: > On Mon, Apr 13, 2015 at 03:46:03PM -0400, ira.weiny wrote: > > > > This doesn't quite look right, it should be 'goto error1' > > > > Looks like you replied to the wrong patch. ??

Re: [PATCH v3 04/28] IB/Verbs: Reform IB-core cm

2015-04-13 Thread ira.weiny
On Mon, Apr 13, 2015 at 01:29:30PM -0600, Jason Gunthorpe wrote: > On Mon, Apr 13, 2015 at 06:40:35PM +, Hefty, Sean wrote: > > > > - if (rdma_node_get_transport(ib_device->node_type) != > > > RDMA_TRANSPORT_IB) > > > > - return; > > > > + int count = 0; > > > > > > I

Re: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib

2015-04-13 Thread ira.weiny
On Mon, Apr 13, 2015 at 01:27:01PM -0600, Jason Gunthorpe wrote: > On Mon, Apr 13, 2015 at 02:25:16PM +0200, Michael Wang wrote: > > dev_list = kmalloc(sizeof *dev_list, GFP_KERNEL); > > if (!dev_list) > > @@ -1673,13 +1671,19 @@ static void ipoib_add_one(struct ib_device *device) > > }

Re: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib

2015-04-13 Thread ira.weiny
On Mon, Apr 13, 2015 at 02:25:16PM +0200, Michael Wang wrote: > > Use raw management helpers to reform IB-ulp ipoib. > > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Michael Wang > --- > drivers/infiniband/ulp/i

Re: [PATCH v3 05/28] IB/Verbs: Reform IB-core sa_query

2015-04-13 Thread ira.weiny
On Mon, Apr 13, 2015 at 02:24:18PM +0200, Michael Wang wrote: > > Use raw management helpers to reform IB-core sa_query. > > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Michael Wang > --- > drivers/infiniband/c

Re: [PATCH v3 04/28] IB/Verbs: Reform IB-core cm

2015-04-13 Thread ira.weiny
On Mon, Apr 13, 2015 at 02:23:46PM +0200, Michael Wang wrote: > > Use raw management helpers to reform IB-core cm. > > Cc: Steve Wise > Cc: Tom Talpey > Cc: Jason Gunthorpe > Cc: Doug Ledford > Cc: Ira Weiny > Cc: Sean Hefty > Signed-off-by: Michael Wang > --- > drivers/infiniband/core/cm

Re: [PATCH v2 01/17] IB/Verbs: Implement new callback query_transport() for each HW

2015-04-10 Thread ira.weiny
On Fri, Apr 10, 2015 at 01:17:23PM -0600, Jason Gunthorpe wrote: > On Fri, Apr 10, 2015 at 02:24:26PM -0400, Doug Ledford wrote: > > > IPoIB is more than just an ULP. It's a spec. And it's very IB > > specific. It will only work with OPA because OPA is imitating IB. > > To run it on another fab

Re: [PATCH v2 01/17] IB/Verbs: Implement new callback query_transport() for each HW

2015-04-10 Thread ira.weiny
On Fri, Apr 10, 2015 at 12:04:55PM -0600, Jason Gunthorpe wrote: > On Fri, Apr 10, 2015 at 01:38:38PM -0400, ira.weiny wrote: > > > > > I don't think that is appropriate. You have been advocating that the checks > > be clear as to what support we need. > >

Re: [PATCH v2 10/17] IB/Verbs: Adopt management helpers for IB helpers

2015-04-08 Thread ira.weiny
On Tue, Apr 07, 2015 at 03:16:30PM -0500, Steve Wise wrote: > > > > -Original Message- > > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] > > Sent: Tuesday, April 07, 2015 3:13 PM > > To: Michael Wang > > Cc: Roland Dreier; Sean Hefty; linux-r...@vger.kernel.org; > > linu

Re: [RFC PATCH 00/11] IB/Verbs: IB Management Helpers

2015-04-06 Thread ira.weiny
On Fri, Mar 27, 2015 at 04:39:54PM +0100, Michael Wang wrote: > > There are plenty of lengthy code to check the transport type of IB device, > or the link layer type of it's port, but actually we are just speculating > whether a particular management is supported by the device/port. Michael, The

Re: [RFC PATCH 06/11] IB/Verbs: Use management helper has_sa() and cap_sa(), for sa-check

2015-03-31 Thread ira.weiny
On Tue, Mar 31, 2015 at 05:12:02PM -0600, Jason Gunthorpe wrote: > On Mon, Mar 30, 2015 at 01:02:03PM -0400, Doug Ledford wrote: > > > If we use something like this, then the above is all you need. Then > > every place in the code that checks for something like has_sa or cap_sa > > can be replace

Re: [RFC PATCH 07/11] IB/Verbs: Use management helper has_mcast() and, cap_mcast() for mcast-check

2015-03-30 Thread ira.weiny
On Mon, Mar 30, 2015 at 06:20:48PM +0200, Michael Wang wrote: > On 03/30/2015 06:11 PM, Doug Ledford wrote: > > On Fri, 2015-03-27 at 16:46 +0100, Michael Wang wrote: > >> Introduce helper has_mcast() and cap_mcast() to help us check if an > >> IB device or it's port support Multicast. > > This pro

Re: [RFC PATCH 08/11] IB/Verbs: Use management helper has_iwarp() for, iwarp-check

2015-03-27 Thread ira.weiny
On Fri, Mar 27, 2015 at 10:13:19AM -0600, Jason Gunthorpe wrote: > On Fri, Mar 27, 2015 at 04:47:36PM +0100, Michael Wang wrote: > > > > Introduce helper has_iwarp() to help us check if an IB device > > support IWARP protocol. > > Should probably be !has_rdma_read_sges() > > True if the device c

Re: [RFC PATCH 07/11] IB/Verbs: Use management helper has_mcast() and, cap_mcast() for mcast-check

2015-03-27 Thread ira.weiny
On Fri, Mar 27, 2015 at 10:28:20AM -0600, Jason Gunthorpe wrote: > On Fri, Mar 27, 2015 at 04:46:57PM +0100, Michael Wang wrote: > > > > Introduce helper has_mcast() and cap_mcast() to help us check if an > > IB device or it's port support Multicast. > > > > Cc: Jason Gunthorpe > > Cc: Doug Ledf

Re: [RFC PATCH 06/11] IB/Verbs: Use management helper has_sa() and cap_sa(), for sa-check

2015-03-27 Thread ira.weiny
On Fri, Mar 27, 2015 at 04:46:11PM +0100, Michael Wang wrote: > > Introduce helper has_sa() and cap_sa() to help us check if an IB device > or it's port support Subnet Administrator. I think these 2 should be combined. The question is if a port requires the use of the SA depending on the network