log: introduce logtype register macro
[dpdk.git] / drivers / common / qat / qat_logs.c
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
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);