Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753828AbbDUHjW (ORCPT ); Tue, 21 Apr 2015 03:39:22 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:33277 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333AbbDUHjU (ORCPT ); Tue, 21 Apr 2015 03:39:20 -0400 Message-ID: <5535FE9F.8070809@profitbricks.com> Date: Tue, 21 Apr 2015 09:39:11 +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: Tom Tucker , Steve Wise , Roland Dreier , Sean Hefty , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, hal@dev.mellanox.co.il CC: Hoang-Nam Nguyen , Christoph Raisch , Mike Marciniszyn , Eli Cohen , Faisal Latif , Jack Morgenstein , Or Gerlitz , Haggai Eran , Ira Weiny , Tom Talpey , Jason Gunthorpe , Doug Ledford Subject: Re: [PATCH v5 19/27] IB/Verbs: Use management helper cap_iw_cm() References: <5534B8C9.506@profitbricks.com> <5534BB7B.4020601@profitbricks.com> <55350698.9000109@opengridcomputing.com> <55351838.2060006@profitbricks.com> <5535209E.3020807@opengridcomputing.com> In-Reply-To: <5535209E.3020807@opengridcomputing.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1612 Lines: 42 On 04/20/2015 05:51 PM, Tom Tucker wrote: [snip] >>>> int ib_query_gid(struct ib_device *device, >>>> u8 port_num, int index, union ib_gid *gid); >>>> >>> iWARP devices _must_ support the IWCM so cap_iw_cm() is not really useful. >> Sean suggested to add this helper paired with cap_ib_cm(), may be there are >> some consideration on maintainability? >> >> Me too also prefer this way to make the code more readable ;-) > > It's more consistent, but not necessarily more readable -- if by readability we mean understanding. > > If the reader knows how the transports work, then the reader would be confused by the addition of a check that is always true. For the reader that doesn't know, the addition of the check implies that the support is optional, which it is not. The purpose is to make sure folks understand what we really want to check when they reviewing the code :-) and prepared for the further reform which may not rely on technology type any more, for example the device could tell core layer directly what management it required with a bitmask :-) Regards, Michael Wang > > Tom > >> Regards, >> Michael Wang >> >>> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > -- 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/