New upstream version 18.02
[deb_dpdk.git] / drivers / crypto / qat / qat_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2015 Intel Corporation
3  */
4
5 #ifndef _QAT_LOGS_H_
6 #define _QAT_LOGS_H_
7
8 #define PMD_INIT_LOG(level, fmt, args...) \
9         rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \
10                 "PMD: %s(): " fmt "\n", __func__, ##args)
11
12 #ifdef RTE_LIBRTE_PMD_QAT_DEBUG_INIT
13 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
14 #else
15 #define PMD_INIT_FUNC_TRACE() do { } while (0)
16 #endif
17
18 #ifdef RTE_LIBRTE_PMD_QAT_DEBUG_RX
19 #define PMD_RX_LOG(level, fmt, args...) \
20         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
21 #else
22 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
23 #endif
24
25 #ifdef RTE_LIBRTE_PMD_QAT_DEBUG_TX
26 #define PMD_TX_LOG(level, fmt, args...) \
27         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
28 #else
29 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
30 #endif
31
32 #ifdef RTE_LIBRTE_PMD_QAT_DEBUG_TX_FREE
33 #define PMD_TX_FREE_LOG(level, fmt, args...) \
34         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
35 #else
36 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
37 #endif
38
39 #ifdef RTE_LIBRTE_PMD_QAT_DEBUG_DRIVER
40 #define PMD_DRV_LOG_RAW(level, fmt, args...) \
41         RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args)
42 #else
43 #define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0)
44 #endif
45
46 #define PMD_DRV_LOG(level, fmt, args...) \
47         PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
48
49 #endif /* _QAT_LOGS_H_ */