From: Ori Kam <orika@mellanox.com>
To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com,
yskoh@mellanox.com
Cc: dev@dpdk.org, orika@mellanox.com
Subject: [dpdk-dev] [PATCH] net/mlx5: fix counter set destroy order
Date: Mon, 30 Oct 2017 14:46:54 +0200 [thread overview]
Message-ID: <1509367614-1626-1-git-send-email-orika@mellanox.com> (raw)
The counter set should be destroyed only after the flow was destroyed.
Fixes: 9a761de ("net/mlx5: flow counter support")
Cc: orika@mellanox.com
Signed-off-by: Ori Kam <orika@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
next reply other threads:[~2017-10-30 12:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-30 12:46 Ori Kam [this message]
2017-11-01 17:12 ` Yongseok Koh
2017-11-01 20:26 ` 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=1509367614-1626-1-git-send-email-orika@mellanox.com \
--to=orika@mellanox.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=nelio.laranjeiro@6wind.com \
--cc=yskoh@mellanox.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 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).