Received: by 10.213.65.68 with SMTP id h4csp2148041imn; Sun, 8 Apr 2018 20:58:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx48PSUSZDP6nX9SPweqjO+/2LCbp8ddszmBtYw4aRzsImrHUDo5Cn8fej5OHWu22RrdH4E7r X-Received: by 2002:a17:902:6e01:: with SMTP id u1-v6mr36477546plk.96.1523246285536; Sun, 08 Apr 2018 20:58:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523246285; cv=none; d=google.com; s=arc-20160816; b=P120556zQS5LoLxMAJeIly0xyPuQFE49aged9NiBUP2WfigDvxGvVm5/9H+tCcCy8Q haFLWWjzMAbKbB3z8X7+hIgsD1hab8Txolu/Ozsjr8y0YL06sGWgTx5cz5H2HLNUbPOH zpjfkjiNXj+KC4mtzX74tj+C5oFpokgRnhUYn/XkCCw3STqhp8NRij9hpA7mMSiYaH7W oZt/ZeIzWpuKm7k/s2sN1n60AQjEf7uoHtBmCxMa7zAw25dJECmUmKABBMOUh8bdmclu GODPAi23YArT798JrHwaaWpotSws2ne8R1mIMoB+VRq3MrjINqvVsh4Yq3rGKAT3P9Lo 3Q8w== 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=1yMyLhpp3CaL6Hm9l7kThX7o8Iii/NjgX6Ej01JGXfQ=; b=fY3bsgrWMg/0TViXo41Pf7u9d42/9R1PnvYc+1FBBwjGGRhxOPHr6ma5tU+myHqVK0 D5wIbxQoyBtaU5dXRe1+0n7o0SoT6O5TyweglDWFBnHz4y0Sui6SbMoOUdhL8QBDPAm5 EmSa/GR5G7PANzxCvLBViYQeGMLpSJRTW3tMECEZvNxcb1lTJnMDaWmc+jlXoIXe/GFJ EPGTfXSKAj6Xk488EuK2OWTokvJJxt3EGKs+t6b1JlTSRNzRvXK4NvmdMCOeJ1T75KwP MJ/3cKI7IoV/keh80mU3ibZidcWcYmIJOKjgjIdfT9SMnmtfLMVDYZKGn08wWyXHKKLu L32A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ipaDNzPk; 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 1-v6si13851868plo.228.2018.04.08.20.57.28; Sun, 08 Apr 2018 20:58:05 -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=ipaDNzPk; 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 S1754382AbeDIDwy (ORCPT + 99 others); Sun, 8 Apr 2018 23:52:54 -0400 Received: from mail-bn3nam01on0100.outbound.protection.outlook.com ([104.47.33.100]:20288 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753960AbeDIATX (ORCPT ); Sun, 8 Apr 2018 20:19:23 -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=1yMyLhpp3CaL6Hm9l7kThX7o8Iii/NjgX6Ej01JGXfQ=; b=ipaDNzPkCbypbW+fTkfIMfcrycaBLl9bmfma9Mn0rH2RUyfhF4wVhAON1zPgEeb4d1R9sYYieeppmUvl6ymeSVV4WxrSShc9M+zUcgNoLETRrV1+fmxbFRqNHfUOpdIgZI3EtpsQtm1I+lCpig5yJYpzkjxsEmGZyGZj0o76h2E= 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 098/189] i40e: program fragmented IPv4 filter input set Thread-Topic: [PATCH AUTOSEL for 4.15 098/189] i40e: program fragmented IPv4 filter input set Thread-Index: AQHTz5g5C66xvQlTWUeh8figI22L0w== Date: Mon, 9 Apr 2018 00:18:03 +0000 Message-ID: <20180409001637.162453-98-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:UOoglZrKMkhjRsOI8tX/sQYOgLNZFSSp+apY09KcOeO+Rj0o20sIFcv+5aogPwgneetkiSMaVk8O8EhUVCTZtppcuKu4RkefFCyc4wWelhfC0wBkSSkihqJaCGpCZ+Ex+BfrfTI/3W9yr0FTm0fHiOWVwMM+nOakfvwAn8nsU/TZmASa7lAv6/OLHrHc3aZruXmBa2hep19k639fALnwbKe6miQDlYRvSahZ8//7BCY3KJV8FqzgFsa+j9aNlphN;20:dvKUHyGiCCrhQ/8yOvCa/6hfS2+r1zpX6LF1TCAMRB5IUiL3XB2zapeaKK38G9b98PM+RnC96LnUit1aLfMcaJKJXNgKmB/pb2TXKQzMnvq82ZCT8uQU5wmpCREkA1bf0kIXD5ioWqPQ450jhpAOfuMqRTAvzba0X1OWPxK4tLY= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: e1369659-4e0d-4aaa-6451-08d59daf8940 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)(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)(59450400001)(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)(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: 9hqED28jAA+l+OJ15CpxuSfSIPWb+3bwjST4/bKqfXiHphpVdtfm7H7o8AJ3tRqeRc7u2E8GEd7SjA4fGPbjeXIpV8/n8XgFnIb2goj1vpDvXAIeirmQcMmBxF8fTb9hU/BTZ7/cUX/XAtPvc+MzLUqWnLpZ4d5U0lmmu5SinevTQp0Dj+FdMs2RDbORF6+bPoNhsRmxljk/LRSc/62U9M/C0ETJSYwPUJj0qbPibtc4eURGO0dfRDdT2N4yz7d5n3qIKQUZlRwZgas+uzd8SxPvrKLGcUZGM51Bia4Z7ZxvgbZ+fkokJ0PAKyxhOjszkZ3uwS6H4JBATL8JbdadjO2WLO6AN1e+LzwBYdbSped9Wh8vGoKESIEwj2Ug/19hPHjg2xCyvZDi1SZiIqK0zmHwJpNyC+lGjBL013wGWlo= 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: e1369659-4e0d-4aaa-6451-08d59daf8940 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:18:03.8504 (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 02b4016bfe43d2d5ed043be7ffa56cda6a4d1100 ] When implementing support for IP_USER_FLOW filters, we correctly programmed a filter for both the non fragmented IPv4/Other filter, as well as the fragmented IPv4 filters. However, we did not properly program the input set for fragmented IPv4 PCTYPE. This meant that the filters would almost certainly not match, unless the user specified all of the flow types. Add support to program the fragmented IPv4 filter input set. Since we always program these filters together, we'll assume that the two input sets must match, and will thus always program the input sets to the same value. 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 | 10 ++++++++++ drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++ 2 files changed, 13 insertions(+) diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/e= thernet/intel/i40e/i40e_ethtool.c index 5f6cf7212d4f..28daf7e7ccbe 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c @@ -3800,6 +3800,16 @@ static int i40e_check_fdir_input_set(struct i40e_vsi= *vsi, =20 i40e_write_fd_input_set(pf, index, new_mask); =20 + /* IP_USER_FLOW filters match both IPv4/Other and IPv4/Fragmented + * frames. If we're programming the input set for IPv4/Other, we also + * need to program the IPv4/Fragmented input set. Since we don't have + * separate support, we'll always assume and enforce that the two flow + * types must have matching input sets. + */ + if (index =3D=3D I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) + i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_FRAG_IPV4, + new_mask); + /* Add the new offset and update table, if necessary */ if (new_flex_offset) { err =3D i40e_add_flex_offset(&pf->l4_flex_pit_list, src_offset, diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethe= rnet/intel/i40e/i40e_main.c index 973bad818e81..2d9a50c82141 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -7744,6 +7744,9 @@ static void i40e_fdir_filter_exit(struct i40e_pf *pf) /* Reprogram the default input set for Other/IPv4 */ i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_NONF_IPV4_OTHER, I40E_L3_SRC_MASK | I40E_L3_DST_MASK); + + i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_FRAG_IPV4, + I40E_L3_SRC_MASK | I40E_L3_DST_MASK); } =20 /** --=20 2.15.1