1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2015-2018 Intel Corporation 3 */ 4 5 #ifndef _QAT_LOGS_H_ 6 #define _QAT_LOGS_H_ 7 8 extern int qat_gen_logtype; 9 #define RTE_LOGTYPE_QAT_GEN qat_gen_logtype 10 extern int qat_dp_logtype; 11 #define RTE_LOGTYPE_QAT_DP qat_dp_logtype 12 13 #define QAT_LOG(level, ...) \ 14 RTE_LOG_LINE_PREFIX(level, QAT_GEN, "%s(): ", __func__, __VA_ARGS__) 15 16 #define QAT_DP_LOG(level, ...) \ 17 RTE_LOG_LINE_PREFIX(level, QAT_DP, "%s(): ", __func__, __VA_ARGS__) 18 19 #define QAT_DP_HEXDUMP_LOG(level, title, buf, len) \ 20 qat_hexdump_log(RTE_LOG_ ## level, qat_dp_logtype, title, buf, len) 21 22 /** 23 * qat_hexdump_log - Dump out memory in a special hex dump format. 24 * 25 * Dump out the message buffer in a special hex dump output format with 26 * characters printed for each line of 16 hex values. The message will be sent 27 * to the stream used by the rte_log infrastructure. 28 */ 29 int 30 qat_hexdump_log(uint32_t level, uint32_t logtype, const char *title, 31 const void *buf, unsigned int len); 32 33 #endif /* _QAT_LOGS_H_ */ 34