net/mlx5: add VLAN push/pop DR commands to glue
[dpdk.git] / drivers / net / ice / ice_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018 Intel Corporation
3  */
4
5 #ifndef _ICE_LOGS_H_
6 #define _ICE_LOGS_H_
7
8 extern int ice_logtype_init;
9 extern int ice_logtype_driver;
10
11 #define PMD_INIT_LOG(level, fmt, args...) \
12         rte_log(RTE_LOG_ ## level, ice_logtype_init, "%s(): " fmt "\n", \
13                 __func__, ##args)
14
15 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
16
17 #ifdef RTE_LIBRTE_ICE_DEBUG_RX
18 #define PMD_RX_LOG(level, fmt, args...) \
19         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
20 #else
21 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
22 #endif
23
24 #ifdef RTE_LIBRTE_ICE_DEBUG_TX
25 #define PMD_TX_LOG(level, fmt, args...) \
26         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
27 #else
28 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
29 #endif
30
31 #ifdef RTE_LIBRTE_ICE_DEBUG_TX_FREE
32 #define PMD_TX_FREE_LOG(level, fmt, args...) \
33         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
34 #else
35 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
36 #endif
37
38 #define PMD_DRV_LOG_RAW(level, fmt, args...) \
39         rte_log(RTE_LOG_ ## level, ice_logtype_driver, "%s(): " fmt, \
40                 __func__, ## args)
41
42 #define PMD_DRV_LOG(level, fmt, args...) \
43         PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
44
45 #endif /* _ICE_LOGS_H_ */