From: Qi Zhang Date: Wed, 3 Jul 2019 06:34:49 +0000 (+0800) Subject: net/i40e: fix unexpected skip FDIR setup X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c3be43817cfb2cac9276cbef9f7fd2bec20cc1cb;p=dpdk.git 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 --- 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) {