net/virtio: fix incorrect cast of void *
[dpdk.git] / eventdev / rte_eventdev_trace.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2020 Marvell International Ltd.
3  */
4
5 #ifndef _RTE_EVENTDEV_TRACE_H_
6 #define _RTE_EVENTDEV_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_eventdev.h"
21 #include "rte_event_eth_rx_adapter.h"
22 #include "rte_event_timer_adapter.h"
23
24 RTE_TRACE_POINT(
25         rte_eventdev_trace_configure,
26         RTE_TRACE_POINT_ARGS(uint8_t dev_id,
27                 const struct rte_event_dev_config *dev_conf, int rc),
28         rte_trace_point_emit_u8(dev_id);
29         rte_trace_point_emit_u32(dev_conf->dequeue_timeout_ns);
30         rte_trace_point_emit_i32(dev_conf->nb_events_limit);
31         rte_trace_point_emit_u8(dev_conf->nb_event_queues);
32         rte_trace_point_emit_u8(dev_conf->nb_event_ports);
33         rte_trace_point_emit_u32(dev_conf->nb_event_queue_flows);
34         rte_trace_point_emit_u32(dev_conf->nb_event_port_dequeue_depth);
35         rte_trace_point_emit_u32(dev_conf->nb_event_port_enqueue_depth);
36         rte_trace_point_emit_u32(dev_conf->event_dev_cfg);
37         rte_trace_point_emit_u8(dev_conf->nb_single_link_event_port_queues);
38         rte_trace_point_emit_int(rc);
39 )
40
41 RTE_TRACE_POINT(
42         rte_eventdev_trace_queue_setup,
43         RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t queue_id,
44                 const struct rte_event_queue_conf *queue_conf),
45         rte_trace_point_emit_u8(dev_id);
46         rte_trace_point_emit_u8(queue_id);
47         rte_trace_point_emit_u32(queue_conf->nb_atomic_flows);
48         rte_trace_point_emit_u32(queue_conf->nb_atomic_order_sequences);
49         rte_trace_point_emit_u32(queue_conf->event_queue_cfg);
50         rte_trace_point_emit_u8(queue_conf->schedule_type);
51         rte_trace_point_emit_u8(queue_conf->priority);
52 )
53
54 RTE_TRACE_POINT(
55         rte_eventdev_trace_port_setup,
56         RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t port_id,
57                 const struct rte_event_port_conf *port_conf, int rc),
58         rte_trace_point_emit_u8(dev_id);
59         rte_trace_point_emit_u8(port_id);
60         rte_trace_point_emit_i32(port_conf->new_event_threshold);
61         rte_trace_point_emit_u16(port_conf->dequeue_depth);
62         rte_trace_point_emit_u16(port_conf->enqueue_depth);
63         rte_trace_point_emit_u32(port_conf->event_port_cfg);
64         rte_trace_point_emit_int(rc);
65 )
66
67 RTE_TRACE_POINT(
68         rte_eventdev_trace_port_link,
69         RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t port_id,
70                 uint16_t nb_links, int rc),
71         rte_trace_point_emit_u8(dev_id);
72         rte_trace_point_emit_u8(port_id);
73         rte_trace_point_emit_u16(nb_links);
74         rte_trace_point_emit_int(rc);
75 )
76
77 RTE_TRACE_POINT(
78         rte_eventdev_trace_port_unlink,
79         RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t port_id,
80                 uint16_t nb_unlinks, int rc),
81         rte_trace_point_emit_u8(dev_id);
82         rte_trace_point_emit_u8(port_id);
83         rte_trace_point_emit_u16(nb_unlinks);
84         rte_trace_point_emit_int(rc);
85 )
86
87 RTE_TRACE_POINT(
88         rte_eventdev_trace_start,
89         RTE_TRACE_POINT_ARGS(uint8_t dev_id, int rc),
90         rte_trace_point_emit_u8(dev_id);
91         rte_trace_point_emit_int(rc);
92 )
93
94 RTE_TRACE_POINT(
95         rte_eventdev_trace_stop,
96         RTE_TRACE_POINT_ARGS(uint8_t dev_id),
97         rte_trace_point_emit_u8(dev_id);
98 )
99
100 RTE_TRACE_POINT(
101         rte_eventdev_trace_close,
102         RTE_TRACE_POINT_ARGS(uint8_t dev_id),
103         rte_trace_point_emit_u8(dev_id);
104 )
105
106 RTE_TRACE_POINT(
107         rte_eventdev_trace_eth_rx_adapter_create,
108         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t dev_id, void *conf_cb,
109                 void *conf_arg),
110         rte_trace_point_emit_u8(adptr_id);
111         rte_trace_point_emit_u8(dev_id);
112         rte_trace_point_emit_ptr(conf_cb);
113         rte_trace_point_emit_ptr(conf_arg);
114 )
115
116 RTE_TRACE_POINT(
117         rte_eventdev_trace_eth_rx_adapter_free,
118         RTE_TRACE_POINT_ARGS(uint8_t adptr_id),
119         rte_trace_point_emit_u8(adptr_id);
120 )
121
122 RTE_TRACE_POINT(
123         rte_eventdev_trace_eth_rx_adapter_queue_add,
124         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint16_t eth_dev_id,
125                 int32_t rx_queue_id,
126                 const struct rte_event_eth_rx_adapter_queue_conf *queue_conf,
127                 int rc),
128         rte_trace_point_emit_u8(adptr_id);
129         rte_trace_point_emit_u16(eth_dev_id);
130         rte_trace_point_emit_i32(rx_queue_id);
131         rte_trace_point_emit_u32(queue_conf->rx_queue_flags);
132         rte_trace_point_emit_u16(queue_conf->servicing_weight);
133         rte_trace_point_emit_u8(queue_conf->ev.queue_id);
134         rte_trace_point_emit_u8(queue_conf->ev.priority);
135         rte_trace_point_emit_int(rc);
136 )
137
138 RTE_TRACE_POINT(
139         rte_eventdev_trace_eth_rx_adapter_queue_del,
140         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint16_t eth_dev_id,
141                 int32_t rx_queue_id, int rc),
142         rte_trace_point_emit_u8(adptr_id);
143         rte_trace_point_emit_u16(eth_dev_id);
144         rte_trace_point_emit_i32(rx_queue_id);
145         rte_trace_point_emit_int(rc);
146 )
147
148 RTE_TRACE_POINT(
149         rte_eventdev_trace_eth_rx_adapter_start,
150         RTE_TRACE_POINT_ARGS(uint8_t adptr_id),
151         rte_trace_point_emit_u8(adptr_id);
152 )
153
154 RTE_TRACE_POINT(
155         rte_eventdev_trace_eth_rx_adapter_stop,
156         RTE_TRACE_POINT_ARGS(uint8_t adptr_id),
157         rte_trace_point_emit_u8(adptr_id);
158 )
159
160 RTE_TRACE_POINT(
161         rte_eventdev_trace_eth_tx_adapter_create,
162         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t dev_id, void *conf_cb,
163                 struct rte_event_port_conf *port_conf, int rc),
164         rte_trace_point_emit_u8(adptr_id);
165         rte_trace_point_emit_u8(dev_id);
166         rte_trace_point_emit_i32(port_conf->new_event_threshold);
167         rte_trace_point_emit_u16(port_conf->dequeue_depth);
168         rte_trace_point_emit_u16(port_conf->enqueue_depth);
169         rte_trace_point_emit_u32(port_conf->event_port_cfg);
170         rte_trace_point_emit_ptr(conf_cb);
171         rte_trace_point_emit_int(rc);
172 )
173
174 RTE_TRACE_POINT(
175         rte_eventdev_trace_eth_tx_adapter_free,
176         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, int rc),
177         rte_trace_point_emit_u8(adptr_id);
178         rte_trace_point_emit_int(rc);
179 )
180
181 RTE_TRACE_POINT(
182         rte_eventdev_trace_eth_tx_adapter_queue_add,
183         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint16_t eth_dev_id,
184                 int32_t queue, int rc),
185         rte_trace_point_emit_u8(adptr_id);
186         rte_trace_point_emit_u16(eth_dev_id);
187         rte_trace_point_emit_i32(queue);
188         rte_trace_point_emit_int(rc);
189 )
190
191 RTE_TRACE_POINT(
192         rte_eventdev_trace_eth_tx_adapter_queue_del,
193         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint16_t eth_dev_id,
194                 int32_t queue, int rc),
195         rte_trace_point_emit_u8(adptr_id);
196         rte_trace_point_emit_u16(eth_dev_id);
197         rte_trace_point_emit_i32(queue);
198         rte_trace_point_emit_int(rc);
199 )
200
201 RTE_TRACE_POINT(
202         rte_eventdev_trace_eth_tx_adapter_start,
203         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, int rc),
204         rte_trace_point_emit_u8(adptr_id);
205         rte_trace_point_emit_int(rc);
206 )
207
208 RTE_TRACE_POINT(
209         rte_eventdev_trace_eth_tx_adapter_stop,
210         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, int rc),
211         rte_trace_point_emit_u8(adptr_id);
212         rte_trace_point_emit_int(rc);
213 )
214
215 RTE_TRACE_POINT(
216         rte_eventdev_trace_timer_adapter_create,
217         RTE_TRACE_POINT_ARGS(uint16_t adapter_id, void *adapter,
218                 const struct rte_event_timer_adapter_conf *conf,
219                 void *conf_cb),
220         rte_trace_point_emit_u16(adapter_id);
221         rte_trace_point_emit_ptr(adapter);
222         rte_trace_point_emit_ptr(conf);
223         rte_trace_point_emit_u8(conf->event_dev_id);
224         rte_trace_point_emit_u16(conf->timer_adapter_id);
225         rte_trace_point_emit_u64(conf->timer_tick_ns);
226         rte_trace_point_emit_u64(conf->max_tmo_ns);
227         rte_trace_point_emit_u64(conf->nb_timers);
228         rte_trace_point_emit_u64(conf->flags);
229         rte_trace_point_emit_ptr(conf_cb);
230 )
231
232 RTE_TRACE_POINT(
233         rte_eventdev_trace_timer_adapter_start,
234         RTE_TRACE_POINT_ARGS(const void *adapter),
235         rte_trace_point_emit_ptr(adapter);
236 )
237
238 RTE_TRACE_POINT(
239         rte_eventdev_trace_timer_adapter_stop,
240         RTE_TRACE_POINT_ARGS(const void *adapter),
241         rte_trace_point_emit_ptr(adapter);
242 )
243
244 RTE_TRACE_POINT(
245         rte_eventdev_trace_timer_adapter_free,
246         RTE_TRACE_POINT_ARGS(void *adapter),
247         rte_trace_point_emit_ptr(adapter);
248 )
249
250 RTE_TRACE_POINT(
251         rte_eventdev_trace_crypto_adapter_create,
252         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t dev_id, void *adapter,
253                 struct rte_event_port_conf *port_conf, uint8_t mode),
254         rte_trace_point_emit_u8(adptr_id);
255         rte_trace_point_emit_u8(dev_id);
256         rte_trace_point_emit_ptr(adapter);
257         rte_trace_point_emit_u8(mode);
258         rte_trace_point_emit_i32(port_conf->new_event_threshold);
259         rte_trace_point_emit_u16(port_conf->dequeue_depth);
260         rte_trace_point_emit_u16(port_conf->enqueue_depth);
261         rte_trace_point_emit_u32(port_conf->event_port_cfg);
262 )
263
264 RTE_TRACE_POINT(
265         rte_eventdev_trace_crypto_adapter_free,
266         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, void *adapter),
267         rte_trace_point_emit_u8(adptr_id);
268         rte_trace_point_emit_ptr(adapter);
269 )
270
271 RTE_TRACE_POINT(
272         rte_eventdev_trace_crypto_adapter_queue_pair_add,
273         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t cdev_id,
274                 const void *event, int32_t queue_pair_id),
275         rte_trace_point_emit_u8(adptr_id);
276         rte_trace_point_emit_u8(cdev_id);
277         rte_trace_point_emit_i32(queue_pair_id);
278         rte_trace_point_emit_ptr(event);
279 )
280
281 RTE_TRACE_POINT(
282         rte_eventdev_trace_crypto_adapter_queue_pair_del,
283         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t cdev_id,
284                 int32_t queue_pair_id, int rc),
285         rte_trace_point_emit_u8(adptr_id);
286         rte_trace_point_emit_u8(cdev_id);
287         rte_trace_point_emit_i32(queue_pair_id);
288         rte_trace_point_emit_int(rc);
289 )
290
291 RTE_TRACE_POINT(
292         rte_eventdev_trace_crypto_adapter_start,
293         RTE_TRACE_POINT_ARGS(uint8_t adptr_id, void *adapter),
294         rte_trace_point_emit_u8(adptr_id);
295         rte_trace_point_emit_ptr(adapter);
296 )
297
298 RTE_TRACE_POINT(
299         rte_eventdev_trace_crypto_adapter_stop,
300         RTE_TRACE_POINT_ARGS(uint8_t adptr_id),
301         rte_trace_point_emit_u8(adptr_id);
302 )
303
304 #ifdef __cplusplus
305 }
306 #endif
307
308 #endif /* _RTE_EVENTDEV_TRACE_H_ */