Received: by 10.213.65.68 with SMTP id h4csp2134732imn; Sun, 8 Apr 2018 20:34:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx48iql/AF05WYdOypOM9C7VQAp/mCiZbyxMgMfB83e/e6BHu5FQO5SLkJU5c2a36ndqFt+dm X-Received: by 10.98.152.17 with SMTP id q17mr27798179pfd.67.1523244897399; Sun, 08 Apr 2018 20:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523244897; cv=none; d=google.com; s=arc-20160816; b=HhLlaZDIP1A3BGYYfx1zmW9139a8BvIfGKfWsFYdc+bCg1M3dsRi8iBtHiQ+v05oO2 zH2ueFjB0R6qm2sMuhsH+QwWzaO8eNxZ9hnSYJp/j6va/Cq0esVKY7EbNv227Z61xCwy uGFFdvEnCpANTudeO9Kz0bRk7bN+ZTIsKZoGEqxrVLQU/jtEYaWkU8jIfQeMY6DZhy+s oKteK8bXkEgAS5mhhgy3s2CqPDDgN2ud+UVJaYeDvnNp92R2xdCnmGR/s3w5BbsCs4Kg WznzwaTD/IQsmQqAB428PTsUK3EB/lCF3OFZyvU7oHk4JndzOQsLwtS7EZEv0psjcXtR 4jEQ== 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=OWzkcyqpOLpe1xva8JunD0AdS4TZrIY49YLqvbasfc4=; b=AosMc4U6nH6H7R2ZUPG0e64mAfAbKgPkCuobgqDOw9v3FUR+rr7SJ4S+GeVu9ENCmp QaNcwlAZrUdPQ1FrrLZGuEAUT0zc2rx38D6/Xtwz2XrdPhkf0dLsaZ1S05E7Zc5t6MsP 6xubqeQ1lwkp8rmrePfUVR05tSzIJHQe0+l5dHLqzyP8igW7UnsCqTomANLKGrvGo6bf +AphrFXaBQQvr3H07klo0W+s0WaM/3ZrpiX5SJxRCKUQhkuHMeZ3NzqnhcvPK+9mvpfb lZSIFyMD0bJIOhI6KJ/D/qSD1ZWyo/LyfWdmV5FLBVnXbHlSa8xsz8UdzbJ+0cxce92k fTjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=cFILCPXe; 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 w2-v6si13521345plz.206.2018.04.08.20.34.20; Sun, 08 Apr 2018 20:34:57 -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=cFILCPXe; 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 S1754633AbeDID33 (ORCPT + 99 others); Sun, 8 Apr 2018 23:29:29 -0400 Received: from mail-bl2nam02on0137.outbound.protection.outlook.com ([104.47.38.137]:3548 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754597AbeDIAWE (ORCPT ); Sun, 8 Apr 2018 20:22:04 -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=OWzkcyqpOLpe1xva8JunD0AdS4TZrIY49YLqvbasfc4=; b=cFILCPXenojfrowZ9GROAhAaLnlWD5jcmLBcOzTRTfMwravI2FMvNEWBy5j1yKKwMzhuRedHn0v2kUujfe+Cxzyx3fqSKctyTT1/rF4FsX9UVWU3dS9DngvNWrF0wkMmuCu/3XArouRSW9Q0PBYK3PYjMkFqAMyts80qPd0A/68= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0936.namprd21.prod.outlook.com (52.132.131.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.3; Mon, 9 Apr 2018 00:21:58 +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:21:58 +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.14 008/161] RDMA/core: Clarify rdma_ah_find_type Thread-Topic: [PATCH AUTOSEL for 4.14 008/161] RDMA/core: Clarify rdma_ah_find_type Thread-Index: AQHTz5h3ACwzo7BYhkil1rIZ5pxTwQ== Date: Mon, 9 Apr 2018 00:19:47 +0000 Message-ID: <20180409001936.162706-8-alexander.levin@microsoft.com> References: <20180409001936.162706-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001936.162706-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;DM5PR2101MB0936;7:8OxIvI8Y+OMv/+YyVx8aBXAH07o74gvGd9Yw6y8KRVdciviAuigRirvuZOEMUJfCz6wRcRCoFBaB/lTWGgvCFQZnuj+1RCTaKqQwYcIEcv2N9mAOomvxhLL89DS1ZxvSpNTIbCRPMmd3xoKs6eFolbZ9/MImju9GJ9tUjWUfxJ61TihmzL0N6U/Ip1fj3xm8ksdEATt/Xj/qpZALpFBqy3YUn27hV7/WPjQJmUYS+tKp4qyarbF+zMxB+sLAYYeS;20:ZLiWYmg9fLf0D5/vDQnQW9p0xBqYAJC+e4+226c9nYYeJczWgy4WEIcUuRT6opt0WguIi0RyOngXjP7wXNWj79LCimr2XL7JwywtgIrZNjGTezgbiHBRa8rqcZZmzaM88faQxCu99UihSoHuAB+Slo95ytKRO2ZmGCROzJWivak= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 0c1321df-ec36-4503-818f-08d59dafe859 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0936; x-ms-traffictypediagnostic: DM5PR2101MB0936: 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)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB0936;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0936; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39380400002)(39860400002)(396003)(376002)(366004)(199004)(189003)(3660700001)(36756003)(2501003)(76176011)(10290500003)(2616005)(5250100002)(3280700002)(478600001)(1076002)(72206003)(6436002)(53936002)(486006)(476003)(4326008)(6486002)(107886003)(5660300001)(54906003)(110136005)(102836004)(2906002)(6116002)(3846002)(86612001)(81156014)(81166006)(6666003)(8936002)(305945005)(8676002)(2900100001)(6506007)(68736007)(14454004)(106356001)(105586002)(25786009)(6512007)(86362001)(99286004)(446003)(10090500001)(11346002)(316002)(26005)(7736002)(66066001)(186003)(22452003)(97736004)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0936;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: eMYBhMUQadyK18bPHBteARVRIukiKsSEzYLyFQ7ByPJaPTNUC+S9dzIJVryKzsmwWRrArRZadgnWOIPLjbtCwwOEw7ov2E4p5lCjZwg3Z1lnj1t9wwKTUDxtHxgZd2vVDXuAMBNPjQBBA0vd5+bLZcegYTD6PYhNwOhMxUdSFdvyHIvLnnNZl4DxXA9D4GyT1AHeq99hT3QEddkj0JKsND5Gvgv3S6y8vQBqfJsD/cjJAuJhV8gq6hpPeC+0TpkpSgQxV96xagrhaJV41LUjUy6gop5iaa+6eJHQWdJkchJ9HWig8EaLxpmh+lrdcmYE90/H9Aa9Ov4T5hbeXrUHUXzuTVpFnxiijPHWfnKHFaD3R3IvWF0W3VOaPAzUT/mYzS4y3b86hESS1Oaqmbt1nYvDQpGmlf76Fi1luaCyvxY= 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: 0c1321df-ec36-4503-818f-08d59dafe859 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:19:47.5983 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0936 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 6533aa64f009..a9fae49a1883 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -3766,8 +3766,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