[RFC,20/21] crypto/mlx5: use HCA attributes from context device

Message ID 20210817134441.1966618-21-michaelba@nvidia.com (mailing list archive)
State RFC, archived
Delegated to: Raslan Darawsheh
Headers
Series mlx5: sharing global MR cache between drivers |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Michael Baum Aug. 17, 2021, 1:44 p.m. UTC
  Use HCA attributes from context device structure, instead of query it
for itself.

Signed-off-by: Michael Baum <michaelba@nvidia.com>
---
 drivers/crypto/mlx5/mlx5_crypto.c | 8 --------
 1 file changed, 8 deletions(-)
  

Patch

diff --git a/drivers/crypto/mlx5/mlx5_crypto.c b/drivers/crypto/mlx5/mlx5_crypto.c
index 4f390c8bf4..734ca63d89 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.c
+++ b/drivers/crypto/mlx5/mlx5_crypto.c
@@ -949,7 +949,6 @@  mlx5_crypto_dev_probe(struct mlx5_common_device *dev)
 	struct mlx5_devx_obj *login;
 	struct mlx5_crypto_priv *priv;
 	struct mlx5_crypto_devarg_params devarg_prms = { 0 };
-	struct mlx5_hca_attr attr = { 0 };
 	struct rte_cryptodev_pmd_init_params init_params = {
 		.name = "",
 		.private_data_size = sizeof(struct mlx5_crypto_priv),
@@ -966,13 +965,6 @@  mlx5_crypto_dev_probe(struct mlx5_common_device *dev)
 		rte_errno = ENOTSUP;
 		return -rte_errno;
 	}
-	if (mlx5_devx_cmd_query_hca_attr(dev_ctx->ctx, &attr) != 0 ||
-	    attr.crypto == 0 || attr.aes_xts == 0) {
-		DRV_LOG(ERR, "Not enough capabilities to support crypto "
-			"operations, maybe old FW/OFED version?");
-		rte_errno = ENOTSUP;
-		return -ENOTSUP;
-	}
 	ret = mlx5_crypto_parse_devargs(dev->dev->devargs, &devarg_prms);
 	if (ret) {
 		DRV_LOG(ERR, "Failed to parse devargs.");