From: Asaf Penso Date: Mon, 15 Mar 2021 21:05:54 +0000 (+0000) Subject: common/mlx5: align log prefix across drivers X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2d2546ad6b5ffe43fb9efeb92b606029b86af768;p=dpdk.git common/mlx5: align log prefix across drivers Some mlx5 PMDs define the log prefix as "mlx5_pmd" while others as "pmd_mlx5". The patch aligns all pmds to use the "mlx5_pmd" format. Signed-off-by: Asaf Penso Acked-by: Viacheslav Ovsiienko --- diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h index 8eda6749b4..20feea84d1 100644 --- a/drivers/common/mlx5/mlx5_common.h +++ b/drivers/common/mlx5/mlx5_common.h @@ -65,10 +65,6 @@ pmd_drv_log_basename(const char *s) RTE_FMT_HEAD(__VA_ARGS__,), \ RTE_FMT_TAIL(__VA_ARGS__,))) -/* - * When debugging is enabled (MLX5_DEBUG not defined), file, line and function - * information replace the driver name (MLX5_DRIVER_NAME) in log messages. - */ #ifdef RTE_LIBRTE_MLX5_DEBUG #define PMD_DRV_LOG__(level, type, name, ...) \ diff --git a/drivers/common/mlx5/mlx5_common_utils.h b/drivers/common/mlx5/mlx5_common_utils.h index 32c3adfab2..6cba39c8cc 100644 --- a/drivers/common/mlx5/mlx5_common_utils.h +++ b/drivers/common/mlx5/mlx5_common_utils.h @@ -10,7 +10,7 @@ extern int mlx5_common_logtype; -#define MLX5_COMMON_LOG_PREFIX "common_mlx5" +#define MLX5_COMMON_LOG_PREFIX "mlx5_common" /* Generic printf()-like logging macro with automatic line feed. */ #define DRV_LOG(level, ...) \ PMD_DRV_LOG_(level, mlx5_common_logtype, MLX5_COMMON_LOG_PREFIX, \ diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h index 7a62187f8e..5088c95e86 100644 --- a/drivers/net/mlx5/mlx5_utils.h +++ b/drivers/net/mlx5/mlx5_utils.h @@ -29,9 +29,11 @@ extern int mlx5_logtype; +#define MLX5_NET_LOG_PREFIX "mlx5_net" + /* Generic printf()-like logging macro with automatic line feed. */ #define DRV_LOG(level, ...) \ - PMD_DRV_LOG_(level, mlx5_logtype, MLX5_DRIVER_NAME, \ + PMD_DRV_LOG_(level, mlx5_logtype, MLX5_NET_LOG_PREFIX, \ __VA_ARGS__ PMD_DRV_LOG_STRIP PMD_DRV_LOG_OPAREN, \ PMD_DRV_LOG_CPAREN) diff --git a/drivers/regex/mlx5/mlx5_regex_utils.h b/drivers/regex/mlx5/mlx5_regex_utils.h index adca846ee5..104e79453d 100644 --- a/drivers/regex/mlx5/mlx5_regex_utils.h +++ b/drivers/regex/mlx5/mlx5_regex_utils.h @@ -9,7 +9,7 @@ extern int mlx5_regex_logtype; -#define MLX5_REGEX_LOG_PREFIX "regex_mlx5" +#define MLX5_REGEX_LOG_PREFIX "mlx5_regex" /* Generic printf()-like logging macro with automatic line feed. */ #define DRV_LOG(level, ...) \ PMD_DRV_LOG_(level, mlx5_regex_logtype, MLX5_REGEX_LOG_PREFIX, \