]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | /* SPDX-License-Identifier: BSD-3-Clause |
2 | * Copyright(c) 2010-2015 Intel Corporation | |
7c673cae FG |
3 | */ |
4 | ||
5 | #ifndef _I40E_LOGS_H_ | |
6 | #define _I40E_LOGS_H_ | |
7 | ||
11fdf7f2 | 8 | extern int i40e_logtype_init; |
7c673cae | 9 | #define PMD_INIT_LOG(level, fmt, args...) \ |
11fdf7f2 TL |
10 | rte_log(RTE_LOG_ ## level, i40e_logtype_init, "%s(): " fmt "\n", \ |
11 | __func__, ##args) | |
7c673cae | 12 | #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") |
7c673cae FG |
13 | |
14 | #ifdef RTE_LIBRTE_I40E_DEBUG_RX | |
15 | #define PMD_RX_LOG(level, fmt, args...) \ | |
16 | RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) | |
17 | #else | |
18 | #define PMD_RX_LOG(level, fmt, args...) do { } while(0) | |
19 | #endif | |
20 | ||
21 | #ifdef RTE_LIBRTE_I40E_DEBUG_TX | |
22 | #define PMD_TX_LOG(level, fmt, args...) \ | |
23 | RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) | |
24 | #else | |
25 | #define PMD_TX_LOG(level, fmt, args...) do { } while(0) | |
26 | #endif | |
27 | ||
28 | #ifdef RTE_LIBRTE_I40E_DEBUG_TX_FREE | |
29 | #define PMD_TX_FREE_LOG(level, fmt, args...) \ | |
30 | RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) | |
31 | #else | |
32 | #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0) | |
33 | #endif | |
34 | ||
11fdf7f2 | 35 | extern int i40e_logtype_driver; |
7c673cae | 36 | #define PMD_DRV_LOG_RAW(level, fmt, args...) \ |
11fdf7f2 TL |
37 | rte_log(RTE_LOG_ ## level, i40e_logtype_driver, "%s(): " fmt, \ |
38 | __func__, ## args) | |
7c673cae FG |
39 | |
40 | #define PMD_DRV_LOG(level, fmt, args...) \ | |
41 | PMD_DRV_LOG_RAW(level, fmt "\n", ## args) | |
42 | ||
43 | #endif /* _I40E_LOGS_H_ */ |