198c4a35cSTomasz Jozwiak /* SPDX-License-Identifier: BSD-3-Clause
298c4a35cSTomasz Jozwiak * Copyright(c) 2018 Intel Corporation
398c4a35cSTomasz Jozwiak */
498c4a35cSTomasz Jozwiak
598c4a35cSTomasz Jozwiak #include <rte_log.h>
698c4a35cSTomasz Jozwiak #include <rte_hexdump.h>
798c4a35cSTomasz Jozwiak
898c4a35cSTomasz Jozwiak #include "qat_logs.h"
998c4a35cSTomasz Jozwiak
1098c4a35cSTomasz Jozwiak int
qat_hexdump_log(uint32_t level,uint32_t logtype,const char * title,const void * buf,unsigned int len)1198c4a35cSTomasz Jozwiak qat_hexdump_log(uint32_t level, uint32_t logtype, const char *title,
1298c4a35cSTomasz Jozwiak const void *buf, unsigned int len)
1398c4a35cSTomasz Jozwiak {
14241e67bfSFerruh Yigit if (rte_log_can_log(logtype, level))
15b5fedaedSDavid Marchand rte_hexdump(rte_log_get_stream(), title, buf, len);
16241e67bfSFerruh Yigit
1798c4a35cSTomasz Jozwiak return 0;
1898c4a35cSTomasz Jozwiak }
1998c4a35cSTomasz Jozwiak
20*b1641987SThomas Monjalon RTE_LOG_REGISTER(qat_gen_logtype, pmd.qat.general, NOTICE);
21*b1641987SThomas Monjalon RTE_LOG_REGISTER(qat_dp_logtype, pmd.qat.dp, NOTICE);
22