From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6FE5FA09FF; Mon, 28 Dec 2020 06:53:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3BB34C9AA; Mon, 28 Dec 2020 06:53:53 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 9B07C2C2D for ; Mon, 28 Dec 2020 06:53:51 +0100 (CET) IronPort-SDR: RZNdZG/EPjzlNlfFEOFXepjUc2U88AGnWMyWbgiASgO/CMN7WtKDQN6SXQa2ru31rRssytelyH MabZiOVil8DA== X-IronPort-AV: E=McAfee;i="6000,8403,9847"; a="155554348" X-IronPort-AV: E=Sophos;i="5.78,454,1599548400"; d="scan'208";a="155554348" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2020 21:53:49 -0800 IronPort-SDR: udTzwQtnGir6Ry1Y1LRzx5xXhTn6XCnx7+H8njSb9wp9FOvTXOhN/F9UPbvaE4pmQ42tiyDaNh EX/epWMsRyLg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,454,1599548400"; d="scan'208";a="358436570" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.150]) by orsmga002.jf.intel.com with ESMTP; 27 Dec 2020 21:53:48 -0800 From: beilei.xing@intel.com To: jia.guo@intel.com, dev@dpdk.org Cc: Beilei Xing , Chenmin Sun Date: Tue, 29 Dec 2020 13:46:39 +0800 Message-Id: <20201229054639.92132-1-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/i40e: fix flex payload rule conflict issue 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" From: Beilei Xing With the following commands, the second flow can't be created successfully. 1. flow create 0 ingress pattern eth / ipv4 / udp / raw relative is 1 pattern is 0102030405 / end actions drop / end 2. flow destroy 0 rule 0 3. flow create 0 ingress pattern eth / ipv4 / udp / raw relative is 1 pattern is 010203040506 / end actions drop / end The root cause is that a flag for flex pit isn't reset. Reported-by: Chenmin Sun Signed-off-by: Beilei Xing --- drivers/net/i40e/i40e_flow.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index b09ff6590d..3a68274a23 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -5284,6 +5284,7 @@ i40e_flow_destroy(struct rte_eth_dev *dev, enum rte_filter_type filter_type = flow->filter_type; struct i40e_fdir_info *fdir_info = &pf->fdir; int ret = 0; + int i; switch (filter_type) { case RTE_ETH_FILTER_ETHERTYPE: @@ -5299,9 +5300,10 @@ i40e_flow_destroy(struct rte_eth_dev *dev, &((struct i40e_fdir_filter *)flow->rule)->fdir, 0); - /* If the last flow is destroyed, disable fdir. */ if (!ret && TAILQ_EMPTY(&pf->fdir.fdir_list)) { i40e_fdir_rx_proc_enable(dev, 0); + for (i = 0; i < I40E_MAX_FLXPLD_LAYER; i++) + pf->fdir.flex_pit_flag[i] = 0; } break; case RTE_ETH_FILTER_HASH: @@ -5515,6 +5517,9 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf) pf->fdir.flex_mask_flag[pctype] = 0; } + for (i = 0; i < I40E_MAX_FLXPLD_LAYER; i++) + pf->fdir.flex_pit_flag[i] = 0; + /* Disable FDIR processing as all FDIR rules are now flushed */ i40e_fdir_rx_proc_enable(dev, 0); } -- 2.26.2