From patchwork Tue Aug 15 18:25:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suresh Shelvapille X-Patchwork-Id: 9902375 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D5FD36028A for ; Tue, 15 Aug 2017 18:26:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD57A288BF for ; Tue, 15 Aug 2017 18:26:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C21B7288C9; Tue, 15 Aug 2017 18:26:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0808F288C6 for ; Tue, 15 Aug 2017 18:26:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752345AbdHOSZ7 (ORCPT ); Tue, 15 Aug 2017 14:25:59 -0400 Received: from mail-by2nam03on0089.outbound.protection.outlook.com ([104.47.42.89]:24096 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751666AbdHOSZ6 (ORCPT ); Tue, 15 Aug 2017 14:25:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=BayMicrosystemsInc.onmicrosoft.com; s=selector1-baymicrosystems-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ne9vWEMeG/jbeSPNm986U1v3YZu8xE7ZVthfRyan950=; b=gm8502j2Fvr8Vz0a26HzbrZtmMuUrlgEcxLmayixDAceNAQ2Xe8irgiUdZWU0Y86Eu+ea3PXptwVyVmFnqORJeQsM8okD/6/afpKjbUtz1tXrmjQ6mpZo1qstSQdFjXIuGYlSqGy4RPOfZPIRxJ3I/A/8mHIePJSB5fAmy7dtW0= Received: from SN1PR0301MB2127.namprd03.prod.outlook.com (10.163.228.146) by SN1PR0301MB2014.namprd03.prod.outlook.com (10.163.225.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1341.21; Tue, 15 Aug 2017 18:25:55 +0000 Received: from SN1PR0301MB2127.namprd03.prod.outlook.com ([10.163.228.146]) by SN1PR0301MB2127.namprd03.prod.outlook.com ([10.163.228.146]) with mapi id 15.01.1341.020; Tue, 15 Aug 2017 18:25:55 +0000 From: Suri Shelvapille To: Leon Romanovsky , Doug Ledford CC: "linux-rdma@vger.kernel.org" , Leon Romanovsky Subject: RE: [rdma-next v2 07/23] RDMA/core: Remove unimplemented node_types and node transport Thread-Topic: [rdma-next v2 07/23] RDMA/core: Remove unimplemented node_types and node transport Thread-Index: AQHTFaQ4aSGJufUiR0aG61o6zYTX5qKFubcw Date: Tue, 15 Aug 2017 18:25:54 +0000 Message-ID: References: <20170815085452.3546-1-leon@kernel.org> <20170815085452.3546-8-leon@kernel.org> In-Reply-To: <20170815085452.3546-8-leon@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=suri@baymicrosystems.com; x-originating-ip: [71.246.225.210] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN1PR0301MB2014; 6:qWBDZbTR2a8iPNf3qbl0HuNHER00HYtOdHllNDdBmOsbTlHYD3T77hUXtky4xR5gUDorKoSsHqADU7H5ShiFV+QHTM6+bUMg9j20yKiqhrz8nyQ8XWjLMDSSBm7brmDIi6Gg/1m4BhKFOwnqDqLtPneTP+nrrQO3AAfTBRx2/+VcGmrIySznaMmJ/x6XHtUKcnIqtHucPcXTWGIDDV/cKmYmeoWGAiA33A7C4eycrDKaZMmLmQUwk5CeiM2R8AXHpXbNmyMR/oV4imJkcF3RCbKcWsrarK5q6VUlPmnjTaoobtW+efKKOdDYI9Q+JQbPXiM11TS30/sbTW0ExXTVpg==; 5:6s48h+3ogcK9ruzbZ9SVNBjQjA+8WGo5spYsmgpYtnjrQrJi107KrYShiGnlvRPewKAl67twKgBtD+JQryabeb648jUx90y/oQbRRx+WbLUeD+KGzoiaXUFQqSBZN/8jmYiN3KpKh7w6yufzl1RBQw==; 24:PwBrRL/FD8WrIxOs93VlNQ8Zsy4NKVK1TD8jsngrLIBp/DLg+hGNfhM/QedcBNyHpZgnBnWdKidBwJwGjbD+bfrC9VlDGv/IjlzrnQNRr7M=; 7:krnFAi9YtJL8t3AHRG/ypPLbB558HYlF8FzmvdYSRDZn1pLKKO9ibrHAC+8+mZ8IRoMWfOuEKJfND0fHcGe55PWRPzH18UmAtsf3fFQW5pfbzY4MT0HY+MQxtw+zlsxaF0dvTLYaidxYGUhUx3by8vfQnyYFMt6k5+m3AbPtIT543+ZI6brjVKDzg7I4eQmQvJr9AzrkNbpYOFQSLyJcg6O3rSIoIMex+EQ09papXYs= x-ms-office365-filtering-correlation-id: c7033a55-a1ce-41d9-1c5c-08d4e40b113d x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR0301MB2014; x-ms-traffictypediagnostic: SN1PR0301MB2014: x-exchange-antispam-report-test: UriScan:(9452136761055)(228905959029699)(17755550239193); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6041248)(20161123555025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR0301MB2014; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR0301MB2014; x-forefront-prvs: 04004D94E2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39830400002)(189002)(377454003)(199003)(13464003)(5890100001)(101416001)(50986999)(54356999)(76176999)(33656002)(68736007)(53546010)(105586002)(966005)(14454004)(106356001)(4326008)(25786009)(81166006)(8676002)(81156014)(97736004)(189998001)(8936002)(5660300001)(6116002)(102836003)(2906002)(74316002)(3846002)(3280700002)(478600001)(2950100002)(7736002)(305945005)(3660700001)(6246003)(66066001)(2900100001)(7696004)(77096006)(6506006)(229853002)(55016002)(86362001)(99286003)(54906002)(6306002)(53936002)(6436002)(9686003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0301MB2014; H:SN1PR0301MB2127.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: baymicrosystems.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: baymicrosystems.com X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Aug 2017 18:25:54.9952 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: aac3cb3b-f625-4cbc-ae65-2b4805bc1fa4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0301MB2014 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Leon: We do have IB_SWITCH and IB_ROUTER functionality and we do use the SWITCH capability provided by the "core" in our product. The "core" has a wrapper function which Identifies the device as a switch to direct smp packets. I am glad that has not been removed. And I hope it won't be removed as it would be a burden to us. Although we prefer to have the IB_SWITCH/IB_ROUTER definitions in the core as well, it is not a big deal to move these definitions inside our driver. Thanks, Suri -----Original Message----- From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-owner@vger.kernel.org] On Behalf Of Leon Romanovsky Sent: Tuesday, August 15, 2017 4:55 AM To: Doug Ledford Cc: linux-rdma@vger.kernel.org; Leon Romanovsky ; Leon Romanovsky Subject: [rdma-next v2 07/23] RDMA/core: Remove unimplemented node_types and node transport From: Leon Romanovsky There is no need to carry code, which is not implemented in any underlying hardware. This patch removes unimplemented node_types and their respective node transport layers. Signed-off-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro --- drivers/infiniband/core/sysfs.c | 3 --- drivers/infiniband/core/verbs.c | 5 ----- include/rdma/ib_verbs.h | 16 ++++++---------- 3 files changed, 6 insertions(+), 18 deletions(-) -- 2.14.0 -- 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 This correspondence, and any attachments or files transmitted with this correspondence, contains information which may be confidential and privileged and is intended solely for the use of the addressee. Unless you are the addressee or are authorized to receive messages for the addressee, you may not use, copy, disseminate, or disclose this correspondence or any information contained in this correspondence to any third party. If you have received this correspondence in error, please notify the sender immediately and delete this correspondence and any attachments or files transmitted with this correspondence from your system, and destroy any and all copies thereof, electronic or otherwise. Your cooperation and understanding are greatly appreciated. -- 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 diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index abc5ab581f82..c43280f8d5b3 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -1146,10 +1146,7 @@ static ssize_t show_node_type(struct device *device, switch (dev->node_type) { case RDMA_NODE_IB_CA: return sprintf(buf, "%d: CA\n", dev->node_type); case RDMA_NODE_RNIC: return sprintf(buf, "%d: RNIC\n", dev->node_type); -case RDMA_NODE_USNIC: return sprintf(buf, "%d: usNIC\n", dev->node_type); case RDMA_NODE_USNIC_UDP: return sprintf(buf, "%d: usNIC UDP\n", dev->node_type); -case RDMA_NODE_IB_SWITCH: return sprintf(buf, "%d: switch\n", dev->node_type); -case RDMA_NODE_IB_ROUTER: return sprintf(buf, "%d: router\n", dev->node_type); default: return sprintf(buf, "%d: \n", dev->node_type); } } diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 3d1de62de839..21fef6b6d4f3 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -182,13 +182,9 @@ rdma_node_get_transport(enum rdma_node_type node_type) { switch (node_type) { case RDMA_NODE_IB_CA: -case RDMA_NODE_IB_SWITCH: -case RDMA_NODE_IB_ROUTER: return RDMA_TRANSPORT_IB; case RDMA_NODE_RNIC: return RDMA_TRANSPORT_IWARP; -case RDMA_NODE_USNIC: -return RDMA_TRANSPORT_USNIC; case RDMA_NODE_USNIC_UDP: return RDMA_TRANSPORT_USNIC_UDP; default: @@ -207,7 +203,6 @@ enum rdma_link_layer rdma_port_get_link_layer(struct ib_device *device, u8 port_ case RDMA_TRANSPORT_IB: return IB_LINK_LAYER_INFINIBAND; case RDMA_TRANSPORT_IWARP: -case RDMA_TRANSPORT_USNIC: case RDMA_TRANSPORT_USNIC_UDP: return IB_LINK_LAYER_ETHERNET; default: diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 4ce188128aa9..6aec3971628b 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -95,12 +95,9 @@ struct ib_gid_attr { enum rdma_node_type { /* IB values map to NodeInfo:NodeType. */ -RDMA_NODE_IB_CA = 1, -RDMA_NODE_IB_SWITCH, -RDMA_NODE_IB_ROUTER, -RDMA_NODE_RNIC, -RDMA_NODE_USNIC, -RDMA_NODE_USNIC_UDP, +RDMA_NODE_IB_CA= 1, +RDMA_NODE_RNIC= 4, +RDMA_NODE_USNIC_UDP= 6, }; enum { @@ -109,10 +106,9 @@ enum { }; enum rdma_transport_type { -RDMA_TRANSPORT_IB, -RDMA_TRANSPORT_IWARP, -RDMA_TRANSPORT_USNIC, -RDMA_TRANSPORT_USNIC_UDP +RDMA_TRANSPORT_IB= 0, +RDMA_TRANSPORT_IWARP= 1, +RDMA_TRANSPORT_USNIC_UDP= 3, }; enum rdma_protocol_type {