common/mlx5: get PCI device address from any bus
[dpdk.git] / drivers / net / mlx5 / mlx5.c
index 640d36c..d9c90d5 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,6 +798,8 @@ 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);
        }
@@ -1129,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),
@@ -2442,7 +2446,7 @@ static const struct rte_pci_id mlx5_pci_id_map[] = {
 };
 
 static struct mlx5_pci_driver mlx5_driver = {
-       .driver_class = MLX5_CLASS_NET,
+       .driver_class = MLX5_CLASS_ETH,
        .pci_driver = {
                .driver = {
                        .name = MLX5_PCI_DRIVER_NAME,