Received: by 10.213.65.68 with SMTP id h4csp2122201imn; Sun, 8 Apr 2018 20:15:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx49vmbHSfIGMVTOASMJXyuXfxlivJH5nchTBPSFk03UzgvOWq6SvKczd3LhZDivSj2JfVAOT X-Received: by 10.99.123.70 with SMTP id k6mr23769288pgn.292.1523243702990; Sun, 08 Apr 2018 20:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243702; cv=none; d=google.com; s=arc-20160816; b=TPA2CK/QJSJKR+x0pdVLxeZNdZ0Xru/Yzth2DvIRfZOAiPRS2Yuu+U43ktikJ+8VBG OQtbbjzPQOqylk5ZyEBmGC+hWJVe776CNpcwIoMVWL/4LveBZR2Kv3YZ4OdfJWMo74FN yS5FImI/amWlji5yzk9O6Z1524auJDIefVuOkZa7/o1pbXrsSg9Gh8DFjxVjyetFbvvR NRuAvKysUDdDVIS52FZtznU3DJTu93Gd0BtAFj5Erkb4wDqRI5BpYG5EDqfCaaWoa46n /Le7VMz0yhmFIF5UZcohXE+ZIm2gwrB3Gd7o0iervTLG7i5TP62zZrF7qRRM08HQ0lnp 69Sg== 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=HePH618lYiUuWId8hmgkjkZN+NK2FoPznN5QOM4Q7EU=; b=Y40uTrSPTWyVAJY3HrB1FI2DIkWrqR7sgT1lmtxbt7q7DOmDvivIE6rlisSbqiJUkV RGG0ki//7jrYvVsgQYQuuSpuxggjpchSrFPNA626jiC4tjsaQ6KuqbdP57rZhJyaMjCd 8YBZ+rw29kMD+VUeOKNR/JUjCugw6EEszG7u9kgYWqNb8WNzKBp2Bc5nN5sJcsb6O9uy c3shF0VTwuRNVsC8W2Ymv7DsH6/V/rebWxS6PGeeHf0wzMokuD6V0YdzVTd5XVp2ku+Q qoQeqL6uwhSuKcl8Jg8+3ImAwMXtXW5ihyBYFV1IRySv5jea6p8R1CeaTo39uQ73nMLz f2QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ecgl7BCm; 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 g12-v6si13328490pla.133.2018.04.08.20.14.26; Sun, 08 Apr 2018 20:15: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=ecgl7BCm; 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 S1755123AbeDIDLU (ORCPT + 99 others); Sun, 8 Apr 2018 23:11:20 -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 S1755034AbeDIAY2 (ORCPT ); Sun, 8 Apr 2018 20:24:28 -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=HePH618lYiUuWId8hmgkjkZN+NK2FoPznN5QOM4Q7EU=; b=ecgl7BCmYZhZ513JB9/+HBcrXtAWMXuR6stEYeACcOj/U/faQ96ENc0Qy5jrwZqFdOCk8HtEMujvLJDa9YBQvWgbsuYhTJniybWqUl6/ZCDW8waqhVgYWZjfTIO8pk3j6k+qV9RndgQS+guRJyqxBQw/IQoI0s6T243rN9b8FAE= 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:26 +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:26 +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 082/161] i40e: program fragmented IPv4 filter input set Thread-Topic: [PATCH AUTOSEL for 4.14 082/161] i40e: program fragmented IPv4 filter input set Thread-Index: AQHTz5ie7apmLrhhLU+Hre8kqeWstQ== Date: Mon, 9 Apr 2018 00:20:53 +0000 Message-ID: <20180409001936.162706-82-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:hc6j6QE4lUCGOLENSnSr/W8qVVZdP/iH1P0T7iZ7rjyHrrRIdbyf69NDpVaGhFkwhrm0HuLpARxnG9ZKGVNLwkrznSn1D72vYM92j3Rmr2ELpJjeB8DRDi/H0Q+jYEvzNRbrg6Zd8z+eJe4JhrHsoFK/okxJr1rGFNAja2UM0NioUdxXCYqfVgfunDheSaskwZj6AvBhTbOdqL5sPhxxC7FYnCCbbrGn+qxqL4g/o9S4Dw4USe8qA47lmZzCE1uX;20:il4xc1cCRr9qJ6D1NpBbOaMu2cvzpz29EcYdZYaByAtqfVfWLHgb03y7sq4qp11fJgF23ygyH60ULzjItTtr/Sr0ZzbGrxHQ8a0/Xha7YRZzp+5Tomruhj0Yy2lCVNTrNpXYI+lICky7dp6O4iWoDIG9s1S6b6VjNRkcZcaduIs= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: cd7431c5-3f45-44aa-a070-08d59db04084 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)(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)(59450400001)(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: /yuyxOLzkIh4SMnuJ9MgJoKb7rklsSzyThpqC8AVPkGjkrENr2W8WSv5DGVmtZloHl3QyZiIIXTepRp2m0cGfGBOUP7u00zxuijvEMFC08i11XN/l3cyYK/jMYNXjpu2fUn9dffTwKtQBR2lgZnTOFNiBoPZsaLS0ctH4GOzdDBBGlX9k7WsZY/GSilTjjNnYr483gLwHPEHNnEiWyYVNzeF8glfqYWYxIyb/csI5FZ2FmnhILZPSGlwi2RbtF5sfMmso/AIt3YMaKIcKtP0selKxemZd9SsSQrswOuQzWn5YtdeXdOxCndgYVI6xnW/jNxKHw27ns4ZSMM2qoVVzvuPBr5ZgGMv1m/jGBdETTqxQ2xxew5mDh3zQGxEZkIFRsY0jzRrnLOdfUhh4XSPQ4gMlCichaYvVUuqp/4UboA= 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: cd7431c5-3f45-44aa-a070-08d59db04084 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:20:53.2221 (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 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 05e89864f781..fc27ba5caa55 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c @@ -3648,6 +3648,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 b1cde1b051a4..d36b799116e4 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -5828,6 +5828,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