event/cnxk: support vectorized Rx event fast path
[dpdk.git] / drivers / net / e1000 / e1000_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2014 Intel Corporation
3  */
4
5 #ifndef _E1000_LOGS_H_
6 #define _E1000_LOGS_H_
7
8 #include <rte_log.h>
9
10 extern int e1000_logtype_init;
11
12 #define PMD_INIT_LOG(level, fmt, args...) \
13         rte_log(RTE_LOG_ ## level, e1000_logtype_init, \
14                 "%s(): " fmt "\n", __func__, ##args)
15
16 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
17
18 #ifdef RTE_ETHDEV_DEBUG_RX
19 extern int e1000_logtype_rx;
20 #define PMD_RX_LOG(level, fmt, args...)                 \
21         rte_log(RTE_LOG_ ## level, e1000_logtype_rx,    \
22                 "%s(): " fmt "\n", __func__, ## args)
23 #else
24 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
25 #endif
26
27 #ifdef RTE_ETHDEV_DEBUG_TX
28 extern int e1000_logtype_tx;
29 #define PMD_TX_LOG(level, fmt, args...)                 \
30         rte_log(RTE_LOG_ ## level, e1000_logtype_tx,    \
31                 "%s(): " fmt "\n", __func__, ## args)
32 #else
33 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
34 #endif
35
36 extern int e1000_logtype_driver;
37 #define PMD_DRV_LOG_RAW(level, fmt, args...) \
38         rte_log(RTE_LOG_ ## level, e1000_logtype_driver, "%s(): " fmt, \
39                 __func__, ## args)
40
41 #define PMD_DRV_LOG(level, fmt, args...) \
42         PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
43
44
45 /* log init function shared by e1000 and igb drivers */
46 void e1000_igb_init_log(void);
47
48 #endif /* _E1000_LOGS_H_ */