Received: by 10.213.65.68 with SMTP id h4csp2124059imn; Sun, 8 Apr 2018 20:18:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx49wub45+RrdUUAe+eIjofPg6/+RTpkT3GjjE8LtVRwmmJUxFPhCOTBhvCShCLbij7fYO2ST X-Received: by 10.98.70.8 with SMTP id t8mr27949860pfa.185.1523243882800; Sun, 08 Apr 2018 20:18:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243882; cv=none; d=google.com; s=arc-20160816; b=VYPJ5Bv/n+MSAODu4dAZyKTvWzwbJGXOSgubnjmj9L0/Z7S9tumDnNQTWHg7nv0Z0Z PzhAewUlPXTJbSM6TPpcIpLOJLxsmCAWJxnw6yTHIn1jdWgG4IDu3dFSq0kIZrzoIt9a rkrF+pJYM8+DH/2mVYUtI6NUVi7b6cV3rkgrJxr6T08NkOKVpISLbx1M8XdM5D3Ws10w Tb+izsxxQi+dJAkbW4nt5FPTxSMbIcfCtu5YPau1RQCR2AVJjzdS7PS/5lr+AZU3HCsF 3JeFIwHTqzzsrWjthQO50Zp12lXH7SV0P2xzG4N3q3gvzCwHVLwFgflNgo3NvugX0wmw 2N+A== 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=ZVGCG9HflTK1KnUqLeYhA3wMze/DAKC11nTUoVWTveU=; b=Q01tGbqCPJ3P9M+bLRceKszonZmcXX0KQ1h0ev7no3Ji2wRpvGKU/omVOAuRDffi3d eYXcoaKOQUr74qjyJFAWKrkRRy4yDkF+J0EW+v8RhFz3+y3QEWZG5bls7TB0M9M1o+Ey 6og/ZklVCX3Duoka+B5dovLPwNoAlTzPD7fB0R9S6menVqRFtus7SxUWb8SvExzKHDfn Zv2+PewBN3VAZg26wnIplUT/mQ+7FFj9sGs+MAnTGDRZrZyWEApKCS9mcFMlvv/My6iZ N6JdW9ajChMVcVezqRXzpqkfS2sgOu5qC1WdPdg1ZxIrHFpBXLwxsLt6/w5H0mtNtjlo SQMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Jk875YNJ; 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 b13si9890034pfi.53.2018.04.08.20.17.25; Sun, 08 Apr 2018 20:18:02 -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=Jk875YNJ; 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 S1755019AbeDIDKy (ORCPT + 99 others); Sun, 8 Apr 2018 23:10:54 -0400 Received: from mail-by2nam03on0117.outbound.protection.outlook.com ([104.47.42.117]:63840 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755043AbeDIAY3 (ORCPT ); Sun, 8 Apr 2018 20:24:29 -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=ZVGCG9HflTK1KnUqLeYhA3wMze/DAKC11nTUoVWTveU=; b=Jk875YNJSLOmrgt1v9wYVkuOvLszNMVJiVkZYOBnnVP5ssfauQhfyiSMeTTr4pWxwY2RuivsgdiKHxvb3sFBXI7RXbqvVlKU30q4GL4+2FLe88kB4ZEU2X1A/CAxsCE4HXRs3Xg2GljOOhcPC1N8vO274RiZ7IJDI32kmddHkvo= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0984.namprd21.prod.outlook.com (52.132.133.30) 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:24:27 +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:24:27 +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.14 083/161] i40e: fix reported mask for ntuple filters Thread-Topic: [PATCH AUTOSEL for 4.14 083/161] i40e: fix reported mask for ntuple filters Thread-Index: AQHTz5ifk1Ml8NB5ok2/Egn8FTd5Vw== Date: Mon, 9 Apr 2018 00:20:54 +0000 Message-ID: <20180409001936.162706-83-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;DM5PR2101MB0984;7:aHZ9Jwr+HJOGAAOe5LaPjtfK7UGNFu8psCK6oPIjo4lTLMUJnlyxq9Of19O7eVAgmb7Zc7sBf7KO/Yktezbj6pgK+No3sN0wFlSR5A0XdNctv47gzYKYZ27F3Yz86quA/rRkLPTLPJevq/SxdtntE080glErACeTQ241/RjYiNdqbFTN6MIFAo/RKlNwTF2NrfnsFbgJirOR+VY0uLCuXEQeZ4LFClRTLDPoT2L03N6b8fZI0nVXg0LRy3KGx3RQ;20:7DqUL3CT2EIvEdaupsuht1hL1DHMqr50zpqEHa55AR1+D7LZlkFB38zm2zWl+bGLderaNr5UEvkZFIwX6L6SrP2YCsMWuAH8V3COz8Ad60BdLjZ5Tvpd2pjxucGZI6foNAvMwqGIpWfZUCKCFqk39HZHHn7pj3x8hoqCNmtVRwo= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: be9d5c05-9fd6-485c-fe95-08d59db040e3 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0984; x-ms-traffictypediagnostic: DM5PR2101MB0984: 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)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0984;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0984; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(346002)(376002)(366004)(39860400002)(396003)(189003)(199004)(5250100002)(2501003)(110136005)(54906003)(6116002)(6436002)(11346002)(1076002)(486006)(25786009)(105586002)(2900100001)(102836004)(86612001)(3846002)(68736007)(107886003)(316002)(10290500003)(5660300001)(86362001)(2616005)(305945005)(4326008)(446003)(6486002)(22452003)(7736002)(476003)(8676002)(81156014)(81166006)(8936002)(6512007)(10090500001)(186003)(3280700002)(106356001)(76176011)(2906002)(99286004)(26005)(97736004)(14454004)(6666003)(478600001)(53936002)(6506007)(36756003)(72206003)(66066001)(3660700001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0984;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: 9D8l7hIqj2yPkHLrk0RLEc3gl201AJyZgA7ZmoAhkh+m2L6ppx6NCR2ElSANKy6sPB19+ij1bXPPybNn1906j8EUgH4n4CX3yTE/fHsvqJoRsNyyH9lae/KwSGxu+xeyr1wFX/TMngyilqCQh4W2mq0b3IPqbTJUKLLQWIsj7z1FgEwCWSu/+mW4OKtTA0Zlg5X7Hp7dfG8i8ruU1GY5mzrmpMBCBj78GJ1JcqV76s+m2ghtwEmQmgz0sPWTZHo+jVd499TcT9CVxBrZWtCaUn0f4/6HF3MHAC5WmQ16iSLIBhDQyw77nxIkkp0E4W7Zv4jConXP8TWC2myKeMWeGVr0SeSlqKSs961z0pfdo7+9JEZ+waBXil3p2JswqNaYQgG6BNq8ofa9EyLJE4ZQ/zH6MoFOJ4dsVA45dwmEQUI= 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: be9d5c05-9fd6-485c-fe95-08d59db040e3 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:20:54.0971 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0984 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 fc27ba5caa55..ef22793d6a03 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c @@ -2588,16 +2588,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