1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
4 * Copyright 2016,2019 NXP
8 #ifndef _DPAA2_SEC_LOGS_H_
9 #define _DPAA2_SEC_LOGS_H_
11 extern int dpaa2_logtype_sec;
13 #define DPAA2_SEC_LOG(level, fmt, args...) \
14 rte_log(RTE_LOG_ ## level, dpaa2_logtype_sec, "dpaa2_sec: " \
17 #define DPAA2_SEC_DEBUG(fmt, args...) \
18 rte_log(RTE_LOG_DEBUG, dpaa2_logtype_sec, "dpaa2_sec: %s(): " \
19 fmt "\n", __func__, ##args)
21 #define PMD_INIT_FUNC_TRACE() DPAA2_SEC_DEBUG(">>")
23 #define DPAA2_SEC_INFO(fmt, args...) \
24 DPAA2_SEC_LOG(INFO, fmt, ## args)
25 #define DPAA2_SEC_ERR(fmt, args...) \
26 DPAA2_SEC_LOG(ERR, fmt, ## args)
27 #define DPAA2_SEC_WARN(fmt, args...) \
28 DPAA2_SEC_LOG(WARNING, fmt, ## args)
30 /* DP Logs, toggled out at compile time if level lower than current level */
31 #define DPAA2_SEC_DP_LOG(level, fmt, args...) \
32 RTE_LOG_DP(level, PMD, fmt, ## args)
34 #define DPAA2_SEC_DP_DEBUG(fmt, args...) \
35 DPAA2_SEC_DP_LOG(DEBUG, fmt, ## args)
36 #define DPAA2_SEC_DP_INFO(fmt, args...) \
37 DPAA2_SEC_DP_LOG(INFO, fmt, ## args)
38 #define DPAA2_SEC_DP_WARN(fmt, args...) \
39 DPAA2_SEC_DP_LOG(WARNING, fmt, ## args)
40 #define DPAA2_SEC_DP_ERR(fmt, args...) \
41 DPAA2_SEC_DP_LOG(ERR, fmt, ## args)
44 #endif /* _DPAA2_SEC_LOGS_H_ */