net/mlx5: engage free on completion queue
[dpdk.git] / drivers / net / mlx5 / mlx5.c
index 59ae408..ffee39c 100644 (file)
@@ -868,8 +868,13 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
 {
        struct mlx5_ibv_shared *sh = priv->sh;
        char s[MLX5_HLIST_NAMESIZE];
-       int err = mlx5_alloc_table_hash_list(priv);
+       int err = 0;
 
+       if (!sh->flow_tbls)
+               err = mlx5_alloc_table_hash_list(priv);
+       else
+               DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse\n",
+                       (void *)sh->flow_tbls);
        if (err)
                return err;
        /* Create tags hash list table. */
@@ -2256,7 +2261,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
                tunnel_en = ((dv_attr.tunnel_offloads_caps &
                              MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_VXLAN) &&
                             (dv_attr.tunnel_offloads_caps &
-                             MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE));
+                             MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE) &&
+                            (dv_attr.tunnel_offloads_caps &
+                             MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GENEVE));
        }
        DRV_LOG(DEBUG, "tunnel offloading is %ssupported",
                tunnel_en ? "" : "not ");
@@ -2428,7 +2435,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
        !defined(HAVE_IBV_DEVICE_COUNTERS_SET_V45)
        DRV_LOG(DEBUG, "counters are not supported");
 #endif
-#ifndef HAVE_IBV_FLOW_DV_SUPPORT
+#if !defined(HAVE_IBV_FLOW_DV_SUPPORT) || !defined(HAVE_MLX5DV_DR)
        if (config.dv_flow_en) {
                DRV_LOG(WARNING, "DV flow is not supported");
                config.dv_flow_en = 0;
@@ -2479,7 +2486,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
        else
                config.mps = config.mps ? mps : MLX5_MPW_DISABLED;
        DRV_LOG(INFO, "%sMPS is %s",
-               config.mps == MLX5_MPW_ENHANCED ? "enhanced " : "",
+               config.mps == MLX5_MPW_ENHANCED ? "enhanced " :
+               config.mps == MLX5_MPW ? "legacy " : "",
                config.mps != MLX5_MPW_DISABLED ? "enabled" : "disabled");
        if (config.cqe_comp && !cqe_comp) {
                DRV_LOG(WARNING, "Rx CQE compression isn't supported");
@@ -2946,6 +2954,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
        struct mlx5_dev_config dev_config;
        int ret;
 
+       if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+               mlx5_pmd_socket_init();
        ret = mlx5_init_once();
        if (ret) {
                DRV_LOG(ERR, "unable to init PMD global data: %s",