net/mlx5: remove get priv internal function
[dpdk.git] / drivers / net / fm10k / fm10k_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2013-2015 Intel Corporation
3  */
4
5 #ifndef _FM10K_LOGS_H_
6 #define _FM10K_LOGS_H_
7
8 #include <rte_log.h>
9
10 #define PMD_INIT_LOG(level, fmt, args...) \
11         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args)
12
13 #ifdef RTE_LIBRTE_FM10K_DEBUG_INIT
14 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
15 #else
16 #define PMD_INIT_FUNC_TRACE() do { } while (0)
17 #endif
18
19 #ifdef RTE_LIBRTE_FM10K_DEBUG_RX
20 #define PMD_RX_LOG(level, fmt, args...) \
21         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
22 #else
23 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
24 #endif
25
26 #ifdef RTE_LIBRTE_FM10K_DEBUG_TX
27 #define PMD_TX_LOG(level, fmt, args...) \
28         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
29 #else
30 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
31 #endif
32
33 #ifdef RTE_LIBRTE_FM10K_DEBUG_TX_FREE
34 #define PMD_TX_FREE_LOG(level, fmt, args...) \
35         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
36 #else
37 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
38 #endif
39
40 #ifdef RTE_LIBRTE_FM10K_DEBUG_DRIVER
41 #define PMD_DRV_LOG_RAW(level, fmt, args...) \
42         RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args)
43 #else
44 #define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0)
45 #endif
46
47 #define PMD_DRV_LOG(level, fmt, args...) \
48         PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
49
50 #endif /* _FM10K_LOGS_H_ */