1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2020 Broadcom
7 #include <rte_hexdump.h>
9 #include "bcmfs_logs.h"
11 int bcmfs_conf_logtype;
15 bcmfs_hexdump_log(uint32_t level, uint32_t logtype, const char *title,
16 const void *buf, unsigned int len)
18 if (level > rte_log_get_global_level())
20 if (level > (uint32_t)(rte_log_get_level(logtype)))
23 rte_hexdump(rte_log_get_stream(), title, buf, len);
27 RTE_INIT(bcmfs_device_init_log)
29 /* Configuration and general logs */
30 bcmfs_conf_logtype = rte_log_register("pmd.bcmfs_config");
31 if (bcmfs_conf_logtype >= 0)
32 rte_log_set_level(bcmfs_conf_logtype, RTE_LOG_NOTICE);
35 bcmfs_dp_logtype = rte_log_register("pmd.bcmfs_fp");
36 if (bcmfs_dp_logtype >= 0)
37 rte_log_set_level(bcmfs_dp_logtype, RTE_LOG_NOTICE);