From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Wang Subject: Re: [PATCH v3 04/28] IB/Verbs: Reform IB-core cm Date: Tue, 14 Apr 2015 09:57:00 +0200 Message-ID: <552CC84C.60101@profitbricks.com> References: <552BB470.4090407@profitbricks.com> <552BB552.1030905@profitbricks.com> <20150413181248.GA2464@phlsvsds.ph.intel.com> <1828884A29C6694DAF28B7E6B8A82373A8FC0A3A@ORSMSX109.amr.corp.intel.com> <20150413192930.GA18587@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150413192930.GA18587-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jason Gunthorpe , "Hefty, Sean" Cc: "Weiny, Ira" , Roland Dreier , Hal Rosenstock , "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Tom Tucker , Steve Wise , Hoang-Nam Nguyen , Christoph Raisch , infinipath , Eli Cohen , "Latif, Faisal" , Jack Morgenstein , Or Gerlitz , Haggai Eran , Tom Talpey , Doug Ledford List-Id: linux-rdma@vger.kernel.org On 04/13/2015 09:29 PM, Jason Gunthorpe wrote: > On Mon, Apr 13, 2015 at 06:40:35PM +0000, Hefty, Sean wrote: >>>> - 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: > > Argee. > > I asked Michael for it and stand by it, the property is per-port, not > per device. Having the per-device tests just muddles the logic, look > at the trouble Sean notices in #10 when we are now forced to think of > things clearly. The only per-dev checking left is all included in #24 (now may be #10 too), which is inside: 1. cma_listen_on_dev 2. ib_ucm_add_one I can't find a good way to apply per-port check in this two, seems like they are at the stage which not related to port yet... any ideas on how to improve that? Regards, Michael Wang > > Jason > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753287AbbDNH5N (ORCPT ); Tue, 14 Apr 2015 03:57:13 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:37404 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751673AbbDNH5E (ORCPT ); Tue, 14 Apr 2015 03:57:04 -0400 Message-ID: <552CC84C.60101@profitbricks.com> Date: Tue, 14 Apr 2015 09:57:00 +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: Jason Gunthorpe , "Hefty, Sean" CC: "Weiny, Ira" , 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 , Doug Ledford Subject: Re: [PATCH v3 04/28] IB/Verbs: Reform IB-core cm References: <552BB470.4090407@profitbricks.com> <552BB552.1030905@profitbricks.com> <20150413181248.GA2464@phlsvsds.ph.intel.com> <1828884A29C6694DAF28B7E6B8A82373A8FC0A3A@ORSMSX109.amr.corp.intel.com> <20150413192930.GA18587@obsidianresearch.com> In-Reply-To: <20150413192930.GA18587@obsidianresearch.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 On 04/13/2015 09:29 PM, Jason Gunthorpe wrote: > On Mon, Apr 13, 2015 at 06:40:35PM +0000, Hefty, Sean wrote: >>>> - 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: > > Argee. > > I asked Michael for it and stand by it, the property is per-port, not > per device. Having the per-device tests just muddles the logic, look > at the trouble Sean notices in #10 when we are now forced to think of > things clearly. The only per-dev checking left is all included in #24 (now may be #10 too), which is inside: 1. cma_listen_on_dev 2. ib_ucm_add_one I can't find a good way to apply per-port check in this two, seems like they are at the stage which not related to port yet... any ideas on how to improve that? Regards, Michael Wang > > Jason >