From: Xueming Li Date: Wed, 21 Jul 2021 14:37:28 +0000 (+0800) Subject: common/mlx5: rename ethernet device class X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a99f2f905479271a4878bb5d06dfaff33eb38057;p=dpdk.git common/mlx5: rename ethernet device class To align with EAL class driver, rename internal class name from "net" to "eth" Signed-off-by: Xueming Li Acked-by: Viacheslav Ovsiienko --- diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h index 962179a5a5..05008983ea 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 5547e62d6b..591054468d 100644 --- a/drivers/common/mlx5/mlx5_common_pci.c +++ b/drivers/common/mlx5/mlx5_common_pci.c @@ -28,34 +28,36 @@ 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 }, { .name = "crypto", .driver_class = MLX5_CLASS_CRYPTO }, }; static const unsigned int mlx5_class_combinations[] = { - MLX5_CLASS_NET, + MLX5_CLASS_ETH, MLX5_CLASS_VDPA, MLX5_CLASS_REGEX, MLX5_CLASS_COMPRESS, MLX5_CLASS_CRYPTO, - 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_CRYPTO, + MLX5_CLASS_ETH | MLX5_CLASS_CRYPTO, + MLX5_CLASS_ETH | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS, MLX5_CLASS_VDPA | MLX5_CLASS_CRYPTO, MLX5_CLASS_REGEX | MLX5_CLASS_CRYPTO, MLX5_CLASS_COMPRESS | MLX5_CLASS_CRYPTO, - MLX5_CLASS_NET | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS, MLX5_CLASS_VDPA | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS, - MLX5_CLASS_NET | MLX5_CLASS_REGEX | MLX5_CLASS_CRYPTO, + MLX5_CLASS_ETH | MLX5_CLASS_REGEX | MLX5_CLASS_CRYPTO, MLX5_CLASS_VDPA | MLX5_CLASS_REGEX | MLX5_CLASS_CRYPTO, - MLX5_CLASS_NET | MLX5_CLASS_COMPRESS | MLX5_CLASS_CRYPTO, + MLX5_CLASS_ETH | MLX5_CLASS_COMPRESS | MLX5_CLASS_CRYPTO, MLX5_CLASS_VDPA | MLX5_CLASS_COMPRESS | MLX5_CLASS_CRYPTO, - MLX5_CLASS_NET | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS | + MLX5_CLASS_ETH | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS | MLX5_CLASS_CRYPTO, MLX5_CLASS_VDPA | MLX5_CLASS_REGEX | MLX5_CLASS_COMPRESS | MLX5_CLASS_CRYPTO, @@ -317,7 +319,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,