common/mlx5: introduce common library
[dpdk.git] / drivers / common / mlx5 / mlx5_common_utils.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2019 Mellanox Technologies, Ltd
3  */
4
5 #ifndef RTE_PMD_MLX5_COMMON_UTILS_H_
6 #define RTE_PMD_MLX5_COMMON_UTILS_H_
7
8 #include "mlx5_common.h"
9
10
11 extern int mlx5_common_logtype;
12
13 #define MLX5_COMMON_LOG_PREFIX "common_mlx5"
14 /* Generic printf()-like logging macro with automatic line feed. */
15 #define DRV_LOG(level, ...) \
16         PMD_DRV_LOG_(level, mlx5_common_logtype, MLX5_COMMON_LOG_PREFIX, \
17                 __VA_ARGS__ PMD_DRV_LOG_STRIP PMD_DRV_LOG_OPAREN, \
18                 PMD_DRV_LOG_CPAREN)
19
20 #endif /* RTE_PMD_MLX5_COMMON_UTILS_H_ */