f-stack/dpdk/drivers/crypto/dpaa_sec/dpaa_sec_log.h

44 lines
1.2 KiB
C
Raw Normal View History

2018-12-06 14:17:51 +00:00
/* SPDX-License-Identifier: BSD-3-Clause
2017-04-21 10:43:26 +00:00
*
* Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
2018-12-06 14:17:51 +00:00
* Copyright 2017-2018 NXP
2017-04-21 10:43:26 +00:00
*
*/
#ifndef _DPAA_SEC_LOG_H_
#define _DPAA_SEC_LOG_H_
2017-04-21 10:43:26 +00:00
2018-12-06 14:17:51 +00:00
extern int dpaa_logtype_sec;
#define DPAA_SEC_LOG(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, dpaa_logtype_sec, "dpaa_sec: " \
fmt "\n", ##args)
#define DPAA_SEC_DEBUG(fmt, args...) \
rte_log(RTE_LOG_DEBUG, dpaa_logtype_sec, "dpaa_sec: %s(): " \
fmt "\n", __func__, ##args)
#define PMD_INIT_FUNC_TRACE() DPAA_SEC_DEBUG(" >>")
#define DPAA_SEC_INFO(fmt, args...) \
DPAA_SEC_LOG(INFO, fmt, ## args)
#define DPAA_SEC_ERR(fmt, args...) \
DPAA_SEC_LOG(ERR, fmt, ## args)
#define DPAA_SEC_WARN(fmt, args...) \
DPAA_SEC_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
#define DPAA_SEC_DP_LOG(level, fmt, args...) \
RTE_LOG_DP(level, PMD, fmt, ## args)
#define DPAA_SEC_DP_DEBUG(fmt, args...) \
DPAA_SEC_DP_LOG(DEBUG, fmt, ## args)
#define DPAA_SEC_DP_INFO(fmt, args...) \
DPAA_SEC_DP_LOG(INFO, fmt, ## args)
#define DPAA_SEC_DP_WARN(fmt, args...) \
DPAA_SEC_DP_LOG(WARNING, fmt, ## args)
#define DPAA_SEC_DP_ERR(fmt, args...) \
DPAA_SEC_DP_LOG(ERR, fmt, ## args)
#endif /* _DPAA_SEC_LOG_H_ */