Skip to content

Commit

Permalink
net/mlx5: fix ineffective metadata argument adjustment
Browse files Browse the repository at this point in the history
[ upstream commit ad9d0c6 ]

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: 4ec6360 ("net/mlx5: implement tunnel offload")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
  • Loading branch information
michaelbaum1 authored and bluca committed Feb 28, 2022
1 parent 1b7f6d2 commit 8d5484e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/mlx5/linux/mlx5_os.c
Expand Up @@ -868,10 +868,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
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;
}
mlx5_malloc_mem_select(config->sys_mem_en);
sh = mlx5_alloc_shared_dev_ctx(spawn, config);
if (!sh)
Expand Down Expand Up @@ -1111,6 +1107,10 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
}
/* Override some values set by hardware configuration. */
mlx5_args(config, dpdk_dev->devargs);
if (config->dv_miss_info) {
if (switch_info->master || switch_info->representor)
config->dv_xmeta_en = MLX5_XMETA_MODE_META16;
}
err = mlx5_dev_check_sibling_config(priv, config);
if (err)
goto error;
Expand Down

0 comments on commit 8d5484e

Please sign in to comment.