crypto/mlx5: add keytag configuration
[dpdk.git] / drivers / crypto / mlx5 / mlx5_crypto.h
index 949092c..a513e9e 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <mlx5_common_utils.h>
 #include <mlx5_common_devx.h>
+#include <mlx5_common_mr.h>
 
 #define MLX5_CRYPTO_DEK_HTABLE_SZ (1 << 11)
 #define MLX5_CRYPTO_KEY_LENGTH 80
@@ -27,6 +28,9 @@ struct mlx5_crypto_priv {
        struct ibv_pd *pd;
        struct mlx5_hlist *dek_hlist; /* Dek hash list. */
        struct rte_cryptodev_config dev_config;
+       struct mlx5_mr_share_cache mr_scache; /* Global shared MR cache. */
+       struct mlx5_devx_obj *login_obj;
+       uint64_t keytag;
 };
 
 struct mlx5_crypto_qp {
@@ -36,6 +40,7 @@ struct mlx5_crypto_qp {
        void *umem_buf;
        volatile uint32_t *db_rec;
        struct rte_crypto_op **ops;
+       struct mlx5_mr_ctrl mr_ctrl;
 };
 
 struct mlx5_crypto_dek {
@@ -45,6 +50,12 @@ struct mlx5_crypto_dek {
        bool size_is_48; /* Whether the key\data size is 48 bytes or not. */
 } __rte_cache_aligned;
 
+struct mlx5_crypto_devarg_params {
+       bool login_devarg;
+       struct mlx5_devx_crypto_login_attr login_attr;
+       uint64_t keytag;
+};
+
 int
 mlx5_crypto_dek_destroy(struct mlx5_crypto_priv *priv,
                        struct mlx5_crypto_dek *dek);