crypto/mlx5: add WQE set initialization
[dpdk.git] / drivers / net / mlx5 / windows / mlx5_os.c
index 3fe3f55..5da362a 100644 (file)
@@ -30,8 +30,6 @@
 #include "mlx5_flow.h"
 #include "mlx5_devx.h"
 
-#define MLX5_TAGS_HLIST_ARRAY_SIZE 8192
-
 static const char *MZ_MLX5_PMD_SHARED_DATA = "mlx5_pmd_shared_data";
 
 /* Spinlock for mlx5_shared_data allocation. */
@@ -563,10 +561,11 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
        eth_dev->rx_queue_count = mlx5_rx_queue_count;
        /* Register MAC address. */
        claim_zero(mlx5_mac_addr_add(eth_dev, &mac, 0, 0));
-       priv->flows = 0;
        priv->ctrl_flows = 0;
        TAILQ_INIT(&priv->flow_meters);
-       TAILQ_INIT(&priv->flow_meter_profiles);
+       priv->mtr_profile_tbl = mlx5_l3t_create(MLX5_L3T_TYPE_PTR);
+       if (!priv->mtr_profile_tbl)
+               goto error;
        /* Bring Ethernet device up. */
        DRV_LOG(DEBUG, "port %u forcing Ethernet interface up.",
                eth_dev->data->port_id);
@@ -609,10 +608,10 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
                        err = ENOTSUP;
                        goto error;
        }
-       mlx5_cache_list_init(&priv->hrxqs, "hrxq", 0, eth_dev,
-                            mlx5_hrxq_create_cb,
-                            mlx5_hrxq_match_cb,
-                            mlx5_hrxq_remove_cb);
+       priv->hrxqs = mlx5_list_create("hrxq", eth_dev, true,
+               mlx5_hrxq_create_cb, mlx5_hrxq_match_cb,
+               mlx5_hrxq_remove_cb, mlx5_hrxq_clone_cb,
+               mlx5_hrxq_clone_free_cb);
        /* Query availability of metadata reg_c's. */
        err = mlx5_flow_discover_mreg_c(eth_dev);
        if (err < 0) {
@@ -644,6 +643,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
        return eth_dev;
 error:
        if (priv) {
+               if (priv->mtr_profile_tbl)
+                       mlx5_l3t_destroy(priv->mtr_profile_tbl);
                if (own_domain_id)
                        claim_zero(rte_eth_switch_domain_free(priv->domain_id));
                mlx5_free(priv);