DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dekel Peled <dekelp@mellanox.com>
To: yskoh@mellanox.com, viacheslavo@mellanox.com, shahafs@mellanox.com
Cc: orika@mellanox.com, dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix Rx queue release of resources
Date: Wed, 24 Jul 2019 11:54:19 +0300	[thread overview]
Message-ID: <657215c5e0635b452d5245cd0bfbdcf8315baf6a.1563958238.git.dekelp@mellanox.com> (raw)
In-Reply-To: <0bf488cf0466b23710a4cf2cd68943a3354de6ef.1563896047.git.dekelp@mellanox.com>

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: 69abf7b1db4a ("net/mlx5: create advanced RxQ using new API")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 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 c9df8b0..441f158 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -573,8 +573,10 @@
 		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;
+	}
 }
 
 /**
-- 
1.8.3.1


  parent reply	other threads:[~2019-07-24  8:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 15:34 [dpdk-dev] [PATCH] " Dekel Peled
2019-07-24  5:03 ` Slava Ovsiienko
2019-07-24  7:53 ` Raslan Darawsheh
2019-07-24  8:54 ` Dekel Peled [this message]
2019-07-24  9:05   ` [dpdk-dev] [PATCH v3] " Dekel Peled
2019-07-24 11:25     ` Raslan Darawsheh
2019-07-24 20:23     ` Matan Azrad

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=657215c5e0635b452d5245cd0bfbdcf8315baf6a.1563958238.git.dekelp@mellanox.com \
    --to=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=orika@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=viacheslavo@mellanox.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).