event/octeontx2: fix crypto adapter queue pair operations
[dpdk.git] / drivers / crypto / bcmfs / bcmfs_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2020 Broadcom
3  * All rights reserved.
4  */
5
6 #ifndef _BCMFS_LOGS_H_
7 #define _BCMFS_LOGS_H_
8
9 #include <rte_log.h>
10
11 extern int bcmfs_conf_logtype;
12 extern int bcmfs_dp_logtype;
13
14 #define BCMFS_LOG(level, fmt, args...)          \
15         rte_log(RTE_LOG_ ## level, bcmfs_conf_logtype,          \
16                 "%s(): " fmt "\n", __func__, ## args)
17
18 #define BCMFS_DP_LOG(level, fmt, args...)               \
19         rte_log(RTE_LOG_ ## level, bcmfs_dp_logtype,            \
20                 "%s(): " fmt "\n", __func__, ## args)
21
22 #define BCMFS_DP_HEXDUMP_LOG(level, title, buf, len)    \
23         bcmfs_hexdump_log(RTE_LOG_ ## level, bcmfs_dp_logtype, title, buf, len)
24
25 /**
26  * bcmfs_hexdump_log Dump out memory in a special hex dump format.
27  *
28  * The message will be sent to the stream used by the rte_log infrastructure.
29  */
30 int
31 bcmfs_hexdump_log(uint32_t level, uint32_t logtype, const char *heading,
32                   const void *buf, unsigned int len);
33
34 #endif /* _BCMFS_LOGS_H_ */