crypto/mlx5: add WQE set initialization
[dpdk.git] / drivers / net / mlx5 / mlx5.c
index fd675c9..021a34d 100644 (file)
@@ -217,7 +217,8 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
                .grow_trunk = 3,
                .grow_shift = 2,
                .need_lock = 1,
-               .release_mem_en = 1,
+               .release_mem_en = 0,
+               .per_core_cache = (1 << 16),
                .malloc = mlx5_malloc,
                .free = mlx5_free,
                .type = "mlx5_tag_ipool",
@@ -376,7 +377,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
 #define MLX5_FLOW_MIN_ID_POOL_SIZE 512
 #define MLX5_ID_GENERATION_ARRAY_FACTOR 16
 
-#define MLX5_FLOW_TABLE_HLIST_ARRAY_SIZE 4096
+#define MLX5_FLOW_TABLE_HLIST_ARRAY_SIZE 1024
 
 /**
  * Decide whether representor ID is a HPF(host PF) port on BF2.
@@ -797,11 +798,14 @@ mlx5_flow_ipool_create(struct mlx5_dev_ctx_shared *sh,
                if (config->reclaim_mode) {
                        cfg.release_mem_en = 1;
                        cfg.per_core_cache = 0;
+               } else {
+                       cfg.release_mem_en = 0;
                }
                sh->ipool[i] = mlx5_ipool_create(&cfg);
        }
 }
 
+
 /**
  * Release the flow resources' indexed mempool.
  *
@@ -815,6 +819,9 @@ mlx5_flow_ipool_destroy(struct mlx5_dev_ctx_shared *sh)
 
        for (i = 0; i < MLX5_IPOOL_MAX; ++i)
                mlx5_ipool_destroy(sh->ipool[i]);
+       for (i = 0; i < MLX5_MAX_MODIFY_NUM; ++i)
+               if (sh->mdh_ipools[i])
+                       mlx5_ipool_destroy(sh->mdh_ipools[i]);
 }
 
 /*
@@ -1125,6 +1132,7 @@ mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn,
        }
        sh->refcnt = 1;
        sh->max_port = spawn->max_port;
+       sh->reclaim_mode = config->reclaim_mode;
        strncpy(sh->ibdev_name, mlx5_os_get_ctx_device_name(sh->ctx),
                sizeof(sh->ibdev_name) - 1);
        strncpy(sh->ibdev_path, mlx5_os_get_ctx_device_path(sh->ctx),