compress/mlx5: fix double close for context device
PATCH 1/1 compress/mlx5: fix double close for context device
From: Michael Baum <[email protected]>
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.
--- drivers/compress/mlx5/mlx5_compress.c | 1 - 1 file changed, 1 deletion(-)
drivers/compress/mlx5/mlx5_compress.c +0 -1
@@ -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 ; }
Signature · 1 line
2.25.1
From: Michael Baum
Quoted 9 lines
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.
Quoted 6 lines
Remove the redundent closing from compress probe.
Fixes 2efd26544554 ("compress/mlx5: support partial transformation")Signed-off-by Michael Baum <[email protected]>
PATCH v2 1/1 compress/mlx5: fix double close for context device
In reply to [email protected]From: Michael Baum <[email protected]>
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.
---
v2: Improve commit log according to checkpatch warning.
Add "Acked-by" inside.
drivers/compress/mlx5/mlx5_compress.c | 1 - 1 file changed, 1 deletion(-)
drivers/compress/mlx5/mlx5_compress.c +0 -1
@@ -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 ; }
Signature · 1 line
2.25.1
Akhil Goyal
AppliedQuoted 11 lines
From: Michael Baum <[email protected]>
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.
Quoted 7 lines
Remove the redundant closing from compress probe.
Fixes 2efd26544554 ("compress/mlx5: support partial transformation")Signed-off-by Michael Baum <[email protected]>Acked-by Matan Azrad <[email protected]>
Applied to dpdk-next-crypto
Please cc all crypto/compression related patches to me in future.