Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932531AbbDNOdL (ORCPT ); Tue, 14 Apr 2015 10:33:11 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:36102 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753606AbbDNOdG (ORCPT ); Tue, 14 Apr 2015 10:33:06 -0400 Message-ID: <552D2519.6000500@profitbricks.com> Date: Tue, 14 Apr 2015 16:32:57 +0200 From: Michael Wang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: "ira.weiny" , Jason Gunthorpe CC: Roland Dreier , Sean Hefty , Hal Rosenstock , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Tucker , Steve Wise , Hoang-Nam Nguyen , Christoph Raisch , Mike Marciniszyn , Eli Cohen , Faisal Latif , Jack Morgenstein , Or Gerlitz , Haggai Eran , Tom Talpey , Doug Ledford Subject: Re: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib References: <552BB470.4090407@profitbricks.com> <552BB5AC.6050101@profitbricks.com> <20150413192701.GA19112@obsidianresearch.com> <20150413194602.GA21467@phlsvsds.ph.intel.com> <20150413200138.GC19112@obsidianresearch.com> <20150414141806.GA7354@phlsvsds.ph.intel.com> In-Reply-To: <20150414141806.GA7354@phlsvsds.ph.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2028 Lines: 63 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. > + * cap_ib_cm_any_port - Check if any port of the device has Infiniband > + * Communication Manager (CM) support. > * > * @device: Device to be checked > * > - * Return 0 when all port of the device don't support Infiniband > - * Communication Manager. > + * Return 1 if any port of the device supports the IB CM. > */ > -static inline int cap_ib_cm_dev(struct ib_device *device) > +static inline int cap_ib_cm_any_port(struct ib_device *device) > { > int i; I think we maybe able to get rid of this helper according to Sean's suggestion :-) We just need to check the port 1 of HCA see if it support ib cm, seems like currently there is no case that port 1 support cm while others doesn't. Regards, Michael Wang > > >> >> That seems reasonable, and solves the #10 problem, but we should >> enforce this invariant during device register. >> >> Typically the ports seem to be completely orthogonal (like SA), so in those >> cases the _dev and restriction makes no sense. > > While the ports in ib_sa and ib_umad probably can be orthogonal the current > implementation does not support that and this patch series obscures that a bit. > >> >> CM seems to be different, so it should probably enforce its rules > > Technically, the implementation of the ib_sa and ib_umad modules are not > different it is just that Michaels patch is not broken. > > I'm not saying we can't change the ib_sa and ib_umad modules but the current > logic is all or nothing. And I think changing this : > > 1) require more review and testing > 2) is not the purpose of this series. > > Ira > >> >> Jason -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/