Skip to content

Commit

Permalink
net/i40e: fix flow director rule destroy
Browse files Browse the repository at this point in the history
[ upstream commit 4fe1af8 ]

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: 2e67a7f ("net/i40e: config flow director automatically")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
  • Loading branch information
0day-trouble-maker authored and kevintraynor committed Aug 28, 2019
1 parent e163a6a commit f03e770
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/i40e/i40e_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -4743,7 +4743,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;
Expand Down

0 comments on commit f03e770

Please sign in to comment.