From patchwork Mon Dec 18 05:20:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xing, Beilei" X-Patchwork-Id: 32344 X-Patchwork-Delegate: helin.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 46DE5E5D; Mon, 18 Dec 2017 06:20:23 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 2141A1D7 for ; Mon, 18 Dec 2017 06:20:21 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Dec 2017 21:20:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,420,1508828400"; d="scan'208";a="3346506" Received: from unknown (HELO dpdk9.sh.intel.com) ([10.67.118.52]) by fmsmga008.fm.intel.com with ESMTP; 17 Dec 2017 21:20:19 -0800 From: Beilei Xing To: qi.z.zhang@intel.com Cc: dev@dpdk.org Date: Mon, 18 Dec 2017 13:20:57 +0800 Message-Id: <1513574457-47623-1-git-send-email-beilei.xing@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [dpdk-dev] [PATCH] net/i40e: fix FDIR input set conflict 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" The first FDIR rule for some PCTYPE will configure input set and create flow, the following flows must use the same input set, otherwise will cause input set conflict and fail to create flow. But if creating the first rule after flow flush, input set should be re-configured. Fixes: 42044b69c67d ("net/i40e: support input set selection for FDIR") c: stable@dpdk.org Signed-off-by: Beilei Xing Acked-by: Qi Zhang --- drivers/net/i40e/i40e_flow.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 7e4936e..a9e7a0d 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -4406,6 +4406,7 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf) struct rte_eth_dev *dev = pf->adapter->eth_dev; struct i40e_fdir_info *fdir_info = &pf->fdir; struct i40e_fdir_filter *fdir_filter; + enum i40e_filter_pctype pctype; struct rte_flow *flow; void *temp; int ret; @@ -4427,6 +4428,10 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf) rte_free(flow); } } + + for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP; + pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) + pf->fdir.inset_flag[pctype] = 0; } return ret;