DPDK patches and discussions
 help / color / mirror / Atom feed
From: <michaelba@nvidia.com>
To: <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>,
	Michael Baum <michaelba@nvidia.com>, <stable@dpdk.org>
Subject: [PATCH v2] compress/mlx5: fix double close for context device
Date: Thu, 25 Nov 2021 10:18:29 +0200	[thread overview]
Message-ID: <20211125081829.3149790-1-michaelba@nvidia.com> (raw)
In-Reply-To: <20211125072445.3146615-1-michaelba@nvidia.com>

From: Michael Baum <michaelba@nvidia.com>

The context of the device opens once in the common probe and closes with
its removal.

If the probe of one of the drivers fails, it releases its resources and
then the common closes the context.
But mistakenly in the compress probe, if there isn't enough capabilities
to support compress operations, it closes the device and then common
probe closes it again.

Remove the redundant closing from compress probe.

Fixes: 2efd26544554 ("compress/mlx5: support partial transformation")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
v2: Improve commit log according to checkpatch warning.
    Add "Acked-by" inside.

 drivers/compress/mlx5/mlx5_compress.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index bb0dc3a5d2..82b871bd86 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -723,7 +723,6 @@ mlx5_compress_dev_probe(struct mlx5_common_device *cdev)
 		&& !attr->mmo_compress_qp_en && !attr->mmo_compress_sq_en
 		&& !attr->mmo_dma_qp_en && !attr->mmo_dma_sq_en) {
 		DRV_LOG(ERR, "Not enough capabilities to support compress operations, maybe old FW/OFED version?");
-		claim_zero(mlx5_glue->close_device(cdev->ctx));
 		rte_errno = ENOTSUP;
 		return -ENOTSUP;
 	}
-- 
2.25.1


  parent reply	other threads:[~2021-11-25  8:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25  7:24 [PATCH] " michaelba
2021-11-25  8:11 ` Matan Azrad
2021-11-25  8:18 ` michaelba [this message]
2021-11-25 10:21   ` [EXT] [PATCH v2] " Akhil Goyal

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=20211125081829.3149790-1-michaelba@nvidia.com \
    --to=michaelba@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=stable@dpdk.org \
    /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).