1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
4 * Copyright 2017-2018 NXP
8 #ifndef _DPAA_SEC_LOG_H_
9 #define _DPAA_SEC_LOG_H_
11 extern int dpaa_logtype_sec;
13 #define DPAA_SEC_LOG(level, fmt, args...) \
14 rte_log(RTE_LOG_ ## level, dpaa_logtype_sec, "dpaa_sec: " \
17 #define DPAA_SEC_DEBUG(fmt, args...) \
18 rte_log(RTE_LOG_DEBUG, dpaa_logtype_sec, "dpaa_sec: %s(): " \
19 fmt "\n", __func__, ##args)
21 #define PMD_INIT_FUNC_TRACE() DPAA_SEC_DEBUG(" >>")
23 #define DPAA_SEC_INFO(fmt, args...) \
24 DPAA_SEC_LOG(INFO, fmt, ## args)
25 #define DPAA_SEC_ERR(fmt, args...) \
26 DPAA_SEC_LOG(ERR, fmt, ## args)
27 #define DPAA_SEC_WARN(fmt, args...) \
28 DPAA_SEC_LOG(WARNING, fmt, ## args)
30 /* DP Logs, toggled out at compile time if level lower than current level */
31 #define DPAA_SEC_DP_LOG(level, fmt, args...) \
32 RTE_LOG_DP(level, PMD, fmt, ## args)
34 #define DPAA_SEC_DP_DEBUG(fmt, args...) \
35 DPAA_SEC_DP_LOG(DEBUG, fmt, ## args)
36 #define DPAA_SEC_DP_INFO(fmt, args...) \
37 DPAA_SEC_DP_LOG(INFO, fmt, ## args)
38 #define DPAA_SEC_DP_WARN(fmt, args...) \
39 DPAA_SEC_DP_LOG(WARNING, fmt, ## args)
40 #define DPAA_SEC_DP_ERR(fmt, args...) \
41 DPAA_SEC_DP_LOG(ERR, fmt, ## args)
43 #endif /* _DPAA_SEC_LOG_H_ */