* [dpdk-dev] [PATCH] net/ixgbe: fix incorrect mask flag
@ 2017-08-02 21:38 Qi Zhang
2017-08-04 23:22 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Qi Zhang @ 2017-08-02 21:38 UTC (permalink / raw)
To: wenzhuo.lu; +Cc: dev, Qi Zhang, stable
After fail to create a flow and if this is the first flow, the
mask_added flag should be reset, or it will prevent a new flow
which require different mask be created, since the mask config
remains impact.
Fixes: 72c135a89f8 ("net/ixgbe: create consistent filter")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ixgbe/ixgbe_flow.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 05df4af..d679608 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -2681,6 +2681,7 @@ ixgbe_flow_create(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;
+ uint8_t first_mask = FALSE;
flow = rte_zmalloc("ixgbe_rte_flow", sizeof(struct rte_flow), 0);
if (!flow) {
@@ -2784,6 +2785,7 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
goto out;
fdir_info->mask_added = TRUE;
+ first_mask = TRUE;
} else {
/**
* Only support one global mask,
@@ -2818,8 +2820,15 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
return flow;
}
- if (ret)
+ if (ret) {
+ /**
+ * clean the mask_added flag if fail to
+ * program
+ **/
+ if (first_mask)
+ fdir_info->mask_added = FALSE;
goto out;
+ }
}
goto out;
--
2.9.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ixgbe: fix incorrect mask flag
2017-08-02 21:38 [dpdk-dev] [PATCH] net/ixgbe: fix incorrect mask flag Qi Zhang
@ 2017-08-04 23:22 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2017-08-04 23:22 UTC (permalink / raw)
To: Qi Zhang; +Cc: dev, wenzhuo.lu, stable
02/08/2017 23:38, Qi Zhang:
> After fail to create a flow and if this is the first flow, the
> mask_added flag should be reset, or it will prevent a new flow
> which require different mask be created, since the mask config
> remains impact.
>
> Fixes: 72c135a89f8 ("net/ixgbe: create consistent filter")
> Cc: stable@dpdk.org
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Applied without ack, on Ferruh's advice, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-04 23:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-02 21:38 [dpdk-dev] [PATCH] net/ixgbe: fix incorrect mask flag Qi Zhang
2017-08-04 23:22 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).