* [dpdk-dev] [PATCH] common/mlx5: fix PCI driver name
@ 2020-10-26 8:37 Bing Zhao
2020-10-26 22:44 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Bing Zhao @ 2020-10-26 8:37 UTC (permalink / raw)
To: viacheslavo, matan; +Cc: dev, orika, rasland, stable, parav
In the refactor of mlx5 common layer, the PCI driver name to the RTE
device was changed from "net_mlx5" to "mlx5_pci". The string of name
"mlx5_pci" is used directly in the structure rte_pci_driver.
In the past, a macro "MLX5_DRIVER_NAME" is used instead of any direct
string, and now it is missing. The functions that use
"MLX5_DRIVER_NAME" will get some mismatch, e.g mlx5_eth_find_next.
It needs to use this macro again in all code to make everything get
aligned.
Fixes: 8a41f4deccc3 ("common/mlx5: introduce layer for multiple class drivers")
Cc: parav@mellanox.com
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/common/mlx5/mlx5_common.h | 2 ++
drivers/common/mlx5/mlx5_common_pci.c | 2 +-
drivers/net/mlx5/mlx5_defs.h | 3 ---
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index ed44a45..3d3d109 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -18,6 +18,8 @@
#include "mlx5_prm.h"
#include "mlx5_devx_cmds.h"
+/* Reported driver name. */
+#define MLX5_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 02417c6..5208972 100644
--- a/drivers/common/mlx5/mlx5_common_pci.c
+++ b/drivers/common/mlx5/mlx5_common_pci.c
@@ -408,7 +408,7 @@ class_name_to_value(const char *class_name)
static struct rte_pci_driver mlx5_pci_driver = {
.driver = {
- .name = "mlx5_pci",
+ .name = MLX5_DRIVER_NAME,
},
.probe = mlx5_common_pci_probe,
.remove = mlx5_common_pci_remove,
diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
index 42916ed..2657081 100644
--- a/drivers/net/mlx5/mlx5_defs.h
+++ b/drivers/net/mlx5/mlx5_defs.h
@@ -11,9 +11,6 @@
#include "mlx5_autoconf.h"
-/* Reported driver name. */
-#define MLX5_DRIVER_NAME "net_mlx5"
-
/* Maximum number of simultaneous VLAN filters. */
#define MLX5_MAX_VLAN_IDS 128
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] common/mlx5: fix PCI driver name
2020-10-26 8:37 [dpdk-dev] [PATCH] common/mlx5: fix PCI driver name Bing Zhao
@ 2020-10-26 22:44 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2020-10-26 22:44 UTC (permalink / raw)
To: Bing Zhao, viacheslavo, matan; +Cc: dev, Ori Kam, stable, parav
Hi,
> -----Original Message-----
> From: Bing Zhao <bingz@nvidia.com>
> Sent: Monday, October 26, 2020 10:38 AM
> To: viacheslavo@mellanox.com; matan@mellanox.com
> Cc: dev@dpdk.org; Ori Kam <orika@nvidia.com>; Raslan Darawsheh
> <rasland@nvidia.com>; stable@dpdk.org; parav@mellanox.com
> Subject: [PATCH] common/mlx5: fix PCI driver name
>
> In the refactor of mlx5 common layer, the PCI driver name to the RTE
> device was changed from "net_mlx5" to "mlx5_pci". The string of name
> "mlx5_pci" is used directly in the structure rte_pci_driver.
>
> In the past, a macro "MLX5_DRIVER_NAME" is used instead of any direct
> string, and now it is missing. The functions that use
> "MLX5_DRIVER_NAME" will get some mismatch, e.g mlx5_eth_find_next.
>
> It needs to use this macro again in all code to make everything get
> aligned.
>
> Fixes: 8a41f4deccc3 ("common/mlx5: introduce layer for multiple class
> drivers")
> Cc: parav@mellanox.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Bing Zhao <bingz@nvidia.com>
> Reviewed-by: Parav Pandit <parav@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
> drivers/common/mlx5/mlx5_common.h | 2 ++
> drivers/common/mlx5/mlx5_common_pci.c | 2 +-
> drivers/net/mlx5/mlx5_defs.h | 3 ---
> 3 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/common/mlx5/mlx5_common.h
> b/drivers/common/mlx5/mlx5_common.h
> index ed44a45..3d3d109 100644
> --- a/drivers/common/mlx5/mlx5_common.h
> +++ b/drivers/common/mlx5/mlx5_common.h
> @@ -18,6 +18,8 @@
> #include "mlx5_prm.h"
> #include "mlx5_devx_cmds.h"
>
> +/* Reported driver name. */
> +#define MLX5_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 02417c6..5208972 100644
> --- a/drivers/common/mlx5/mlx5_common_pci.c
> +++ b/drivers/common/mlx5/mlx5_common_pci.c
> @@ -408,7 +408,7 @@ class_name_to_value(const char *class_name)
>
> static struct rte_pci_driver mlx5_pci_driver = {
> .driver = {
> - .name = "mlx5_pci",
> + .name = MLX5_DRIVER_NAME,
> },
> .probe = mlx5_common_pci_probe,
> .remove = mlx5_common_pci_remove,
> diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
> index 42916ed..2657081 100644
> --- a/drivers/net/mlx5/mlx5_defs.h
> +++ b/drivers/net/mlx5/mlx5_defs.h
> @@ -11,9 +11,6 @@
>
> #include "mlx5_autoconf.h"
>
> -/* Reported driver name. */
> -#define MLX5_DRIVER_NAME "net_mlx5"
> -
> /* Maximum number of simultaneous VLAN filters. */
> #define MLX5_MAX_VLAN_IDS 128
>
> --
> 1.8.3.1
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-26 22:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 8:37 [dpdk-dev] [PATCH] common/mlx5: fix PCI driver name Bing Zhao
2020-10-26 22:44 ` Raslan Darawsheh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).