Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966726AbbDVQlF (ORCPT ); Wed, 22 Apr 2015 12:41:05 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:51645 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966282AbbDVQkx (ORCPT ); Wed, 22 Apr 2015 12:40:53 -0400 Date: Wed, 22 Apr 2015 10:40:34 -0600 From: Jason Gunthorpe To: Liran Liss Cc: "ira.weiny" , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Michael Wang , Roland Dreier , Sean Hefty , Hal Rosenstock , "hal@dev.mellanox.co.il" , Tom Tucker , Steve Wise , Hoang-Nam Nguyen , "raisch@de.ibm.com" , Mike Marciniszyn , Eli Cohen , Faisal Latif , Jack Morgenstein , Or Gerlitz , Haggai Eran , Tom Talpey , Doug Ledford Subject: Re: [PATCH v5 00/27] IB/Verbs: IB Management Helpers Message-ID: <20150422164034.GB19500@obsidianresearch.com> References: <5534B8C9.506@profitbricks.com> <20150422024123.GA18675@phlsvsds.ph.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.183 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1484 Lines: 42 On Wed, Apr 22, 2015 at 11:38:34AM +0000, Liran Liss wrote: > This is redundant. All IB ports have SMI, so if you know that you > are using an IB device, you know you have an SMI. You should really go back and read the whole thread, this has already been discussed. The patch set was developed from the 'bottom up' - all the points that did 'if is iwarp/rocee/ib/foo' were examined, Michael figured out what *difference* that code actually required and made a dedicated test for it. It turns out, one of those differences is SMI, !SMI. The tests are an inventory of all the spec differences the code cares about. This is the entire point. Yes, of course, an abstract notion like can describe the same state space, but then the call sites loose the insight into *WHY* the code cares, and *WHAT* the difference is. This is bad: if (rdma_standard_ib() || rdma_standard_rocee() || rdma_standard_opa()) This is worse: if (!rdma_standard_iwarp()) This is better: if (rdma_cap_mad()) Going forward, we are growing more tests, and worse, they are for standards that are not public. We need to stop open-coding 'is standard' type code and actually start documenting these differences. 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/