1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
5 #ifndef _VIRTIO_LOGS_H_
6 #define _VIRTIO_LOGS_H_
10 extern int virtio_logtype_init;
11 #define PMD_INIT_LOG(level, fmt, args...) \
12 rte_log(RTE_LOG_ ## level, virtio_logtype_init, \
13 "%s(): " fmt "\n", __func__, ##args)
15 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
17 #ifdef RTE_LIBRTE_VIRTIO_DEBUG_RX
18 #define PMD_RX_LOG(level, fmt, args...) \
19 RTE_LOG(level, PMD, "%s() rx: " fmt "\n", __func__, ## args)
21 #define PMD_RX_LOG(level, fmt, args...) do { } while(0)
24 #ifdef RTE_LIBRTE_VIRTIO_DEBUG_TX
25 #define PMD_TX_LOG(level, fmt, args...) \
26 RTE_LOG(level, PMD, "%s() tx: " fmt "\n", __func__, ## args)
28 #define PMD_TX_LOG(level, fmt, args...) do { } while(0)
31 extern int virtio_logtype_driver;
32 #define PMD_DRV_LOG(level, fmt, args...) \
33 rte_log(RTE_LOG_ ## level, virtio_logtype_driver, \
34 "%s(): " fmt "\n", __func__, ## args)
36 #endif /* _VIRTIO_LOGS_H_ */