net/bnxt: fix using RSS config struct
[dpdk.git] / drivers / net / dpaa2 / dpaa2_pmd_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2017 NXP
3  */
4
5 #ifndef _DPAA2_PMD_LOGS_H_
6 #define _DPAA2_PMD_LOGS_H_
7
8 extern int dpaa2_logtype_pmd;
9
10 #define DPAA2_PMD_LOG(level, fmt, args...) \
11         rte_log(RTE_LOG_ ## level, dpaa2_logtype_pmd, "dpaa2_net: " \
12                 fmt "\n", ##args)
13
14 #define DPAA2_PMD_DEBUG(fmt, args...) \
15         rte_log(RTE_LOG_DEBUG, dpaa2_logtype_pmd, "dpaa2_net: %s(): "\
16                 fmt "\n", __func__, ##args)
17
18 #define PMD_INIT_FUNC_TRACE() DPAA2_PMD_DEBUG(">>")
19
20 #define DPAA2_PMD_CRIT(fmt, args...) \
21         DPAA2_PMD_LOG(CRIT, fmt, ## args)
22 #define DPAA2_PMD_INFO(fmt, args...) \
23         DPAA2_PMD_LOG(INFO, fmt, ## args)
24 #define DPAA2_PMD_ERR(fmt, args...) \
25         DPAA2_PMD_LOG(ERR, fmt, ## args)
26 #define DPAA2_PMD_WARN(fmt, args...) \
27         DPAA2_PMD_LOG(WARNING, fmt, ## args)
28
29 /* DP Logs, toggled out at compile time if level lower than current level */
30 #define DPAA2_PMD_DP_LOG(level, fmt, args...) \
31         RTE_LOG_DP(level, PMD, fmt, ## args)
32
33 #define DPAA2_PMD_DP_DEBUG(fmt, args...) \
34         DPAA2_PMD_DP_LOG(DEBUG, fmt, ## args)
35 #define DPAA2_PMD_DP_INFO(fmt, args...) \
36         DPAA2_PMD_DP_LOG(INFO, fmt, ## args)
37 #define DPAA2_PMD_DP_WARN(fmt, args...) \
38         DPAA2_PMD_DP_LOG(WARNING, fmt, ## args)
39
40 #endif /* _DPAA2_PMD_LOGS_H_ */