To align with EAL class driver, rename internal class name from "net" to
"eth"

Signed-off-by: Xueming Li <xuemi...@nvidia.com>
---
 drivers/common/mlx5/mlx5_common.h     |  2 +-
 drivers/common/mlx5/mlx5_common_pci.c | 14 ++++++++------
 drivers/net/mlx5/mlx5.c               |  2 +-
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_common.h 
b/drivers/common/mlx5/mlx5_common.h
index 7fb7d40b38..e8cd5182ac 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -212,7 +212,7 @@ int mlx5_get_ifname_sysfs(const char *ibdev_path, char 
*ifname);
 
 enum mlx5_class {
        MLX5_CLASS_INVALID,
-       MLX5_CLASS_NET = RTE_BIT64(0),
+       MLX5_CLASS_ETH = RTE_BIT64(0),
        MLX5_CLASS_VDPA = RTE_BIT64(1),
        MLX5_CLASS_REGEX = RTE_BIT64(2),
        MLX5_CLASS_COMPRESS = RTE_BIT64(3),
diff --git a/drivers/common/mlx5/mlx5_common_pci.c 
b/drivers/common/mlx5/mlx5_common_pci.c
index 34747c4e07..1e3c1de12d 100644
--- a/drivers/common/mlx5/mlx5_common_pci.c
+++ b/drivers/common/mlx5/mlx5_common_pci.c
@@ -28,22 +28,24 @@ 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_ETH },
+       /* Keep name "net" for backward compatibility. */
+       { .name = "net", .driver_class = MLX5_CLASS_ETH },
        { .name = "regex", .driver_class = MLX5_CLASS_REGEX },
        { .name = "compress", .driver_class = MLX5_CLASS_COMPRESS },
 };
 
 static const unsigned int mlx5_class_combinations[] = {
-       MLX5_CLASS_NET,
+       MLX5_CLASS_ETH,
        MLX5_CLASS_VDPA,
        MLX5_CLASS_REGEX,
        MLX5_CLASS_COMPRESS,
-       MLX5_CLASS_NET | MLX5_CLASS_REGEX,
+       MLX5_CLASS_ETH | MLX5_CLASS_REGEX,
        MLX5_CLASS_VDPA | MLX5_CLASS_REGEX,
-       MLX5_CLASS_NET | MLX5_CLASS_COMPRESS,
+       MLX5_CLASS_ETH | MLX5_CLASS_COMPRESS,
        MLX5_CLASS_VDPA | MLX5_CLASS_COMPRESS,
        MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS,
-       MLX5_CLASS_NET | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS,
+       MLX5_CLASS_ETH | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS,
        MLX5_CLASS_VDPA | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS,
        /* New class combination should be added here. */
 };
@@ -303,7 +305,7 @@ mlx5_common_pci_probe(struct rte_pci_driver *pci_drv 
__rte_unused,
                }
        } else {
                /* Default to net class. */
-               user_classes = MLX5_CLASS_NET;
+               user_classes = MLX5_CLASS_ETH;
        }
        dev = pci_to_mlx5_device(pci_dev);
        if (!dev) {
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 021a34dd4d..d9c90d5ef9 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2446,7 +2446,7 @@ static const struct rte_pci_id mlx5_pci_id_map[] = {
 };
 
 static struct mlx5_pci_driver mlx5_driver = {
-       .driver_class = MLX5_CLASS_NET,
+       .driver_class = MLX5_CLASS_ETH,
        .pci_driver = {
                .driver = {
                        .name = MLX5_PCI_DRIVER_NAME,
-- 
2.25.1

Reply via email to