[dpdk-dev] [PATCH] net/mlx5: fix counter set destroy order
Ori Kam
orika at mellanox.com
Mon Oct 30 13:46:54 CET 2017
The counter set should be destroyed only after the flow was destroyed.
Fixes: 9a761de ("net/mlx5: flow counter support")
Cc: orika at mellanox.com
Signed-off-by: Ori Kam <orika at mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 3999b84..e810a3a 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2001,10 +2001,6 @@ struct rte_flow *
{
unsigned int i;
- if (flow->cs) {
- claim_zero(ibv_destroy_counter_set(flow->cs));
- flow->cs = NULL;
- }
if (flow->drop || !flow->mark)
goto free;
for (i = 0; i != flow->queues_n; ++i) {
@@ -2053,6 +2049,10 @@ struct rte_flow *
rte_free(frxq->ibv_attr);
}
}
+ if (flow->cs) {
+ claim_zero(ibv_destroy_counter_set(flow->cs));
+ flow->cs = NULL;
+ }
TAILQ_REMOVE(list, flow, next);
DEBUG("Flow destroyed %p", (void *)flow);
rte_free(flow);
--
1.7.1
More information about the dev
mailing list