crypto/mlx5: add WQE set initialization
[dpdk.git] / drivers / net / mlx5 / windows / mlx5_os.c
index 5e53042..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. */
@@ -420,8 +418,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
        err = mlx5_dev_check_sibling_config(priv, config);
        if (err)
                goto error;
-       DRV_LOG(DEBUG, "checksum offloading is %ssupported",
-               (config->hw_csum ? "" : "not "));
        DRV_LOG(DEBUG, "counters are not supported");
        config->ind_table_max_size =
                sh->device_attr.max_rwq_indirection_table_size;
@@ -464,6 +460,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
                        sh->cmng.relaxed_ordering_read =
                                config->hca_attr.relaxed_ordering_read;
                }
+               config->hw_csum = config->hca_attr.csum_cap;
+               DRV_LOG(DEBUG, "checksum offloading is %ssupported",
+                   (config->hw_csum ? "" : "not "));
        }
        if (config->devx) {
                uint32_t reg[MLX5_ST_SZ_DW(register_mtutc)];
@@ -562,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);
@@ -608,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) {
@@ -643,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);