All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: wenzhuo.lu@intel.com, helin.zhang@intel.com
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>, stable@dpdk.org
Subject: [PATCH v3 2/3] net/ixgbe: fix fdir mask not be reset
Date: Thu,  1 Jun 2017 13:36:44 -0400	[thread overview]
Message-ID: <1496338605-7338-3-git-send-email-qi.z.zhang@intel.com> (raw)
In-Reply-To: <1496338605-7338-1-git-send-email-qi.z.zhang@intel.com>

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 <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_flow.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 60ca8d8..4e64d8d 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:
-- 
2.7.4

  parent reply	other threads:[~2017-06-01 17:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31 19:45 [PATCH v2 0/3] ixgbe: enable flex filter for rte_flow Qi Zhang
2017-05-31 19:45 ` [PATCH v2 1/3] net/ixgbe: remove reduandent code Qi Zhang
2017-06-01  7:05   ` Lu, Wenzhuo
2017-05-31 19:45 ` [PATCH v2 2/3] net/ixgbe: fix fdir mask not be reset Qi Zhang
2017-06-01  7:17   ` Lu, Wenzhuo
2017-05-31 19:45 ` [PATCH v2 3/3] net/ixgbe: enable flex bytes for generic flow API Qi Zhang
2017-06-02  1:49   ` Lu, Wenzhuo
2017-06-02  2:00     ` Zhang, Qi Z
2017-06-02  2:14       ` Lu, Wenzhuo
2017-06-01 17:36 ` [PATCH v3 0/3] ixgbe: enable flex filter for rte_flow Qi Zhang
2017-06-01 17:36   ` [PATCH v3 1/3] net/ixgbe: remove reduandent code Qi Zhang
2017-06-02  1:19     ` Lu, Wenzhuo
2017-06-01 17:36   ` Qi Zhang [this message]
2017-06-01 17:36   ` [PATCH v3 3/3] net/ixgbe: enable flex bytes for generic flow API Qi Zhang
2017-06-06 10:26   ` [PATCH v3 0/3] ixgbe: enable flex filter for rte_flow Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1496338605-7338-3-git-send-email-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.