1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2020 Marvell International Ltd.
5 #ifndef _RTE_EVENTDEV_TRACE_H_
6 #define _RTE_EVENTDEV_TRACE_H_
11 * API for ethdev trace support
18 #include <rte_trace_point.h>
20 #include "rte_eventdev.h"
21 #include "rte_event_eth_rx_adapter.h"
22 #include "rte_event_timer_adapter.h"
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);
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);
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);
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);
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);
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);
95 rte_eventdev_trace_stop,
96 RTE_TRACE_POINT_ARGS(uint8_t dev_id),
97 rte_trace_point_emit_u8(dev_id);
101 rte_eventdev_trace_close,
102 RTE_TRACE_POINT_ARGS(uint8_t dev_id),
103 rte_trace_point_emit_u8(dev_id);
107 rte_eventdev_trace_eth_rx_adapter_create,
108 RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t dev_id, void *conf_cb,
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);
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);
123 rte_eventdev_trace_eth_rx_adapter_queue_add,
124 RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint16_t eth_dev_id,
126 const struct rte_event_eth_rx_adapter_queue_conf *queue_conf,
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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,
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);
233 rte_eventdev_trace_timer_adapter_start,
234 RTE_TRACE_POINT_ARGS(const void *adapter),
235 rte_trace_point_emit_ptr(adapter);
239 rte_eventdev_trace_timer_adapter_stop,
240 RTE_TRACE_POINT_ARGS(const void *adapter),
241 rte_trace_point_emit_ptr(adapter);
245 rte_eventdev_trace_timer_adapter_free,
246 RTE_TRACE_POINT_ARGS(void *adapter),
247 rte_trace_point_emit_ptr(adapter);
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);
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);
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);
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);
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);
299 rte_eventdev_trace_crypto_adapter_stop,
300 RTE_TRACE_POINT_ARGS(uint8_t adptr_id),
301 rte_trace_point_emit_u8(adptr_id);
308 #endif /* _RTE_EVENTDEV_TRACE_H_ */