common/mlx5: rename definition of PCI driver name
authorAsaf Penso <asafp@nvidia.com>
Mon, 15 Mar 2021 21:05:55 +0000 (21:05 +0000)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 7 Apr 2021 07:43:34 +0000 (09:43 +0200)
The current define for MLX5_DRIVER_NAME refers specially for the PCI
driver.

The define itself does not mention PCI and this is confusing.

Rename from MLX5_DRIVER_NAME to MLX5_PCI_DRIVER_NAME.

Signed-off-by: Asaf Penso <asafp@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/common/mlx5/mlx5_common.h
drivers/common/mlx5/mlx5_common_pci.c
drivers/net/mlx5/mlx5.c

index 20feea8..327374f 100644 (file)
@@ -19,7 +19,7 @@
 #include "mlx5_devx_cmds.h"
 
 /* Reported driver name. */
-#define MLX5_DRIVER_NAME "mlx5_pci"
+#define MLX5_PCI_DRIVER_NAME "mlx5_pci"
 
 /* Bit-field manipulation. */
 #define BITFIELD_DECLARE(bf, type, size) \
index 9689ca8..5a73ffa 100644 (file)
@@ -415,7 +415,7 @@ static struct rte_pci_id *mlx5_pci_id_table;
 
 static struct rte_pci_driver mlx5_pci_driver = {
        .driver = {
-               .name = MLX5_DRIVER_NAME,
+               .name = MLX5_PCI_DRIVER_NAME,
        },
        .probe = mlx5_common_pci_probe,
        .remove = mlx5_common_pci_remove,
index 3538cc8..9557d06 100644 (file)
@@ -2116,7 +2116,7 @@ mlx5_eth_find_next(uint16_t port_id, struct rte_pci_device *pci_dev)
                    (dev->device == &pci_dev->device ||
                     (dev->device->driver &&
                     dev->device->driver->name &&
-                    !strcmp(dev->device->driver->name, MLX5_DRIVER_NAME))))
+                    !strcmp(dev->device->driver->name, MLX5_PCI_DRIVER_NAME))))
                        break;
                port_id++;
        }
@@ -2237,7 +2237,7 @@ static struct mlx5_pci_driver mlx5_driver = {
        .driver_class = MLX5_CLASS_NET,
        .pci_driver = {
                .driver = {
-                       .name = MLX5_DRIVER_NAME,
+                       .name = MLX5_PCI_DRIVER_NAME,
                },
                .id_table = mlx5_pci_id_map,
                .probe = mlx5_os_pci_probe,