> -----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 1/2] common/mlx5: support device global syntax
> 
> This patch supports new device global device syntax, resolve class type from
> "class" section if the devarg is global device syntax:
> bus=<bus>,k=v,,,/class=<cls>,k=v,,,/driver=<pmd>,k=v,,,,
> 
> To reuse class name of global device syntax, this patch also changes internal
> class name introduced by commit [1] to algin with RTE class name.
Typo: algin -> align

Beside this:
Acked-by: Viacheslav Ovsiienko <viachesl...@nvidia.com>


> 
> [1]
> 8a41f4deccc3: common/mlx5: introduce layer for multiple class drivers
> 
> Signed-off-by: Xueming Li <xuemi...@nvidia.com>
> ---
>  drivers/common/mlx5/mlx5_common_pci.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/common/mlx5/mlx5_common_pci.c
> b/drivers/common/mlx5/mlx5_common_pci.c
> index 5208972bb6..c03bdbf4eb 100644
> --- a/drivers/common/mlx5/mlx5_common_pci.c
> +++ b/drivers/common/mlx5/mlx5_common_pci.c
> @@ -4,6 +4,7 @@
> 
>  #include <stdlib.h>
>  #include <rte_malloc.h>
> +#include <rte_class.h>
>  #include "mlx5_common_utils.h"
>  #include "mlx5_common_pci.h"
> 
> @@ -26,7 +27,7 @@ static const struct {
>       unsigned int driver_class;
>  } mlx5_classes[] = {
>       { .name = "vdpa", .driver_class = MLX5_CLASS_VDPA },
> -     { .name = "net", .driver_class = MLX5_CLASS_NET },
> +     { .name = "eth", .driver_class = MLX5_CLASS_NET },
>       { .name = "regex", .driver_class = MLX5_CLASS_REGEX },  };
> 
> @@ -115,6 +116,9 @@ parse_class_options(const struct rte_devargs
> *devargs)
> 
>       if (devargs == NULL)
>               return 0;
> +     if (devargs->cls != NULL)
> +             /* support new global syntax */
> +             return class_name_to_value(devargs->cls->name);
>       kvlist = rte_kvargs_parse(devargs->args, NULL);
>       if (kvlist == NULL)
>               return 0;
> --
> 2.25.1

Reply via email to