2017-12-19 15:49:01 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
* Copyright(c) 2010-2014 Intel Corporation
|
2013-09-18 10:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _VIRTIO_LOGS_H_
|
|
|
|
#define _VIRTIO_LOGS_H_
|
|
|
|
|
|
|
|
#include <rte_log.h>
|
|
|
|
|
2017-12-19 06:38:35 +00:00
|
|
|
extern int virtio_logtype_init;
|
2013-09-18 10:00:00 +00:00
|
|
|
#define PMD_INIT_LOG(level, fmt, args...) \
|
2017-12-19 06:38:35 +00:00
|
|
|
rte_log(RTE_LOG_ ## level, virtio_logtype_init, \
|
|
|
|
"%s(): " fmt "\n", __func__, ##args)
|
|
|
|
|
2013-09-18 10:00:00 +00:00
|
|
|
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
|
|
|
|
|
|
|
|
#ifdef RTE_LIBRTE_VIRTIO_DEBUG_RX
|
|
|
|
#define PMD_RX_LOG(level, fmt, args...) \
|
2016-04-19 05:22:37 +00:00
|
|
|
RTE_LOG(level, PMD, "%s() rx: " fmt "\n", __func__, ## args)
|
2013-09-18 10:00:00 +00:00
|
|
|
#else
|
|
|
|
#define PMD_RX_LOG(level, fmt, args...) do { } while(0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef RTE_LIBRTE_VIRTIO_DEBUG_TX
|
|
|
|
#define PMD_TX_LOG(level, fmt, args...) \
|
2016-04-19 05:22:37 +00:00
|
|
|
RTE_LOG(level, PMD, "%s() tx: " fmt "\n", __func__, ## args)
|
2013-09-18 10:00:00 +00:00
|
|
|
#else
|
|
|
|
#define PMD_TX_LOG(level, fmt, args...) do { } while(0)
|
|
|
|
#endif
|
|
|
|
|
2017-12-19 06:38:35 +00:00
|
|
|
extern int virtio_logtype_driver;
|
2013-09-18 10:00:00 +00:00
|
|
|
#define PMD_DRV_LOG(level, fmt, args...) \
|
2017-12-19 06:38:35 +00:00
|
|
|
rte_log(RTE_LOG_ ## level, virtio_logtype_driver, \
|
|
|
|
"%s(): " fmt "\n", __func__, ## args)
|
2013-09-18 10:00:00 +00:00
|
|
|
|
|
|
|
#endif /* _VIRTIO_LOGS_H_ */
|