Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755905AbbDNPk2 (ORCPT ); Tue, 14 Apr 2015 11:40:28 -0400 Received: from mga09.intel.com ([134.134.136.24]:41216 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753701AbbDNPkW (ORCPT ); Tue, 14 Apr 2015 11:40:22 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,576,1422950400"; d="scan'208";a="695116462" Date: Tue, 14 Apr 2015 11:40:13 -0400 From: "ira.weiny" To: Michael Wang Cc: Jason Gunthorpe , 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 Message-ID: <20150414154012.GA13852@phlsvsds.ph.intel.com> 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> <552D2519.6000500@profitbricks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <552D2519.6000500@profitbricks.com> User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1358 Lines: 38 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. > > + * 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. But that moves us in the wrong direction. If we later support port 2 without port 1 that code will be broken. Ira -- 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/