]> git.droids-corp.org - dpdk.git/commitdiff
net/mlx5: fix ineffective metadata argument adjustment
authorMichael Baum <michaelba@nvidia.com>
Mon, 14 Feb 2022 09:34:53 +0000 (11:34 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Mon, 21 Feb 2022 10:36:38 +0000 (11:36 +0100)
In "dv_xmeta_en" devarg there is an option of dv_xmeta_en=3 which
engages tunnel offload mode. In E-Switch configuration, that mode
implicitly activates dv_xmeta_en=1.

The update according to E-switch support is done immediately after the
first parsing of the devargs, but there is another adjustment later.

This patch moves the adjustment after the second parsing.

Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c

index e157795b638786f7e0c2a65926ec0a1b76336d9d..69d3e1e3adb0d2c6a5438d1bc841800eff6306c9 100644 (file)
@@ -977,10 +977,6 @@ err_secondary:
                        strerror(rte_errno));
                goto error;
        }
-       if (config->dv_miss_info) {
-               if (switch_info->master || switch_info->representor)
-                       config->dv_xmeta_en = MLX5_XMETA_MODE_META16;
-       }
        sh = mlx5_alloc_shared_dev_ctx(spawn, config);
        if (!sh)
                return NULL;
@@ -1242,6 +1238,10 @@ err_secondary:
        /* Override some values set by hardware configuration. */
        mlx5_args(config, dpdk_dev->devargs);
        /* Update final values for devargs before check sibling config. */
+       if (config->dv_miss_info) {
+               if (switch_info->master || switch_info->representor)
+                       config->dv_xmeta_en = MLX5_XMETA_MODE_META16;
+       }
 #if !defined(HAVE_IBV_FLOW_DV_SUPPORT) || !defined(HAVE_MLX5DV_DR)
        if (config->dv_flow_en) {
                DRV_LOG(WARNING, "DV flow is not supported.");