Received: by 10.192.165.148 with SMTP id m20csp557258imm; Wed, 25 Apr 2018 04:13:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Os8jcqCHYewMW7m911h2iK1u9mSvmVU35XH0QsL7L5EVgOTCLIfJYhgTPC4sxaDqsOQ5m X-Received: by 2002:a17:902:8501:: with SMTP id bj1-v6mr28237730plb.239.1524654816686; Wed, 25 Apr 2018 04:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524654816; cv=none; d=google.com; s=arc-20160816; b=JLDgb6gFT9c7wDR4faotAKHbahQMvuCbF0TRWkINUYxby4Smdtkn5eInRj3eO7fMyx SSr30JnTncUw2purEsvAip2eiCu/FZj5xU5b6FnVqvYvcw9PMppLf8loKO5vyKqFNZBg pOUGzUC4Hefw6xJ7fTS6ydHhbneP5yQRrT5gacfTKUUbDap6KTBaRpdxUckGhjNC076+ sbQi1iYVOKI61A7ZgWWKGBs2rw6VZi5N8e+6mtH/QFjpOYtiJMX/OpzUm+7hbHaodtAQ V3LeanFNLTs4qxJJ6Vv7V8Xqp4SNtuEKBjS9eJc+JRQY2zqXxd3R/LMOD97g5/Z4lPjr uFhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=05CYZNBOEI2QjlahkmKzvKXxnMH+Dkx7bO0/ovAPoio=; b=uTXqppm02A0hGOF0HU/rnnvCqerMhvTXxGkXyLNk62BPMt6FrZ3xymE99saCilWp4A LNBbF4ZSPjUg8ICQUsNUcGF5tqNbdV2HnOSf8h5FGiEQyYRzA/BUUqo82PFny2N5l7K5 0BdWCJcinjh/3F3S4CGtIyeW7kTJMP4QUYBgyPVAj3NsJyxXJfJ093P3oGyMUExtlb0e NVgrv8uDX2q/9sNXi1E+8+hCy+ktOAgt/trL63IHJfZpa7Aq+UXs8ckg6ELgTL6WqeFL UNdjuSDupxJIjq9GydU44ger/G20WRNfV2M18Zdqeio9tSaS8yzlF5ixf8ZG22Te0+d5 3L8Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w71si15870545pfd.273.2018.04.25.04.13.22; Wed, 25 Apr 2018 04:13:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753766AbeDYLLK (ORCPT + 99 others); Wed, 25 Apr 2018 07:11:10 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52248 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751871AbeDYKk4 (ORCPT ); Wed, 25 Apr 2018 06:40:56 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D3575480; Wed, 25 Apr 2018 10:40:55 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jacob Keller , Andrew Bowers , Jeff Kirsher , Sasha Levin Subject: [PATCH 4.14 094/183] i40e: program fragmented IPv4 filter input set Date: Wed, 25 Apr 2018 12:35:14 +0200 Message-Id: <20180425103246.253088598@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103242.532713678@linuxfoundation.org> References: <20180425103242.532713678@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 10 ++++++++++ drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++ 2 files changed, 13 insertions(+) --- 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(str i40e_write_fd_input_set(pf, index, new_mask); + /* 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 == 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 = i40e_add_flex_offset(&pf->l4_flex_pit_list, src_offset, --- 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 /* 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); } /**