2019-09-27 11:41:45 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
* Copyright (c) 2015-2019 Amazon.com, Inc. or its affiliates.
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
2016-03-17 14:31:18 +00:00
|
|
|
|
|
|
|
#ifndef _ENA_LOGS_H_
|
|
|
|
#define _ENA_LOGS_H_
|
|
|
|
|
2017-12-19 06:38:38 +00:00
|
|
|
extern int ena_logtype_init;
|
2016-03-17 14:31:18 +00:00
|
|
|
#define PMD_INIT_LOG(level, fmt, args...) \
|
2017-12-19 06:38:38 +00:00
|
|
|
rte_log(RTE_LOG_ ## level, ena_logtype_init, \
|
|
|
|
"%s(): " fmt "\n", __func__, ## args)
|
2016-03-17 14:31:18 +00:00
|
|
|
|
|
|
|
#ifdef RTE_LIBRTE_ENA_DEBUG_RX
|
2019-07-16 20:43:27 +00:00
|
|
|
extern int ena_logtype_rx;
|
|
|
|
#define PMD_RX_LOG(level, fmt, args...) \
|
|
|
|
rte_log(RTE_LOG_ ## level, ena_logtype_rx, \
|
|
|
|
"%s(): " fmt "\n", __func__, ## args)
|
2016-03-17 14:31:18 +00:00
|
|
|
#else
|
|
|
|
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef RTE_LIBRTE_ENA_DEBUG_TX
|
2019-07-16 20:43:27 +00:00
|
|
|
extern int ena_logtype_tx;
|
|
|
|
#define PMD_TX_LOG(level, fmt, args...) \
|
|
|
|
rte_log(RTE_LOG_ ## level, ena_logtype_tx, \
|
|
|
|
"%s(): " fmt "\n", __func__, ## args)
|
2016-03-17 14:31:18 +00:00
|
|
|
#else
|
|
|
|
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef RTE_LIBRTE_ENA_DEBUG_TX_FREE
|
2019-07-16 20:43:27 +00:00
|
|
|
extern int ena_logtype_tx_free;
|
|
|
|
#define PMD_TX_FREE_LOG(level, fmt, args...) \
|
|
|
|
rte_log(RTE_LOG_ ## level, ena_logtype_tx_free, \
|
|
|
|
"%s(): " fmt "\n", __func__, ## args)
|
2016-03-17 14:31:18 +00:00
|
|
|
#else
|
|
|
|
#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
|
|
|
|
#endif
|
|
|
|
|
2017-12-19 06:38:38 +00:00
|
|
|
extern int ena_logtype_driver;
|
2016-03-17 14:31:18 +00:00
|
|
|
#define PMD_DRV_LOG(level, fmt, args...) \
|
2017-12-19 06:38:38 +00:00
|
|
|
rte_log(RTE_LOG_ ## level, ena_logtype_driver, \
|
|
|
|
"%s(): " fmt "\n", __func__, ## args)
|
2016-03-17 14:31:18 +00:00
|
|
|
|
|
|
|
#endif /* _ENA_LOGS_H_ */
|