vdpa/mlx5: support queue update
[dpdk.git] / drivers / net / ixgbe / ixgbe_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2014 Intel Corporation
3  */
4
5 #ifndef _IXGBE_LOGS_H_
6 #define _IXGBE_LOGS_H_
7
8 extern int ixgbe_logtype_init;
9 #define PMD_INIT_LOG(level, fmt, args...) \
10         rte_log(RTE_LOG_ ## level, ixgbe_logtype_init, \
11                 "%s(): " fmt "\n", __func__, ##args)
12
13 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
14
15 #ifdef RTE_LIBRTE_IXGBE_DEBUG_RX
16 extern int ixgbe_logtype_rx;
17 #define PMD_RX_LOG(level, fmt, args...)                 \
18         rte_log(RTE_LOG_ ## level, ixgbe_logtype_rx,    \
19                 "%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_IXGBE_DEBUG_TX
25 extern int ixgbe_logtype_tx;
26 #define PMD_TX_LOG(level, fmt, args...)                 \
27         rte_log(RTE_LOG_ ## level, ixgbe_logtype_tx,    \
28                 "%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_IXGBE_DEBUG_TX_FREE
34 extern int ixgbe_logtype_tx_free;
35 #define PMD_TX_FREE_LOG(level, fmt, args...)                    \
36         rte_log(RTE_LOG_ ## level, ixgbe_logtype_tx_free,       \
37                 "%s(): " fmt "\n", __func__, ## args)
38 #else
39 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
40 #endif
41
42 extern int ixgbe_logtype_driver;
43 #define PMD_DRV_LOG_RAW(level, fmt, args...) \
44         rte_log(RTE_LOG_ ## level, ixgbe_logtype_driver, "%s(): " fmt, \
45                 __func__, ## args)
46
47 #define PMD_DRV_LOG(level, fmt, args...) \
48         PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
49
50 #endif /* _IXGBE_LOGS_H_ */