* [dpdk-dev] [PATCH] net/mlx5: fix flow action destroy
@ 2019-04-24 0:56 Yongseok Koh
2019-04-24 0:56 ` Yongseok Koh
2019-04-30 5:23 ` Shahaf Shuler
0 siblings, 2 replies; 4+ messages in thread
From: Yongseok Koh @ 2019-04-24 0:56 UTC (permalink / raw)
To: shahafs; +Cc: dev, orika
ibv_destroy_flow_action() refers to QP. QP must not be freed until
corresponding action is destroyed.
Fixes: 3eb004431072 ("net/mlx5: fix release of jump to queue action")
Cc: orika@mellanox.com
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
drivers/net/mlx5/mlx5_rxq.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 9f27f607b7..0a4c02e71e 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1946,11 +1946,11 @@ int
mlx5_hrxq_release(struct rte_eth_dev *dev, struct mlx5_hrxq *hrxq)
{
if (rte_atomic32_dec_and_test(&hrxq->refcnt)) {
- claim_zero(mlx5_glue->destroy_qp(hrxq->qp));
- mlx5_ind_table_ibv_release(dev, hrxq->ind_table);
#ifdef HAVE_IBV_FLOW_DV_SUPPORT
mlx5_glue->destroy_flow_action(hrxq->action);
#endif
+ claim_zero(mlx5_glue->destroy_qp(hrxq->qp));
+ mlx5_ind_table_ibv_release(dev, hrxq->ind_table);
LIST_REMOVE(hrxq, next);
rte_free(hrxq);
return 0;
@@ -2217,11 +2217,11 @@ mlx5_hrxq_drop_release(struct rte_eth_dev *dev)
struct mlx5_hrxq *hrxq = priv->drop_queue.hrxq;
if (rte_atomic32_dec_and_test(&hrxq->refcnt)) {
- claim_zero(mlx5_glue->destroy_qp(hrxq->qp));
- mlx5_ind_table_ibv_drop_release(dev);
#ifdef HAVE_IBV_FLOW_DV_SUPPORT
mlx5_glue->destroy_flow_action(hrxq->action);
#endif
+ claim_zero(mlx5_glue->destroy_qp(hrxq->qp));
+ mlx5_ind_table_ibv_drop_release(dev);
rte_free(hrxq);
priv->drop_queue.hrxq = NULL;
}
--
2.11.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH] net/mlx5: fix flow action destroy
2019-04-24 0:56 [dpdk-dev] [PATCH] net/mlx5: fix flow action destroy Yongseok Koh
@ 2019-04-24 0:56 ` Yongseok Koh
2019-04-30 5:23 ` Shahaf Shuler
1 sibling, 0 replies; 4+ messages in thread
From: Yongseok Koh @ 2019-04-24 0:56 UTC (permalink / raw)
To: shahafs; +Cc: dev, orika
ibv_destroy_flow_action() refers to QP. QP must not be freed until
corresponding action is destroyed.
Fixes: 3eb004431072 ("net/mlx5: fix release of jump to queue action")
Cc: orika@mellanox.com
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
drivers/net/mlx5/mlx5_rxq.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 9f27f607b7..0a4c02e71e 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1946,11 +1946,11 @@ int
mlx5_hrxq_release(struct rte_eth_dev *dev, struct mlx5_hrxq *hrxq)
{
if (rte_atomic32_dec_and_test(&hrxq->refcnt)) {
- claim_zero(mlx5_glue->destroy_qp(hrxq->qp));
- mlx5_ind_table_ibv_release(dev, hrxq->ind_table);
#ifdef HAVE_IBV_FLOW_DV_SUPPORT
mlx5_glue->destroy_flow_action(hrxq->action);
#endif
+ claim_zero(mlx5_glue->destroy_qp(hrxq->qp));
+ mlx5_ind_table_ibv_release(dev, hrxq->ind_table);
LIST_REMOVE(hrxq, next);
rte_free(hrxq);
return 0;
@@ -2217,11 +2217,11 @@ mlx5_hrxq_drop_release(struct rte_eth_dev *dev)
struct mlx5_hrxq *hrxq = priv->drop_queue.hrxq;
if (rte_atomic32_dec_and_test(&hrxq->refcnt)) {
- claim_zero(mlx5_glue->destroy_qp(hrxq->qp));
- mlx5_ind_table_ibv_drop_release(dev);
#ifdef HAVE_IBV_FLOW_DV_SUPPORT
mlx5_glue->destroy_flow_action(hrxq->action);
#endif
+ claim_zero(mlx5_glue->destroy_qp(hrxq->qp));
+ mlx5_ind_table_ibv_drop_release(dev);
rte_free(hrxq);
priv->drop_queue.hrxq = NULL;
}
--
2.11.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix flow action destroy
2019-04-24 0:56 [dpdk-dev] [PATCH] net/mlx5: fix flow action destroy Yongseok Koh
2019-04-24 0:56 ` Yongseok Koh
@ 2019-04-30 5:23 ` Shahaf Shuler
2019-04-30 5:23 ` Shahaf Shuler
1 sibling, 1 reply; 4+ messages in thread
From: Shahaf Shuler @ 2019-04-30 5:23 UTC (permalink / raw)
To: Yongseok Koh; +Cc: dev, Ori Kam
Wednesday, April 24, 2019 3:56 AM, Yongseok Koh:
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix flow action destroy
>
> ibv_destroy_flow_action() refers to QP. QP must not be freed until
> corresponding action is destroyed.
>
> Fixes: 3eb004431072 ("net/mlx5: fix release of jump to queue action")
> Cc: orika@mellanox.com
>
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Applied to next-net-mlx, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix flow action destroy
2019-04-30 5:23 ` Shahaf Shuler
@ 2019-04-30 5:23 ` Shahaf Shuler
0 siblings, 0 replies; 4+ messages in thread
From: Shahaf Shuler @ 2019-04-30 5:23 UTC (permalink / raw)
To: Yongseok Koh; +Cc: dev, Ori Kam
Wednesday, April 24, 2019 3:56 AM, Yongseok Koh:
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix flow action destroy
>
> ibv_destroy_flow_action() refers to QP. QP must not be freed until
> corresponding action is destroyed.
>
> Fixes: 3eb004431072 ("net/mlx5: fix release of jump to queue action")
> Cc: orika@mellanox.com
>
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Applied to next-net-mlx, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-30 5:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24 0:56 [dpdk-dev] [PATCH] net/mlx5: fix flow action destroy Yongseok Koh
2019-04-24 0:56 ` Yongseok Koh
2019-04-30 5:23 ` Shahaf Shuler
2019-04-30 5:23 ` Shahaf Shuler
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).