1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2020 Marvell International Ltd.
5 #ifndef _RTE_ETHDEV_TRACE_H_
6 #define _RTE_ETHDEV_TRACE_H_
11 * API for ethdev trace support
18 #include <rte_trace_point.h>
20 #include "rte_ethdev.h"
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);
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);
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);
73 rte_ethdev_trace_start,
74 RTE_TRACE_POINT_ARGS(uint16_t port_id),
75 rte_trace_point_emit_u16(port_id);
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);
86 rte_ethdev_trace_close,
87 RTE_TRACE_POINT_ARGS(uint16_t port_id),
88 rte_trace_point_emit_u16(port_id);
95 #endif /* _RTE_ETHDEV_TRACE_H_ */