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 54304A046B for ; Tue, 23 Jul 2019 06:08:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5D0BD1BF57; Tue, 23 Jul 2019 06:08:51 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 70A69A3; Tue, 23 Jul 2019 06:08:48 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2019 21:08:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,297,1559545200"; d="scan'208";a="344620309" Received: from dpdk_yexl_af_xdp.sh.intel.com ([10.67.119.189]) by orsmga005.jf.intel.com with ESMTP; 22 Jul 2019 21:08:46 -0700 From: Xiaolong Ye To: Ferruh Yigit , Beilei Xing , Qi Zhang Cc: dev@dpdk.org, Xiaolong Ye , stable@dpdk.org, xiaoyun.li@intel.com Date: Mon, 22 Jul 2019 20:06:38 +0800 Message-Id: <20190722120639.62468-2-xiaolong.ye@intel.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190722120639.62468-1-xiaolong.ye@intel.com> References: <20190722120639.62468-1-xiaolong.ye@intel.com> Subject: [dpdk-stable] [PATCH 2/2] net/i40e: fix fdir rule destroy failure X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" We should tear down the fdir when the last flow is destroyed, current logic is opposite to expected behavior, this patch fixes this issue. Fixes: 2e67a7fbf3ff ("net/i40e: config flow director automatically") Cc: stable@dpdk.org Cc: xiaoyun.li@intel.com Signed-off-by: Xiaolong Ye --- drivers/net/i40e/i40e_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 3c0af70c0..c60c9e240 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -4771,7 +4771,7 @@ 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)) { + if (!ret && TAILQ_EMPTY(&pf->fdir.fdir_list)) { i40e_fdir_teardown(pf); dev->data->dev_conf.fdir_conf.mode = RTE_FDIR_MODE_NONE; -- 2.17.0