Message ID | 1610983607-7969-3-git-send-email-xuemingl@nvidia.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Raslan Darawsheh |
Headers | show |
Series | mlx5: support global device syntax | expand |
Context | Check | Description |
---|---|---|
ci/iol-testing | warning | Testing issues |
ci/iol-abi-testing | success | Testing PASS |
ci/iol-mellanox-Performance | success | Performance Testing PASS |
ci/iol-mellanox-Functional | success | Functional Testing PASS |
ci/iol-intel-Performance | success | Performance Testing PASS |
ci/iol-intel-Functional | success | Functional Testing PASS |
ci/Intel-compilation | fail | Compilation issues |
ci/iol-broadcom-Functional | success | Functional Testing PASS |
ci/checkpatch | success | coding style OK |
> -----Original Message----- > From: Xueming Li <xuemingl@nvidia.com> > Sent: Monday, January 18, 2021 17:27 > To: Slava Ovsiienko <viacheslavo@nvidia.com> > Cc: dev@dpdk.org; Matan Azrad <matan@nvidia.com>; Shahaf Shuler > <shahafs@nvidia.com>; NBU-Contact-Thomas Monjalon > <thomas@monjalon.net>; Xueming(Steven) Li <xuemingl@nvidia.com>; > Asaf Penso <asafp@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 <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@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
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,
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 <xuemingl@nvidia.com> --- drivers/net/mlx5/mlx5.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)