summaryrefslogtreecommitdiff
path: root/drivers/net/mlx4/mlx4.c
diff options
context:
space:
mode:
authorStephen Hemminger <sthemmin@microsoft.com>2019-05-24 09:03:16 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2019-05-27 10:20:45 +0200
commit11a34bf2c0f576044d362e0f550c2b4977ee9c85 (patch)
treebd6d930b25700c01a0551028f91e9db0faddd4b4 /drivers/net/mlx4/mlx4.c
parent50254b6d2a5d21508f2771f6ed40d5dfc05f5a65 (diff)
downloaddpdk-11a34bf2c0f576044d362e0f550c2b4977ee9c85.zip
dpdk-11a34bf2c0f576044d362e0f550c2b4977ee9c85.tar.gz
dpdk-11a34bf2c0f576044d362e0f550c2b4977ee9c85.tar.xz
net/mlx4: use dynamic log type
This driver should use dynamic log level not RTE_LOGTYPE_PMD. Other drivers were converted back in 18.02. This is really a bug, all other drivers use dynamic log levels by now. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'drivers/net/mlx4/mlx4.c')
-rw-r--r--drivers/net/mlx4/mlx4.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 640e06f..2c33fcb 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -60,6 +60,9 @@ static rte_spinlock_t mlx4_shared_data_lock = RTE_SPINLOCK_INITIALIZER;
/* Process local data for secondary processes. */
static struct mlx4_local_data mlx4_local_data;
+/** Driver-specific log messages type. */
+int mlx4_logtype;
+
/** Configuration structure for device arguments. */
struct mlx4_conf {
struct {
@@ -1272,6 +1275,11 @@ glue_error:
*/
RTE_INIT(rte_mlx4_pmd_init)
{
+ /* Initialize driver log type. */
+ mlx4_logtype = rte_log_register("pmd.net.mlx4");
+ if (mlx4_logtype >= 0)
+ rte_log_set_level(mlx4_logtype, RTE_LOG_NOTICE);
+
/*
* MLX4_DEVICE_FATAL_CLEANUP tells ibv_destroy functions we
* want to get success errno value in case of calling them