Skip to contentSkip to conversation

common/mlx5: replace use of PMD logtype

PATCH Superseded Stephen Hemminger 5 participants 7 messages Feb 23, 2023 – Sep 25, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/mlx5: replace use of PMD logtype

The goal to eliminate the generic PMD logtype.
One place it is used unnecessarily is in the mlx5 common code. Change the one RTE_LOG() call here to use the same macro as other log messages in same file.

Fixes 9c410b28b27a ("common/mlx5: refactor HCA attributes query")
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/mlx5/mlx5_devx_cmds.c +1 -1
index fb670950ef64..710649f86533 100644
@@ -543,7 +543,7 @@ mlx5_devx_cmd_query_hca_vdpa_attr(void *ctx,
 			MLX5_GET_HCA_CAP_OP_MOD_VDPA_EMULATION |
 			MLX5_HCA_CAP_OPMOD_GET_CUR);
 	if (!hcattr) {
-		RTE_LOG(DEBUG, PMD, "Failed to query devx VDPA capabilities");
+		DRV_LOG(DEBUG, "Failed to query devx VDPA capabilities");
 		vdpa_attr->valid = 0;
 	} else {
 		vdpa_attr->valid = 1;
Signature · 1 line
2.39.1
#1 lore raw

Hi, Stephen

We have another place of using RTE_LOG in mlx5_glue_path(). Should we update this one as well ?

With best regards,
Slava

Quoted 39 lines

-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: четверг, 23 февраля 2023 г. 19:41
To: [email protected]
Cc: Stephen Hemminger <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; Gregory Etelson <[email protected]>
Subject: [PATCH] common/mlx5: replace use of PMD logtype

The goal to eliminate the generic PMD logtype.
One place it is used unnecessarily is in the mlx5 common code. Change the one RTE_LOG() call here to use the same macro as other log messages in same file.

Fixes 9c410b28b27a ("common/mlx5: refactor HCA attributes query")
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/mlx5/mlx5_devx_cmds.c +0 -0
index fb670950ef64..710649f86533 100644
@@ -543,7 +543,7 @@ mlx5_devx_cmd_query_hca_vdpa_attr(void *ctx,
 			MLX5_GET_HCA_CAP_OP_MOD_VDPA_EMULATION

|

drivers/common/mlx5/mlx5_devx_cmds.c +0 -1
 			MLX5_HCA_CAP_OPMOD_GET_CUR);
 	if (!hcattr) {
-		RTE_LOG(DEBUG, PMD, "Failed to query devx VDPA

capabilities");

drivers/common/mlx5/mlx5_devx_cmds.c +1 -1
+		DRV_LOG(DEBUG, "Failed to query devx VDPA capabilities");
 		vdpa_attr->valid = 0;
 	} else {
 		vdpa_attr->valid = 1;
--

2.39.1

#2 lore raw
Quoted 5 lines · Slava Ovsiienko

Hi, Stephen

We have another place of using RTE_LOG in mlx5_glue_path(). Should we update this one as well ?

I think we should.
Stephen can you send a new revision?

Signature · 1 line
David Marchand
#3 lore raw

PATCH v2 1/1 common/mlx5: replace use of PMD logtype

In reply to Stephen Hemminger

The goal to eliminate the generic PMD logtype.
One place it is used unnecessarily is in the mlx5 common code. Change the one RTE_LOG() call here to use the same macro as other log messages in same file.

Fixes 9c410b28b27a ("common/mlx5: refactor HCA attributes query")
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/mlx5/mlx5_devx_cmds.c +1 -1
index 66a77159a031..9db0b2ac8983 100644
@@ -543,7 +543,7 @@ mlx5_devx_cmd_query_hca_vdpa_attr(void *ctx,
 			MLX5_GET_HCA_CAP_OP_MOD_VDPA_EMULATION |
 			MLX5_HCA_CAP_OPMOD_GET_CUR);
 	if (!hcattr) {
-		RTE_LOG(DEBUG, PMD, "Failed to query devx VDPA capabilities");
+		DRV_LOG(DEBUG, "Failed to query devx VDPA capabilities");
 		vdpa_attr->valid = 0;
 	} else {
 		vdpa_attr->valid = 1;
Signature · 1 line
2.39.2
#4 lore raw

PATCH v3 1/1 common/mlx5: replace use of PMD logtype

In reply to Stephen Hemminger

The goal to eliminate the generic PMD logtype.
One place it is used unnecessarily is in the mlx5 common code. Change the one RTE_LOG() call here to use the same macro as other log messages in same file.

Fixes 9c410b28b27a ("common/mlx5: refactor HCA attributes query")

---
v3 - also address use in glue code

 drivers/common/mlx5/linux/mlx5_common_os.c | 2 +-
 drivers/common/mlx5/mlx5_devx_cmds.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/common/mlx5/linux/mlx5_common_os.c +1 -1
index 2ebb8ac8b6e5..7260c1a19fd3 100644
@@ -266,7 +266,7 @@ mlx5_glue_path(char *buf, size_t size)
 		goto error;
 	return buf;
 error:
-	RTE_LOG(ERR, PMD, "unable to append \"-glue\" to last component of"
+	DRV_LOG(ERR, "unable to append \"-glue\" to last component of"
 		" RTE_EAL_PMD_PATH (\"" RTE_EAL_PMD_PATH "\"), please"
 		" re-configure DPDK");
 	return NULL;
drivers/common/mlx5/mlx5_devx_cmds.c +1 -1
index 66a77159a031..9db0b2ac8983 100644
@@ -543,7 +543,7 @@ mlx5_devx_cmd_query_hca_vdpa_attr(void *ctx,
 			MLX5_GET_HCA_CAP_OP_MOD_VDPA_EMULATION |
 			MLX5_HCA_CAP_OPMOD_GET_CUR);
 	if (!hcattr) {
-		RTE_LOG(DEBUG, PMD, "Failed to query devx VDPA capabilities");
+		DRV_LOG(DEBUG, "Failed to query devx VDPA capabilities");
 		vdpa_attr->valid = 0;
 	} else {
 		vdpa_attr->valid = 1;
Signature · 1 line
2.39.2
#6 lore raw
In reply to Stephen Hemminger

Hi,

Quoted 15 lines

-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Monday, August 21, 2023 7:16 PM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Gregory Etelson <[email protected]>
Subject: [PATCH v3] common/mlx5: replace use of PMD logtype

The goal to eliminate the generic PMD logtype.
One place it is used unnecessarily is in the mlx5 common code. Change the one RTE_LOG() call here to use the same macro as other log messages in same file.

Quoted 5 lines
Fixes 9c410b28b27a ("common/mlx5: refactor HCA attributes query")

---
v3 - also address use in glue code

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh