From fa071809c6dfcc446ac992db41f6f9e0a03259bb Mon Sep 17 00:00:00 2001 From: Dekel Peled Date: Wed, 24 Jul 2019 12:05:11 +0300 Subject: [PATCH] net/mlx5: fix Rx queue release of resources Function rxq_release_rq_resources() releases resources of RQ object created by DevX API. This patch updates this function to properly clear the released resources, to avoid repeated release of the same resource. Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX") Signed-off-by: Dekel Peled Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_rxq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index c9df8b01f6..441f15879d 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -573,8 +573,10 @@ rxq_release_rq_resources(struct mlx5_rxq_ctrl *rxq_ctrl) rte_free((void *)(uintptr_t)rxq_ctrl->rxq.wqes); rxq_ctrl->rxq.wqes = NULL; } - if (rxq_ctrl->wq_umem) + if (rxq_ctrl->wq_umem) { mlx5_glue->devx_umem_dereg(rxq_ctrl->wq_umem); + rxq_ctrl->wq_umem = NULL; + } } /** -- 2.20.1