/* 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 {
*/
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
#include "mlx4.h"
+extern int mlx4_logtype;
+
#ifndef NDEBUG
/*
}
#define PMD_DRV_LOG(level, ...) \
- RTE_LOG(level, PMD, \
+ rte_log(RTE_LOG_ ## level, mlx4_logtype, \
RTE_FMT("%s:%u: %s(): " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
pmd_drv_log_basename(__FILE__), \
__LINE__, \
*/
#define PMD_DRV_LOG(level, ...) \
- RTE_LOG(level, PMD, \
+ rte_log(RTE_LOG_ ## level, mlx4_logtype, \
RTE_FMT(MLX4_DRIVER_NAME ": " \
RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
RTE_FMT_TAIL(__VA_ARGS__,)))