From c3be43817cfb2cac9276cbef9f7fd2bec20cc1cb Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Wed, 3 Jul 2019 14:34:49 +0800 Subject: [PATCH] net/i40e: fix unexpected skip FDIR setup In i40e_flow_flush_fdir_filter, i40e_fdir_teardown is called, so i40e_fdir_setup is required to be called before create a new fdir flow. Bugzilla ID: 265 Fixes: 2e67a7fbf3ff ("net/i40e: config flow director automatically") Cc: stable@dpdk.org Signed-off-by: Qi Zhang Acked-by: Beilei Xing --- drivers/net/i40e/i40e_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index d62b32f173..48a6782a84 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -3175,8 +3175,8 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev, cons_filter_type = RTE_ETH_FILTER_FDIR; - if (dev->data->dev_conf.fdir_conf.mode != - RTE_FDIR_MODE_PERFECT) { + if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT || + pf->fdir.fdir_vsi == NULL) { /* Enable fdir when fdir flow is added at first time. */ ret = i40e_fdir_setup(pf); if (ret != I40E_SUCCESS) { -- 2.20.1