net/mlx4: fix RxQ errors stat
[dpdk.git] / drivers / event / dpaa2 / dpaa2_eventdev_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2018 NXP
3  */
4
5 #ifndef _DPAA2_EVENTDEV_LOGS_H_
6 #define _DPAA2_EVENTDEV_LOGS_H_
7
8 extern int dpaa2_logtype_event;
9
10 #define DPAA2_EVENTDEV_LOG(level, fmt, args...) \
11         rte_log(RTE_LOG_ ## level, dpaa2_logtype_event, "dpaa2_event: " \
12                 fmt "\n", ##args)
13
14 #define DPAA2_EVENTDEV_DEBUG(fmt, args...) \
15         rte_log(RTE_LOG_DEBUG, dpaa2_logtype_event, "dpaa2_event: %s(): " \
16                 fmt "\n", __func__, ##args)
17
18 #define EVENTDEV_INIT_FUNC_TRACE() DPAA2_EVENTDEV_DEBUG(" >>")
19
20 #define DPAA2_EVENTDEV_INFO(fmt, args...) \
21         DPAA2_EVENTDEV_LOG(INFO, fmt, ## args)
22 #define DPAA2_EVENTDEV_ERR(fmt, args...) \
23         DPAA2_EVENTDEV_LOG(ERR, fmt, ## args)
24 #define DPAA2_EVENTDEV_WARN(fmt, args...) \
25         DPAA2_EVENTDEV_LOG(WARNING, fmt, ## args)
26
27 /* DP Logs, toggled out at compile time if level lower than current level */
28 #define DPAA2_EVENTDEV_DP_LOG(level, fmt, args...) \
29         RTE_LOG_DP(level, PMD, fmt, ## args)
30
31 #define DPAA2_EVENTDEV_DP_DEBUG(fmt, args...) \
32         DPAA2_EVENTDEV_DP_LOG(DEBUG, fmt, ## args)
33 #define DPAA2_EVENTDEV_DP_INFO(fmt, args...) \
34         DPAA2_EVENTDEV_DP_LOG(INFO, fmt, ## args)
35 #define DPAA2_EVENTDEV_DP_WARN(fmt, args...) \
36         DPAA2_EVENTDEV_DP_LOG(WARNING, fmt, ## args)
37
38 #endif /* _DPAA2_EVENTDEV_LOGS_H_ */