> -----Original Message----- > From: Xueming Li <xuemi...@nvidia.com> > Sent: Monday, January 18, 2021 17:27 > To: Slava Ovsiienko <viachesl...@nvidia.com> > Cc: dev@dpdk.org; Matan Azrad <ma...@nvidia.com>; Shahaf Shuler > <shah...@nvidia.com>; NBU-Contact-Thomas Monjalon > <tho...@monjalon.net>; Xueming(Steven) Li <xuemi...@nvidia.com>; > Asaf Penso <as...@nvidia.com> > Subject: [PATCH v2 2/2] 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 <xuemi...@nvidia.com> Acked-by: Viacheslav Ovsiienko <viachesl...@nvidia.com>
> --- > 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 > e245276fce..3b0e59ce1d 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -41,6 +41,9 @@ > #include "mlx5_flow_os.h" > #include "rte_pmd_mlx5.h" > > +/* 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" > > @@ -1597,7 +1600,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); > @@ -1749,6 +1752,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.25.1