New upstream version 18.02
[deb_dpdk.git] / drivers / crypto / dpaa2_sec / dpaa2_sec_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  *
3  *   Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
4  *   Copyright 2016 NXP
5  *
6  */
7
8 #ifndef _DPAA2_SEC_LOGS_H_
9 #define _DPAA2_SEC_LOGS_H_
10
11 #define PMD_INIT_LOG(level, fmt, args...) \
12         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args)
13
14 #ifdef RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT
15 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
16 #else
17 #define PMD_INIT_FUNC_TRACE() do { } while (0)
18 #endif
19
20 #ifdef RTE_LIBRTE_DPAA2_SEC_DEBUG_RX
21 #define PMD_RX_LOG(level, fmt, args...) \
22         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
23 #else
24 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
25 #endif
26
27 #ifdef RTE_LIBRTE_DPAA2_SEC_DEBUG_TX
28 #define PMD_TX_LOG(level, fmt, args...) \
29         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
30 #else
31 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
32 #endif
33
34 #ifdef RTE_LIBRTE_DPAA2_SEC_DEBUG_DRIVER
35 #define PMD_DRV_LOG_RAW(level, fmt, args...) \
36         RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args)
37 #else
38 #define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0)
39 #endif
40
41 #define PMD_DRV_LOG(level, fmt, args...) \
42         PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
43
44 #endif /* _DPAA2_SEC_LOGS_H_ */