Received: by 10.213.65.68 with SMTP id h4csp2161011imn; Sun, 8 Apr 2018 21:18:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx49U0R6Q5LmnwE+skt4iae/V1YIBruZq75VUdheRIrbBcfCXlTBWwf6vyQIeXNV3YiI2sV3o X-Received: by 10.99.117.80 with SMTP id f16mr9119771pgn.439.1523247489353; Sun, 08 Apr 2018 21:18:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523247489; cv=none; d=google.com; s=arc-20160816; b=Bg4w+YZAkuYgncR+4L9xHIfywgC4B7QOUceJSY+PkofjTM/sHOjyDW6MWI3ZRaWBoI euKnvKIl8Y04qsbZiK3UzbIRoonPCej4K4jNj5r7oAj/ZWpbw4+keBVMyVIjjEzP7itl 1ncF3XxsV3/KhLuUUyytwZ5KPt7B2LfR5XElUqpBeEJyYJW4ss4W/GTMqpaUsZfSsrgI N5KOJu4ZlF/PNNfVTZRCe69uaeChOojFz0L9XEKiE7Msclu2Kc+xBE6OI1Wx/f0cSDbS ae/NkPw1qgiVe7hW1YnOVinWLYQWR/kv4hYMSdYXJnbI8FNO0xvq2+RHoO5G66w9zPaw iAtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=qWULBce6oJm+BLCiKT5TVAPT7IuObc6scA9zhadCueQ=; b=CtAn1LM4POquH/wzAPh4UZ0gCiTS76ucWVD2cD7TnbQBThIzf3WW3ZXf1NM4qxqKpg p8icMQmbwC9vI1Jie7BbkqgyLKM+zOMTYs7NjyB0JFTB6IpOstOkhh8UXeNwLWR+xey4 TLsItU5VlzT6yaWCdTKE8iZUIUks+VS6EAnyEYypyn5+bch8GaA1Gl7zYwC6oM+nKvrz 30e5eGJJP3G4rTQoZ6X/CMgN7oKV9M898zusuOmvpXK0poxZmP3XkcBm+VKp9yIqqNDH HHMgUFqFZ23cJoXLDTJ9zFcaRdhSO+lDofRX4p2sqZGMK1qJRmI4vZD3aUSSYVziW+jr E7pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=FaHcD3En; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s187si10588953pgb.729.2018.04.08.21.17.32; Sun, 08 Apr 2018 21:18:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=FaHcD3En; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753316AbeDIEMW (ORCPT + 99 others); Mon, 9 Apr 2018 00:12:22 -0400 Received: from mail-co1nam03on0128.outbound.protection.outlook.com ([104.47.40.128]:49080 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752894AbeDIAQ5 (ORCPT ); Sun, 8 Apr 2018 20:16:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=qWULBce6oJm+BLCiKT5TVAPT7IuObc6scA9zhadCueQ=; b=FaHcD3EnZctR6rwidx0+lo4ivOzOthrBbw7387vsLftqTSa5GDn8FJpK4fcV/BUniXNH1Vd+preTWuf3BYz+YcbCOnSTGBWsiCLszo6a49fqD+Y/tepfz+69MQ6eZcu3HFyCaL2xOdiLiEIXBRpTzxY7u3BVJvbHf0SJeg1Aydo= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1127.namprd21.prod.outlook.com (52.132.132.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:16:52 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:16:52 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Parav Pandit , Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 011/189] RDMA/core: Clarify rdma_ah_find_type Thread-Topic: [PATCH AUTOSEL for 4.15 011/189] RDMA/core: Clarify rdma_ah_find_type Thread-Index: AQHTz5gPDIJND/sHxESLABwAdVaheQ== Date: Mon, 9 Apr 2018 00:16:52 +0000 Message-ID: <20180409001637.162453-11-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1127;7:mPMJsGQHzFh8+WrEsLYx+lp3p/nyem4L9N6vhJc115Y0SLjNUSsT2G87KEsBrFVNUjnj7mteEs434oR5awgnnzrfmHm3e7+OIrLkBNjhEXe7sonqEGqNU2u6Ec5+dcTWFI68pXTdDRyYLWA4RTqZFPHTrVAtSrQkmgAqfznAD/O/JL6WJfbT6KBDZfzPYcx8Gw8YLDVGLoPR7Tk6Ix+htH9EmUeki64H4GXOjGpznwYQKxHcOIzTkMto6Pfdlci9;20:TvZAjHEW7RBtIsZ3TWkM+s2px5ndys7Xa1b2sSmSRz32O1+LDtS1/+zFbND5PTbJrsolIldBTuCePVK7jic/AdUFEjiLztoT4O01/pqHgU8cmEFWOg8tHDhntwmY2KfDx1WyBv9sZ1vl8LsZKZCsxFk9pt/Hwnj0eWnEtCspu+E= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: c6f3701f-6824-4623-2312-08d59daf3229 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1127; x-ms-traffictypediagnostic: DM5PR2101MB1127: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1127;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1127; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39380400002)(39860400002)(376002)(346002)(366004)(189003)(199004)(105586002)(186003)(66066001)(6486002)(54906003)(7736002)(26005)(86362001)(316002)(305945005)(110136005)(478600001)(3280700002)(86612001)(10290500003)(25786009)(5250100002)(2616005)(99286004)(22452003)(5660300001)(3660700001)(2900100001)(81166006)(3846002)(2906002)(106356001)(6506007)(107886003)(486006)(8676002)(81156014)(14454004)(10090500001)(68736007)(4326008)(6116002)(1076002)(72206003)(102836004)(97736004)(11346002)(8936002)(476003)(2501003)(6436002)(6512007)(446003)(76176011)(36756003)(53936002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1127;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: t6SEMzVZkwM5IuEitmjXuH31xidSofyAeUucT5sgQuugAWeqiMxeM9NMXMyxo5/1Q7Z/qd1gn4TmAXDeucBEiXRwi3oX8tMxjFCGLQMHJC5UwLzwsKVC4xpdhZhRb1UEiGHupPeKFOxHyUf+FXqZmgV+2UosUoU4AlBj94xt/y2N6a7fqLB8BbqYMAxJZiA0QQuCwpv8i9OPWQ9SB1CAeXUncmDF9rbAtQY8FNLV88x4j8TsWnDZBG01eNvOotAbPRpugBEABNHlZb1VScbIJzMunarDTz9WC8ydRpZ/WFIcr728uBsEF/FkWwdwqFjKoDlXwHr/nyuxUw1ChxLZyPairMgdARQqOcAo7r+mJeZpiu/6bB1D/kJ/tCGL9oJ6gMQYoRRTnUmG3HX4AhvaUlpwXgym0lC7Jba3R2fRVfo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6f3701f-6824-4623-2312-08d59daf3229 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:16:52.8093 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1127 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Parav Pandit [ Upstream commit a6532e7139660c103dda181aa5b2c734aa26ed6c ] iWARP does not use rdma_ah_attr_type, and for this reason we do not have a RDMA_AH_ATTR_TYPE_IWARP. rdma_ah_find_type should not even be called on iwa= rp ports and for clarity it shouldn't have a special test for iWarp. This changes the result from RDMA_AH_ATTR_TYPE_ROCE to RDMA_AH_ATTR_TYPE_IB when wrongly called on an iWarp port. Fixes: 44c58487d51a ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- include/rdma/ib_verbs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 0d6a110dae7c..20ebf9061962 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -3793,8 +3793,7 @@ static inline void rdma_ah_set_grh(struct rdma_ah_att= r *attr, static inline enum rdma_ah_attr_type rdma_ah_find_type(struct ib_device *d= ev, u32 port_num) { - if ((rdma_protocol_roce(dev, port_num)) || - (rdma_protocol_iwarp(dev, port_num))) + if (rdma_protocol_roce(dev, port_num)) return RDMA_AH_ATTR_TYPE_ROCE; else if ((rdma_protocol_ib(dev, port_num)) && (rdma_cap_opa_ah(dev, port_num))) --=20 2.15.1