numam-dpdk/lib/librte_ethdev/rte_ethdev_trace.h
Ivan Ilchenko 62024eb827 ethdev: change stop operation callback to return int
Change eth_dev_stop_t return value from void to int.
Make eth_dev_stop_t implementations across all drivers to return
negative errno values if case of error conditions.

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-10-16 22:26:41 +02:00

96 lines
2.7 KiB
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(C) 2020 Marvell International Ltd.
*/
#ifndef _RTE_ETHDEV_TRACE_H_
#define _RTE_ETHDEV_TRACE_H_
/**
* @file
*
* API for ethdev trace support
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <rte_trace_point.h>
#include "rte_ethdev.h"
RTE_TRACE_POINT(
rte_ethdev_trace_configure,
RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t nb_rx_q,
uint16_t nb_tx_q, const struct rte_eth_conf *dev_conf, int rc),
rte_trace_point_emit_u16(port_id);
rte_trace_point_emit_u16(nb_rx_q);
rte_trace_point_emit_u16(nb_tx_q);
rte_trace_point_emit_u32(dev_conf->link_speeds);
rte_trace_point_emit_u32(dev_conf->rxmode.mq_mode);
rte_trace_point_emit_u32(dev_conf->rxmode.max_rx_pkt_len);
rte_trace_point_emit_u64(dev_conf->rxmode.offloads);
rte_trace_point_emit_u32(dev_conf->txmode.mq_mode);
rte_trace_point_emit_u64(dev_conf->txmode.offloads);
rte_trace_point_emit_u32(dev_conf->lpbk_mode);
rte_trace_point_emit_int(rc);
)
RTE_TRACE_POINT(
rte_ethdev_trace_rxq_setup,
RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id,
uint16_t nb_rx_desc, void *mp,
const struct rte_eth_rxconf *rx_conf, int rc),
rte_trace_point_emit_u16(port_id);
rte_trace_point_emit_u16(rx_queue_id);
rte_trace_point_emit_u16(nb_rx_desc);
rte_trace_point_emit_ptr(mp);
rte_trace_point_emit_u8(rx_conf->rx_thresh.pthresh);
rte_trace_point_emit_u8(rx_conf->rx_thresh.hthresh);
rte_trace_point_emit_u8(rx_conf->rx_thresh.wthresh);
rte_trace_point_emit_u8(rx_conf->rx_drop_en);
rte_trace_point_emit_u8(rx_conf->rx_deferred_start);
rte_trace_point_emit_u64(rx_conf->offloads);
rte_trace_point_emit_int(rc);
)
RTE_TRACE_POINT(
rte_ethdev_trace_txq_setup,
RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t tx_queue_id,
uint16_t nb_tx_desc, const struct rte_eth_txconf *tx_conf),
rte_trace_point_emit_u16(port_id);
rte_trace_point_emit_u16(tx_queue_id);
rte_trace_point_emit_u16(nb_tx_desc);
rte_trace_point_emit_u8(tx_conf->tx_thresh.pthresh);
rte_trace_point_emit_u8(tx_conf->tx_thresh.hthresh);
rte_trace_point_emit_u8(tx_conf->tx_thresh.wthresh);
rte_trace_point_emit_u8(tx_conf->tx_deferred_start);
rte_trace_point_emit_u16(tx_conf->tx_free_thresh);
rte_trace_point_emit_u64(tx_conf->offloads);
)
RTE_TRACE_POINT(
rte_ethdev_trace_start,
RTE_TRACE_POINT_ARGS(uint16_t port_id),
rte_trace_point_emit_u16(port_id);
)
RTE_TRACE_POINT(
rte_ethdev_trace_stop,
RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret),
rte_trace_point_emit_u16(port_id);
rte_trace_point_emit_int(ret);
)
RTE_TRACE_POINT(
rte_ethdev_trace_close,
RTE_TRACE_POINT_ARGS(uint16_t port_id),
rte_trace_point_emit_u16(port_id);
)
#ifdef __cplusplus
}
#endif
#endif /* _RTE_ETHDEV_TRACE_H_ */