c3d7e7d390d7695ac919d6f09991cdf34c71bfbb
[dpdk.git] / drivers / net / ark / ark_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2015-2018 Atomic Rules LLC
3  */
4
5 #ifndef _ARK_DEBUG_H_
6 #define _ARK_DEBUG_H_
7
8 #include <inttypes.h>
9 #include <rte_log.h>
10
11
12 /* Configuration option to pad TX packets to 60 bytes */
13 #ifdef RTE_LIBRTE_ARK_PAD_TX
14 #define ARK_TX_PAD_TO_60   1
15 #else
16 #define ARK_TX_PAD_TO_60   0
17 #endif
18
19 /* system camel case definition changed to upper case */
20 #define PRIU32 PRIu32
21 #define PRIU64 PRIu64
22
23 /* Format specifiers for string data pairs */
24 #define ARK_SU32  "\n\t%-20s    %'20" PRIU32
25 #define ARK_SU64  "\n\t%-20s    %'20" PRIU64
26 #define ARK_SU64X "\n\t%-20s    %#20" PRIx64
27 #define ARK_SPTR  "\n\t%-20s    %20p"
28
29 extern int ark_logtype;
30
31 #define ARK_PMD_LOG(level, fmt, args...)        \
32         rte_log(RTE_LOG_ ##level, ark_logtype, "ARK: " fmt, ## args)
33
34
35 /* Debug macro to enable core debug code */
36 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
37 #define ARK_DEBUG_CORE 1
38 #else
39 #define ARK_DEBUG_CORE 0
40 #endif
41
42 #endif