Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754710AbbDMSkn (ORCPT ); Mon, 13 Apr 2015 14:40:43 -0400 Received: from mga01.intel.com ([192.55.52.88]:8509 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754690AbbDMSkh convert rfc822-to-8bit (ORCPT ); Mon, 13 Apr 2015 14:40:37 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,571,1422950400"; d="scan'208";a="555367349" From: "Hefty, Sean" To: "Weiny, Ira" , Michael Wang CC: Roland Dreier , Hal Rosenstock , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Tom Tucker , Steve Wise , Hoang-Nam Nguyen , Christoph Raisch , infinipath , Eli Cohen , "Latif, Faisal" , Jack Morgenstein , "Or Gerlitz" , Haggai Eran , "Tom Talpey" , Jason Gunthorpe , Doug Ledford Subject: RE: [PATCH v3 04/28] IB/Verbs: Reform IB-core cm Thread-Topic: [PATCH v3 04/28] IB/Verbs: Reform IB-core cm Thread-Index: AQHQdeS5UbnEZcMackOuoINyGhKJPJ1LtHWA//+RvsA= Date: Mon, 13 Apr 2015 18:40:35 +0000 Message-ID: <1828884A29C6694DAF28B7E6B8A82373A8FC0A3A@ORSMSX109.amr.corp.intel.com> References: <552BB470.4090407@profitbricks.com> <552BB552.1030905@profitbricks.com> <20150413181248.GA2464@phlsvsds.ph.intel.com> In-Reply-To: <20150413181248.GA2464@phlsvsds.ph.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1059 Lines: 30 > > - if (rdma_node_get_transport(ib_device->node_type) != > RDMA_TRANSPORT_IB) > > - return; > > + int count = 0; > > I'm ok with this as an intermediate patch but going forward if we are > going to > have calls like > > static inline int cap_ib_cm_dev(struct ib_device *device) I would rather keep everything to checking per port, not per device. Specifically, because we have code that does this: > > port = kzalloc(sizeof *port, GFP_KERNEL); > > if (!port) > > goto error1; > > @@ -3809,7 +3810,16 @@ static void cm_add_one(struct ib_device > *ib_device) > > ret = ib_modify_port(ib_device, i, 0, &port_modify); > > if (ret) > > goto error3; It will also help keep the checks consistent, so that we don't end up with CM checks being per device, but SA checks being per port. - Sean -- 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/