2017-12-19 15:49:01 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
* Copyright(c) 2010-2015 Intel Corporation
|
2014-06-05 05:08:46 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _I40E_LOGS_H_
|
|
|
|
#define _I40E_LOGS_H_
|
|
|
|
|
2017-04-04 16:40:40 +00:00
|
|
|
extern int i40e_logtype_init;
|
2014-06-05 05:08:46 +00:00
|
|
|
#define PMD_INIT_LOG(level, fmt, args...) \
|
2017-04-04 16:40:40 +00:00
|
|
|
rte_log(RTE_LOG_ ## level, i40e_logtype_init, "%s(): " fmt "\n", \
|
|
|
|
__func__, ##args)
|
2014-06-05 05:08:46 +00:00
|
|
|
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
|
|
|
|
|
2021-03-31 09:52:50 +00:00
|
|
|
#ifdef RTE_ETHDEV_DEBUG_RX
|
2019-07-16 15:40:12 +00:00
|
|
|
extern int i40e_logtype_rx;
|
|
|
|
#define PMD_RX_LOG(level, fmt, args...) \
|
|
|
|
rte_log(RTE_LOG_ ## level, i40e_logtype_rx, \
|
|
|
|
"%s(): " fmt "\n", __func__, ## args)
|
2014-06-05 05:08:46 +00:00
|
|
|
#else
|
2019-07-16 15:40:12 +00:00
|
|
|
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
|
2014-06-05 05:08:46 +00:00
|
|
|
#endif
|
|
|
|
|
2021-03-31 09:52:50 +00:00
|
|
|
#ifdef RTE_ETHDEV_DEBUG_TX
|
2019-07-16 15:40:12 +00:00
|
|
|
extern int i40e_logtype_tx;
|
|
|
|
#define PMD_TX_LOG(level, fmt, args...) \
|
|
|
|
rte_log(RTE_LOG_ ## level, i40e_logtype_tx, \
|
|
|
|
"%s(): " fmt "\n", __func__, ## args)
|
2014-06-05 05:08:46 +00:00
|
|
|
#else
|
2019-07-16 15:40:12 +00:00
|
|
|
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
|
2014-06-05 05:08:46 +00:00
|
|
|
#endif
|
|
|
|
|
2017-04-04 16:40:40 +00:00
|
|
|
extern int i40e_logtype_driver;
|
2014-09-17 13:46:41 +00:00
|
|
|
#define PMD_DRV_LOG_RAW(level, fmt, args...) \
|
2017-04-04 16:40:40 +00:00
|
|
|
rte_log(RTE_LOG_ ## level, i40e_logtype_driver, "%s(): " fmt, \
|
|
|
|
__func__, ## args)
|
2014-06-05 05:08:46 +00:00
|
|
|
|
2014-09-17 13:46:41 +00:00
|
|
|
#define PMD_DRV_LOG(level, fmt, args...) \
|
|
|
|
PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
|
|
|
|
|
2014-06-05 05:08:46 +00:00
|
|
|
#endif /* _I40E_LOGS_H_ */
|