net/virtio: fix incorrect cast of void *
[dpdk.git] / ethdev / rte_ethdev_trace.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2020 Marvell International Ltd.
3  */
4
5 #ifndef _RTE_ETHDEV_TRACE_H_
6 #define _RTE_ETHDEV_TRACE_H_
7
8 /**
9  * @file
10  *
11  * API for ethdev trace support
12  */
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 #include <rte_trace_point.h>
19
20 #include "rte_ethdev.h"
21
22 RTE_TRACE_POINT(
23         rte_ethdev_trace_configure,
24         RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t nb_rx_q,
25                 uint16_t nb_tx_q, const struct rte_eth_conf *dev_conf, int rc),
26         rte_trace_point_emit_u16(port_id);
27         rte_trace_point_emit_u16(nb_rx_q);
28         rte_trace_point_emit_u16(nb_tx_q);
29         rte_trace_point_emit_u32(dev_conf->link_speeds);
30         rte_trace_point_emit_u32(dev_conf->rxmode.mq_mode);
31         rte_trace_point_emit_u32(dev_conf->rxmode.max_rx_pkt_len);
32         rte_trace_point_emit_u64(dev_conf->rxmode.offloads);
33         rte_trace_point_emit_u32(dev_conf->txmode.mq_mode);
34         rte_trace_point_emit_u64(dev_conf->txmode.offloads);
35         rte_trace_point_emit_u32(dev_conf->lpbk_mode);
36         rte_trace_point_emit_int(rc);
37 )
38
39 RTE_TRACE_POINT(
40         rte_ethdev_trace_rxq_setup,
41         RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id,
42                 uint16_t nb_rx_desc, void *mp,
43                 const struct rte_eth_rxconf *rx_conf, int rc),
44         rte_trace_point_emit_u16(port_id);
45         rte_trace_point_emit_u16(rx_queue_id);
46         rte_trace_point_emit_u16(nb_rx_desc);
47         rte_trace_point_emit_ptr(mp);
48         rte_trace_point_emit_u8(rx_conf->rx_thresh.pthresh);
49         rte_trace_point_emit_u8(rx_conf->rx_thresh.hthresh);
50         rte_trace_point_emit_u8(rx_conf->rx_thresh.wthresh);
51         rte_trace_point_emit_u8(rx_conf->rx_drop_en);
52         rte_trace_point_emit_u8(rx_conf->rx_deferred_start);
53         rte_trace_point_emit_u64(rx_conf->offloads);
54         rte_trace_point_emit_int(rc);
55 )
56
57 RTE_TRACE_POINT(
58         rte_ethdev_trace_txq_setup,
59         RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t tx_queue_id,
60                 uint16_t nb_tx_desc, const struct rte_eth_txconf *tx_conf),
61         rte_trace_point_emit_u16(port_id);
62         rte_trace_point_emit_u16(tx_queue_id);
63         rte_trace_point_emit_u16(nb_tx_desc);
64         rte_trace_point_emit_u8(tx_conf->tx_thresh.pthresh);
65         rte_trace_point_emit_u8(tx_conf->tx_thresh.hthresh);
66         rte_trace_point_emit_u8(tx_conf->tx_thresh.wthresh);
67         rte_trace_point_emit_u8(tx_conf->tx_deferred_start);
68         rte_trace_point_emit_u16(tx_conf->tx_free_thresh);
69         rte_trace_point_emit_u64(tx_conf->offloads);
70 )
71
72 RTE_TRACE_POINT(
73         rte_ethdev_trace_start,
74         RTE_TRACE_POINT_ARGS(uint16_t port_id),
75         rte_trace_point_emit_u16(port_id);
76 )
77
78 RTE_TRACE_POINT(
79         rte_ethdev_trace_stop,
80         RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret),
81         rte_trace_point_emit_u16(port_id);
82         rte_trace_point_emit_int(ret);
83 )
84
85 RTE_TRACE_POINT(
86         rte_ethdev_trace_close,
87         RTE_TRACE_POINT_ARGS(uint16_t port_id),
88         rte_trace_point_emit_u16(port_id);
89 )
90
91 #ifdef __cplusplus
92 }
93 #endif
94
95 #endif /* _RTE_ETHDEV_TRACE_H_ */