Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3503394imm; Sun, 16 Sep 2018 20:35:44 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaZNh4p28TOuEe71Fz0a7QA8iR70O75/rFEOmcKcUvThIj2XVypXg6qFq61xC5mgTsbZQHq X-Received: by 2002:a17:902:76c5:: with SMTP id j5-v6mr22859603plt.140.1537155344481; Sun, 16 Sep 2018 20:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537155344; cv=none; d=google.com; s=arc-20160816; b=VDF99Q/0mRieaeLztu38PRgVkSl3P0+GZsB3tV+CYuo0Kbjsu0TrJ5HelPFyBrh06z 1NOjXqbodOEGgSa1Gay2hdR0FAvi1Zpg07IxU7X8z6zM7d1FzVZobSd2DSJ93yD2oH5f /+wEOejBKcQg+bza1eEyErLIMb/D/upZuZSN/criW3/ZST9HTgbECWXl7d2YNXAWXjIE +ZiPj2tpZLlp8QWo0r8ZZy6Pr76u3Pel3oYYXrMvZw+h+VVOfTrwEKQMdH2gP1Ugr2VX 3U9LdE6BxaSi4Tp4asXn8tym/YlkGyZM8miVUzlnZI5lzNuLQ9G0YYjohq9/mtHelxsN bmfQ== 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; bh=JMghwfYzdLf8Il7NAgGFEGCe4onplf8h1MGCRns/xus=; b=DXh6sRadjanDhPVygMqWaA6VI5Nzb/CjY/MFQsL4/dgBR1/0NzkZm9gBCso8swZzuB i9X3BJ94ayKzOuJHTQpjtmpxNoFZjlXvo8xiPXMI2WxTlkHh76T+4TIP2UNuCO3dJKAf HHB5v6X4suWebLaoGayCbypXxkw2vuEP58xMsFU0Gs8HugMTFfmkvIlFEWgiaCYv60vj StFg5nqdDFSY7piFEHnCxmss2z5IVAlvraIg9csp4WkD8gfBCtwVlkdjixicMDtjI7nf ACEDNOYmcZ31ghveXyqAHqg1I8MZdgZpv79HTDBjLo+A2afv7O8jQabuaYY2WZDQAYSP Lo2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=insXZm9b; 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 s20-v6si14535293pgl.335.2018.09.16.20.35.29; Sun, 16 Sep 2018 20:35:44 -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=insXZm9b; 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 S1728924AbeIQI00 (ORCPT + 99 others); Mon, 17 Sep 2018 04:26:26 -0400 Received: from mail-eopbgr690129.outbound.protection.outlook.com ([40.107.69.129]:35844 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728878AbeIQI0Y (ORCPT ); Mon, 17 Sep 2018 04:26:24 -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:X-MS-Exchange-SenderADCheck; bh=JMghwfYzdLf8Il7NAgGFEGCe4onplf8h1MGCRns/xus=; b=insXZm9bkmrrsh/4pfnYu1coyKsL3W6kPRgkOnoM63Cnk+fj4HMfkKH+30ZTIPJZ9YUrje4bCPkeraz7fnNw7oBuOr+1heKMBE47Qrs8OyZrbNKt+0oH04iaVDS2eukPZt6I03WudAyB59HsBP5vwwgrjW++udRpHRaKyiW+OT8= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0167.namprd21.prod.outlook.com (10.173.192.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.12; Mon, 17 Sep 2018 03:01:08 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36%5]) with mapi id 15.20.1185.003; Mon, 17 Sep 2018 03:01:05 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Maor Gottlieb , Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH AUTOSEL 4.18 041/136] IB/mlx5: Fix GRE flow specification Thread-Topic: [PATCH AUTOSEL 4.18 041/136] IB/mlx5: Fix GRE flow specification Thread-Index: AQHUTjKcsmiY+UCtoEGoCjZbB/ip7w== Date: Mon, 17 Sep 2018 03:00:37 +0000 Message-ID: <20180917030006.245495-41-alexander.levin@microsoft.com> References: <20180917030006.245495-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030006.245495-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;CY4PR21MB0167;6:A4D354QwfMhMAg/PqhL8idfvNlMOqACr3gbEEoj8bb/HZa97qKROG+CUiJwnrqU0kQcjixUI39IL9VXd0Eaj2EwM9z+uswNjF0RiQmPFDt2et4+ogaZdZ0H9w/0RrpmafMWXgbxrniYWHtQDT/wGDfyWjk1i+v+qwb3++Nt2zTXzZuNL03oAfmTfiwNAMqWPCFmvinxRkMA0ASB3nP3bxN+nVKF1U2VTd5Jw1+dA43N1Y2wGLb3LjTK6IQIota+qyxgPsPP3mKFkpDf7hgCB4fntiLNRDSUk9Lyma3HnxH34B/d7qsFLXeDiBHBJz1e4GtlXGtqPSKu4mFwii7ajKAicBgnZvupTrTFcJk1A8CUGdo3Ouio8/edYCQl9eOZeCNDTdRYLZHF7vWJy3WC7AmylvYNRlDQ71CHpz4I+ARMLYIKYDa8RNbAz6p+BgsG9eCjBYFA/31VLh4p6rnYKPg==;5:bSHisEhB/8tJTfIhDXxVN8rVneSL0lAkFBZmhEaDbxvvfhp7a5tfYl34UwkeuYqmM+jdpqPZdUxbaJjYmWZDK+em7EzJDMwuIPA2qjDPXfzUauK0y4PDBTDYF0ONErRnhmO2z+L+SVV1RnqKlR6rQM9YqknYQp9kEAN/wpCGwDg=;7:doXszVbL0nkDr1xkuI7iRDfhYUC5+IN/Q9FgNLWSDoT+LFxmeTfyawujPsxi2qHveGo/TSKpvbhxVHgglOrw2OLOS0CHBao58HIJDLZD1yqzpWrTB4WxXc4YY2ZIs7IvoUzKfC0CMs2SEgU1gCgL16qqYxj6vVA93EdVm9yTrt11rx4iCShEmUFjPNh50nC8eks2v9iJHaFBWTIJQIhsjEO8V77ZcKlqDgnP+uMHF+LVlpzNtjHJIm8SftJC9aDw x-ms-office365-filtering-correlation-id: 1bae0d5a-f814-44ca-026f-08d61c49cf51 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020);SRVR:CY4PR21MB0167; x-ms-traffictypediagnostic: CY4PR21MB0167: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231355)(944501410)(52105095)(2018427008)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050)(76991041);SRVR:CY4PR21MB0167;BCL:0;PCL:0;RULEID:;SRVR:CY4PR21MB0167; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(376002)(366004)(346002)(136003)(39860400002)(199004)(189003)(6116002)(1076002)(86612001)(4326008)(97736004)(53936002)(2900100001)(7736002)(107886003)(106356001)(10290500003)(81166006)(105586002)(68736007)(3846002)(99286004)(305945005)(36756003)(8936002)(2906002)(217873002)(54906003)(86362001)(110136005)(25786009)(316002)(5660300001)(102836004)(66066001)(76176011)(478600001)(446003)(11346002)(2616005)(8676002)(486006)(476003)(6346003)(186003)(26005)(6666003)(6506007)(6512007)(5250100002)(6436002)(10090500001)(6486002)(72206003)(14454004)(256004)(2501003)(22452003)(81156014)(14444005);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0167;H:CY4PR21MB0776.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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: AWGDYmXJdKA7Dq4RPIDnoryyOg3seNjlNsT+d7jKZyjopv6yFpb0WNCxkns809is5M7nYrStsl6c5fO61MH6X2Tmf0/xmpwyF/TOarNoU9Py7T2WWfQleaySnlCXfUqHnCsw5sQxXvYnb5C4ZXp3keOSOHwx6ur2usikTS1+Sk63eujAS8iK0rG1nhore7sDfazpeaogIonnfK9tjLRqXV9wsU5UcD2hwC8qfFlhUnQBvxTaUBYIoYX2176R95nQ5EwkCDROFnk+oqZPSBEtdUbTykzJ0OJEYDuDSl7qb8F6b7iuZPzIPifLS9DOuTPi/iYin059sww+LHT9vdNDsVTaYsg8KjeJvWvHPqFWh6w= 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: 1bae0d5a-f814-44ca-026f-08d61c49cf51 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:00:37.8702 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0167 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maor Gottlieb [ Upstream commit a93b632c4531ff50c43d658447a45cbc11f488fd ] Currently the driver sets the mask of the gre_protocol to 0xffff without consideration in the user request. Fix it by copy the mask from the verbs spec. Fixes: da2f22ae7707 ("IB/mlx5: Add support for GRE flow specification") Signed-off-by: Maor Gottlieb Reviewed-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/mlx5/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5= /main.c index cbeae4509359..85677afa6f77 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -2699,7 +2699,7 @@ static int parse_flow_attr(struct mlx5_core_dev *mdev= , u32 *match_c, IPPROTO_GRE); =20 MLX5_SET(fte_match_set_misc, misc_params_c, gre_protocol, - 0xffff); + ntohs(ib_spec->gre.mask.protocol)); MLX5_SET(fte_match_set_misc, misc_params_v, gre_protocol, ntohs(ib_spec->gre.val.protocol)); =20 --=20 2.17.1