[2/2] common/mlx5: rename driver name to include PCI notation

Message ID 1615842355-10526-2-git-send-email-michaelba@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series [1/2] common/mlx5: align driver name logs across pmds |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-abi-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/travis-robot success travis build: passed
ci/github-robot success github build: passed
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

Michael Baum March 15, 2021, 9:05 p.m. UTC
  From: Asaf Penso <asafp@nvidia.com>

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>
---
 drivers/common/mlx5/mlx5_common.h     | 2 +-
 drivers/common/mlx5/mlx5_common_pci.c | 2 +-
 drivers/net/mlx5/mlx5.c               | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
  

Comments

Slava Ovsiienko March 30, 2021, 7:36 a.m. UTC | #1
> -----Original Message-----
> From: Michael Baum <michaelba@nvidia.com>
> Sent: Monday, March 15, 2021 23:06
> To: dev@dpdk.org
> Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>; Slava
> Ovsiienko <viacheslavo@nvidia.com>; Matan Azrad <matan@nvidia.com>;
> Raslan Darawsheh <rasland@nvidia.com>; Asaf Penso <asafp@nvidia.com>
> Subject: [PATCH 2/2] common/mlx5: rename driver name to include PCI
> notation
> 
> From: Asaf Penso <asafp@nvidia.com>
> 
> 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>
  

Patch

diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index fc1ac75..84c3960 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -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) \
diff --git a/drivers/common/mlx5/mlx5_common_pci.c b/drivers/common/mlx5/mlx5_common_pci.c
index 2b65768..3783b0e 100644
--- a/drivers/common/mlx5/mlx5_common_pci.c
+++ b/drivers/common/mlx5/mlx5_common_pci.c
@@ -415,7 +415,7 @@  class_name_to_value(const char *class_name)
 
 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,
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index abd7ff70..a22bbc9 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2094,7 +2094,7 @@  struct mlx5_dev_ctx_shared *
 		    (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++;
 	}
@@ -2215,7 +2215,7 @@  struct mlx5_dev_ctx_shared *
 	.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,