xref: /dpdk/drivers/common/qat/qat_logs.c (revision b164198729dfc2b9c34aebacf6bd6f8d2736012d)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018 Intel Corporation
3  */
4 
5 #include <rte_log.h>
6 #include <rte_hexdump.h>
7 
8 #include "qat_logs.h"
9 
10 int
qat_hexdump_log(uint32_t level,uint32_t logtype,const char * title,const void * buf,unsigned int len)11 qat_hexdump_log(uint32_t level, uint32_t logtype, const char *title,
12 		const void *buf, unsigned int len)
13 {
14 	if (rte_log_can_log(logtype, level))
15 		rte_hexdump(rte_log_get_stream(), title, buf, len);
16 
17 	return 0;
18 }
19 
20 RTE_LOG_REGISTER(qat_gen_logtype, pmd.qat.general, NOTICE);
21 RTE_LOG_REGISTER(qat_dp_logtype, pmd.qat.dp, NOTICE);
22