From patchwork Tue Sep 15 06:52:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 77685 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 51716A04C7; Tue, 15 Sep 2020 09:08:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 276F41C000; Tue, 15 Sep 2020 09:08:05 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id E0B9A1BF7F; Tue, 15 Sep 2020 09:08:03 +0200 (CEST) IronPort-SDR: I024z+g3NcYfToSItlb6XyYzOBc5GUCesa6G/7Yv8k/pViE3fW1TV2eXuyeKgyW0pTdZ4NWOBo NgtLyW2n5J1Q== X-IronPort-AV: E=McAfee;i="6000,8403,9744"; a="139222038" X-IronPort-AV: E=Sophos;i="5.76,429,1592895600"; d="scan'208";a="139222038" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2020 00:08:03 -0700 IronPort-SDR: ndIM+gT6s5sLfPPL2DCWmLGq/c8q329hxbJ0Da8Ebq2ocGLloEnsg/iHjl8wKXjUg/uNG4OW8g 0VyW61DiI36A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,429,1592895600"; d="scan'208";a="319330298" Received: from unknown (HELO localhost.localdomain) ([10.239.255.52]) by orsmga002.jf.intel.com with ESMTP; 15 Sep 2020 00:08:00 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Jeff Guo , Beilei Xing , Guinan Sun , stable@dpdk.org Date: Tue, 15 Sep 2020 06:52:25 +0000 Message-Id: <20200915065225.21969-1-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/i40e: fix recreate a flexible FDIR rule failed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch fixes the failure of recreate flexible fdir rule. The root cause is that the flex_mask_flag is not reset during flow destroy and flow flush. Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR") Cc: stable@dpdk.org Signed-off-by: Guinan Sun Acked-by: Qi Zhang fdir.flex_mask_flag[pctype] = 0; + if (fdir_info->fdir_invalprio == 1) wait_status = false; } diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 51d8fdd79..adc5da1c5 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -5679,8 +5679,10 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf) I40E_MAX_FDIR_FILTER_NUM); for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP; - pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) + pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) { pf->fdir.inset_flag[pctype] = 0; + pf->fdir.flex_mask_flag[pctype] = 0; + } /* Disable FDIR processing as all FDIR rules are now flushed */ i40e_fdir_rx_proc_enable(dev, 0);