From: Qi Zhang Date: Thu, 1 Jun 2017 17:36:44 +0000 (-0400) Subject: net/ixgbe: fix fdir mask not be reset X-Git-Tag: spdx-start~3081 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8d702249d58e01429cab988d28b95921ebf1d590;p=dpdk.git net/ixgbe: fix fdir mask not be reset When the last fdir flow be destroyed, the flag "mask_added" should be reset, so the remain mask info will not take effect when a new flow be added. Fixes: a14de8b498d1 ("net/ixgbe: destroy consistent filter") Cc: stable@dpdk.org Signed-off-by: Qi Zhang Acked-by: Wenzhuo Lu --- diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index ba6c0d3af2..c893ba63e3 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -2639,6 +2639,8 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev, struct ixgbe_eth_l2_tunnel_conf_ele *l2_tn_filter_ptr; struct ixgbe_fdir_rule_ele *fdir_rule_ptr; struct ixgbe_flow_mem *ixgbe_flow_mem_ptr; + struct ixgbe_hw_fdir_info *fdir_info = + IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private); switch (filter_type) { case RTE_ETH_FILTER_NTUPLE: @@ -2691,6 +2693,8 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev, TAILQ_REMOVE(&filter_fdir_list, fdir_rule_ptr, entries); rte_free(fdir_rule_ptr); + if (TAILQ_EMPTY(&filter_fdir_list)) + fdir_info->mask_added = false; } break; case RTE_ETH_FILTER_L2_TUNNEL: