numam-dpdk/drivers/crypto/caam_jr/caam_jr_log.h
Gagandeep Singh af7c9b5e9c crypto/caam_jr: introduce basic driver
The caam_jr poll mode crypto driver is supported for
NXP SEC 4.x+ (CAAM) hardware accelerator.
This driver is by default supported on LE platforms,
if it is used on BE platforms like LS104X,
config option CONFIG_RTE_LIBRTE_PMD_CAAM_JR_BE can be
enabled.

This patch add skeleton for caam jobring driver
with probe and uintialisation functions

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-10-17 12:23:40 +02:00

43 lines
1.2 KiB
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright 2017-2018 NXP
*/
#ifndef _CAAM_JR_LOG_H_
#define _CAAM_JR_LOG_H_
#include <rte_log.h>
extern int caam_jr_logtype;
#define CAAM_JR_LOG(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, caam_jr_logtype, "caam_jr: " \
fmt "\n", ##args)
#define CAAM_JR_DEBUG(fmt, args...) \
rte_log(RTE_LOG_DEBUG, caam_jr_logtype, "caam_jr: %s(): " \
fmt "\n", __func__, ##args)
#define PMD_INIT_FUNC_TRACE() CAAM_JR_DEBUG(" >>")
#define CAAM_JR_INFO(fmt, args...) \
CAAM_JR_LOG(INFO, fmt, ## args)
#define CAAM_JR_ERR(fmt, args...) \
CAAM_JR_LOG(ERR, fmt, ## args)
#define CAAM_JR_WARN(fmt, args...) \
CAAM_JR_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
#define CAAM_JR_DP_LOG(level, fmt, args...) \
RTE_LOG_DP(level, PMD, fmt "\n", ## args)
#define CAAM_JR_DP_DEBUG(fmt, args...) \
CAAM_JR_DP_LOG(DEBUG, fmt, ## args)
#define CAAM_JR_DP_INFO(fmt, args...) \
CAAM_JR_DP_LOG(INFO, fmt, ## args)
#define CAAM_JR_DP_WARN(fmt, args...) \
CAAM_JR_DP_LOG(WARNING, fmt, ## args)
#define CAAM_JR_DP_ERR(fmt, args...) \
CAAM_JR_DP_LOG(ERR, fmt, ## args)
#endif /* _CAAM_JR_LOG_H_ */