common/mlx5: replace use of PMD logtype

Message ID 20230223174127.189231-1-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Raslan Darawsheh
Headers
Series common/mlx5: replace use of PMD logtype |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Stephen Hemminger Feb. 23, 2023, 5:41 p.m. UTC
  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")
Cc: viacheslavo@nvidia.com
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Slava Ovsiienko March 6, 2023, 1:19 p.m. UTC | #1
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


> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: четверг, 23 февраля 2023 г. 19:41
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Matan Azrad <matan@nvidia.com>; Gregory
> Etelson <getelson@nvidia.com>
> 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")
> Cc: viacheslavo@nvidia.com
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  drivers/common/mlx5/mlx5_devx_cmds.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c
> b/drivers/common/mlx5/mlx5_devx_cmds.c
> index fb670950ef64..710649f86533 100644
> --- a/drivers/common/mlx5/mlx5_devx_cmds.c
> +++ b/drivers/common/mlx5/mlx5_devx_cmds.c
> @@ -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;
> --
> 2.39.1
  
David Marchand June 13, 2023, 2:18 p.m. UTC | #2
On Mon, Mar 6, 2023 at 2:19 PM Slava Ovsiienko <viacheslavo@nvidia.com> wrote:
>
> 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?
  

Patch

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index fb670950ef64..710649f86533 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -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;