From 6428e0327cf864f681a5890e18eed622bf607f9f Mon Sep 17 00:00:00 2001 From: Xueming Li Date: Thu, 23 Sep 2021 14:45:26 +0800 Subject: [PATCH] net/mlx5: support new global device syntax This patch support new global device syntax like: bus=pci,addr=BB:DD.F/class=eth/driver=mlx5,devargs,.. In driver parameters check, ignores "driver" key which is part of new global device syntax instead of reporting error. Signed-off-by: Xueming Li Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 02ea2e781e..aa428366b3 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -43,6 +43,9 @@ #define MLX5_ETH_DRIVER_NAME mlx5_eth +/* Driver type key for new device global syntax. */ +#define MLX5_DRIVER_KEY "driver" + /* Device parameter to enable RX completion queue compression. */ #define MLX5_RXQ_CQE_COMP_EN "rxq_cqe_comp_en" @@ -1862,7 +1865,7 @@ mlx5_args_check(const char *key, const char *val, void *opaque) signed long tmp; /* No-op, port representors are processed in mlx5_dev_spawn(). */ - if (!strcmp(MLX5_REPRESENTOR, key)) + if (!strcmp(MLX5_DRIVER_KEY, key) || !strcmp(MLX5_REPRESENTOR, key)) return 0; errno = 0; tmp = strtol(val, NULL, 0); @@ -2016,6 +2019,7 @@ int mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs) { const char **params = (const char *[]){ + MLX5_DRIVER_KEY, MLX5_RXQ_CQE_COMP_EN, MLX5_RXQ_PKT_PAD_EN, MLX5_RX_MPRQ_EN, -- 2.20.1