DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] compress/mlx5: fix double close for context device
@ 2021-11-25  7:24 michaelba
  2021-11-25  8:11 ` Matan Azrad
  2021-11-25  8:18 ` [PATCH v2] " michaelba
  0 siblings, 2 replies; 4+ messages in thread
From: michaelba @ 2021-11-25  7:24 UTC (permalink / raw)
  To: dev; +Cc: Matan Azrad, Michael Baum, stable

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 ther isn't enough capabilities
to support compress operations, it closes the device and then common
probe closes it again.

Remove the redundent closing from compress probe.

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

Signed-off-by: Michael Baum <michaelba@nvidia.com>
---
 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] compress/mlx5: fix double close for context device
  2021-11-25  7:24 [PATCH] compress/mlx5: fix double close for context device michaelba
@ 2021-11-25  8:11 ` Matan Azrad
  2021-11-25  8:18 ` [PATCH v2] " michaelba
  1 sibling, 0 replies; 4+ messages in thread
From: Matan Azrad @ 2021-11-25  8:11 UTC (permalink / raw)
  To: Michael Baum, dev; +Cc: stable



From: Michael Baum
> 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 ther isn't enough capabilities to
> support compress operations, it closes the device and then common probe
> closes it again.
> 
> Remove the redundent 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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] compress/mlx5: fix double close for context device
  2021-11-25  7:24 [PATCH] compress/mlx5: fix double close for context device michaelba
  2021-11-25  8:11 ` Matan Azrad
@ 2021-11-25  8:18 ` michaelba
  2021-11-25 10:21   ` [EXT] " Akhil Goyal
  1 sibling, 1 reply; 4+ messages in thread
From: michaelba @ 2021-11-25  8:18 UTC (permalink / raw)
  To: dev; +Cc: Matan Azrad, Michael Baum, stable

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [EXT] [PATCH v2] compress/mlx5: fix double close for context device
  2021-11-25  8:18 ` [PATCH v2] " michaelba
@ 2021-11-25 10:21   ` Akhil Goyal
  0 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2021-11-25 10:21 UTC (permalink / raw)
  To: michaelba, dev; +Cc: Matan Azrad, stable

> 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>
Applied to dpdk-next-crypto

Please cc all crypto/compression related patches to me in future.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-25 10:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25  7:24 [PATCH] compress/mlx5: fix double close for context device michaelba
2021-11-25  8:11 ` Matan Azrad
2021-11-25  8:18 ` [PATCH v2] " michaelba
2021-11-25 10:21   ` [EXT] " Akhil Goyal

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git