From 4fe1af80dd50bc44ac8ff2f395e8584f305b879c Mon Sep 17 00:00:00 2001 From: Xiaolong Ye Date: Mon, 22 Jul 2019 20:06:38 +0800 Subject: [PATCH] net/i40e: fix flow director rule destroy 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 Signed-off-by: Xiaolong Ye Acked-by: Beilei Xing --- 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 3c0af70c0c..c60c9e2402 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.20.1