Received: by 10.213.65.68 with SMTP id h4csp2148305imn; Sun, 8 Apr 2018 20:58:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+GaP6/5+tvaitbwBHl+e4XdJ9d5gDYg+pkYJZIeFGjs3y/A6IfnTU49caf+jW/N0g8T8JW X-Received: by 10.98.102.79 with SMTP id a76mr27743924pfc.162.1523246315815; Sun, 08 Apr 2018 20:58:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523246315; cv=none; d=google.com; s=arc-20160816; b=OduZgkwk+ZdYW+au7+4oGj7Ta1a62NgqGT0uPyoDxT99Jo9e31NXuXz3hhVArzngWv pz3lH/e8MFw6yNNy8rwiE9JwOyEWfL3IejzwQm52Owb9P2liy2Ljp3+8Mv6a05amn6Jx +rwftMeDjMJ3UZalWFHaBKunXzh3dasmWeAak1hgfa9Y7Z33NZzrXYe80OFhFZRaDvZr SIGrS25YvTbbu4RWUHMquYEq9jWyaHFYPTYD709+Rlj8AXs67e+kOmUR4C8aiqdUIx4a Mm0sitkB8Ffif/BRMV0fInQQHEOX3RZh3YO4z6ZMGyKwtXGv4KFI885h87O3bctPoU3/ WdXg== 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=1hPLuWxeDRjI3cPsoiaBBnZUxr3gmtyv/5Bj4MrTvJY=; b=1KGPt7tG+/cCgLiQRMqL23mfUAO0J+RA4XChAZHKm0Qv+w/4Pxw3kxVeCqee599c+a y9C5ouq5ER4gfSxOmHkFVTxLQfT/W3wWrQcgWeDaCXbUknMt25cSuU2RtiTVUUtJoFE7 w9k5HW7i6/hgodLcLjlsqN0WJjp7tf016149fsO+yEyTCD2zdKdrY+DVLOnMoo7hxB9W c8H808lxGPBnvmfZmjDHIc/Bw9ex/Jy3euPYozJld8xsbsvcC/cl5lt60LPKgYra9SwX 4zKoayebOPjMx0hDKAMbgZvFjGkAeJLwskl8KacVdX03wwaRJj9j3GrnFqKChw/bDpyr 5fSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=VEtdzqrc; 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 k62si10894364pgd.39.2018.04.08.20.57.58; Sun, 08 Apr 2018 20:58:35 -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=VEtdzqrc; 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 S1754170AbeDIDwt (ORCPT + 99 others); Sun, 8 Apr 2018 23:52:49 -0400 Received: from mail-by2nam03on0122.outbound.protection.outlook.com ([104.47.42.122]:11088 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753989AbeDIATY (ORCPT ); Sun, 8 Apr 2018 20:19: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; bh=1hPLuWxeDRjI3cPsoiaBBnZUxr3gmtyv/5Bj4MrTvJY=; b=VEtdzqrcDIhUPg6jLBoKpChyyjBDFSaEZ0NwVp7NxrdsH4ieoH4tYuTXQWdHDkU9gXT9tNhDc8nTxJbNjff+wdMl/xMkOmzuDpwFAFvFYTcViZ29+zC5dt/EElQdK9bSJbRQHNKssg1bolMAb0kBlwLuzt/n/KqIVtmmdBg7cP8= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1063.namprd21.prod.outlook.com (52.132.128.39) 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:19:19 +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:19:19 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Jacob Keller , Jeff Kirsher , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 099/189] i40e: fix reported mask for ntuple filters Thread-Topic: [PATCH AUTOSEL for 4.15 099/189] i40e: fix reported mask for ntuple filters Thread-Index: AQHTz5g6VWkOSmki70+jRbxC+rGBxw== Date: Mon, 9 Apr 2018 00:18:04 +0000 Message-ID: <20180409001637.162453-99-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;DM5PR2101MB1063;7:ZoiM4LVQYDkz3tmTrVAgSozV3X9naaoLyk+CPRH1fJlMDk66MdHDhjDapdbxCgQGX8SBVajq7+7D4oIrO7z/IfEFEvyoz2MfxxtlmK20sZ8C5d872nXcq9EIqsdoolcEIQlxLuPSahVbS1pO24MH6W6pgcJv5s8/P/T+9EDTCO+HkN+kKBDlzymt5uR5BqlTbcUkhy6Q0fSIC5EfwXzx4fKsKGP/6IIUqJSkVQYXLMFYeXEodj5VHvOO97GKJR7L;20:RcdHr+cpMhHnrWeDMYFlsA7G/CffikuI2zBkuCHqhQyCL9Bey8DhhIZjV7gDpseXodAitKzfM8PTsj6/XCHED+JbPaRNfReA7EHR4hoGmSskQ0Ke0Tu91iDKnA63o2cCUG9btPzTeyksWg7ExiZBtOKO0jpvzzRvRc4OceooOcQ= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 5b4359dd-119f-4f81-71d9-08d59daf89b0 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1063; x-ms-traffictypediagnostic: DM5PR2101MB1063: 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)(211171220733660)(228905959029699); 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)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB1063;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1063; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39380400002)(39860400002)(376002)(396003)(366004)(189003)(199004)(2900100001)(6436002)(7736002)(10090500001)(102836004)(3660700001)(6506007)(76176011)(305945005)(4326008)(5250100002)(97736004)(26005)(25786009)(6512007)(2906002)(81166006)(106356001)(107886003)(68736007)(14454004)(86612001)(66066001)(10290500003)(6666003)(5660300001)(81156014)(478600001)(476003)(486006)(6486002)(72206003)(3280700002)(99286004)(105586002)(36756003)(1076002)(2616005)(11346002)(53936002)(446003)(8676002)(186003)(3846002)(54906003)(6116002)(2501003)(8936002)(316002)(110136005)(575784001)(86362001)(22452003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1063;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: K3pB9OQAkvWMclzlGOoeExq2QCALN6eSHKKvN/X1nHnLsPREIx9W5opB8YZR+oT7vUzzbJaQKJQAzxYoAUXvlWZXCWoZSa5m+vkYQZwzkFeeckOsPxl4A/T/s9d27sohJFMyJHl8jO42dV6LKCeUSBDF1S04iNP7P+6f0vfdAJfLr8XomwDqDRXc1j4OnyUMNdtN/xEg8TSFPUR/RiU2vIzHJgu3EWWHKNSGazwpT7XV9vejQdVWeoUTB6v23sYQrjK7HAyzIRPAzi0jt3mdWcDveN/rmJtlbjIrTDUJr7QBjQs1FXTQGVJ9VjmZNhDpZos7TwjISBjGWeVTo99Y7N+/qzAlhlISWiDItvEmh1npEkUw7dTCSIANn++JTaYxGFCBSd2Qp8NaKF5witWOU1dVhwoT9rsIc/HRrpGA3m8= 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: 5b4359dd-119f-4f81-71d9-08d59daf89b0 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:18:04.5691 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1063 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jacob Keller [ Upstream commit 40339af33c703bacb336493157d43c86a8bf2fed ] In commit 36777d9fa24c ("i40e: check current configured input set when adding ntuple filters") some code was added to report the input set mask for a given filter when reporting it to the user. This code is necessary so that the reported filter correctly displays that it is or is not masking certain fields. Unfortunately the code was incorrect. Development error accidentally swapped the mask values for the IPv4 addresses with the L4 port numbers. The port numbers are only 16bits wide while IPv4 addresses are 32 bits. Unfortunately we assigned only 16 bits to the IPv4 address masks. Additionally we assigned 32bit value 0xFFFFFFF to the TCP port numbers. This second part does not matter as the value would be truncated to 16bits regardless, but it is unnecessary. Fix the reported masks to properly report that the entire field is masked. Fixes: 36777d9fa24c ("i40e: check current configured input set when adding = ntuple filters") Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/e= thernet/intel/i40e/i40e_ethtool.c index 28daf7e7ccbe..040e0dc6cb7a 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c @@ -2740,16 +2740,16 @@ static int i40e_get_ethtool_fdir_entry(struct i40e_= pf *pf, =20 no_input_set: if (input_set & I40E_L3_SRC_MASK) - fsp->m_u.tcp_ip4_spec.ip4src =3D htonl(0xFFFF); + fsp->m_u.tcp_ip4_spec.ip4src =3D htonl(0xFFFFFFFF); =20 if (input_set & I40E_L3_DST_MASK) - fsp->m_u.tcp_ip4_spec.ip4dst =3D htonl(0xFFFF); + fsp->m_u.tcp_ip4_spec.ip4dst =3D htonl(0xFFFFFFFF); =20 if (input_set & I40E_L4_SRC_MASK) - fsp->m_u.tcp_ip4_spec.psrc =3D htons(0xFFFFFFFF); + fsp->m_u.tcp_ip4_spec.psrc =3D htons(0xFFFF); =20 if (input_set & I40E_L4_DST_MASK) - fsp->m_u.tcp_ip4_spec.pdst =3D htons(0xFFFFFFFF); + fsp->m_u.tcp_ip4_spec.pdst =3D htons(0xFFFF); =20 if (rule->dest_ctl =3D=3D I40E_FILTER_PROGRAM_DESC_DEST_DROP_PACKET) fsp->ring_cookie =3D RX_CLS_FLOW_DISC; --=20 2.15.1