xref: /dpdk/lib/ethdev/ethdev_profile.h (revision 8c9e97dd)
199a2dd95SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause
299a2dd95SBruce Richardson  * Copyright(c) 2010-2018 Intel Corporation
399a2dd95SBruce Richardson  */
499a2dd95SBruce Richardson 
599a2dd95SBruce Richardson #ifndef _RTE_ETHDEV_PROFILE_H_
699a2dd95SBruce Richardson #define _RTE_ETHDEV_PROFILE_H_
799a2dd95SBruce Richardson 
899a2dd95SBruce Richardson #include "rte_ethdev.h"
9*8c9e97ddSAman Singh #include "ethdev_driver.h"
1099a2dd95SBruce Richardson 
1199a2dd95SBruce Richardson /**
1299a2dd95SBruce Richardson  * Initialization of the Ethernet device profiling.
1399a2dd95SBruce Richardson  * Implementation of this function depends on chosen profiling method,
1499a2dd95SBruce Richardson  * defined in configs.
1599a2dd95SBruce Richardson  *
1699a2dd95SBruce Richardson  * @param port_id
1799a2dd95SBruce Richardson  *  The port identifier of the Ethernet device.
1899a2dd95SBruce Richardson  * @param dev
1999a2dd95SBruce Richardson  *  Pointer to struct rte_eth_dev corresponding to given port_id.
2099a2dd95SBruce Richardson  *
2199a2dd95SBruce Richardson  * @return
2299a2dd95SBruce Richardson  *  - On success, zero.
2399a2dd95SBruce Richardson  *  - On failure, a negative value.
2499a2dd95SBruce Richardson  */
2599a2dd95SBruce Richardson int
2699a2dd95SBruce Richardson __rte_eth_dev_profile_init(uint16_t port_id, struct rte_eth_dev *dev);
2799a2dd95SBruce Richardson 
2899a2dd95SBruce Richardson #ifdef RTE_ETHDEV_PROFILE_WITH_VTUNE
2999a2dd95SBruce Richardson 
3099a2dd95SBruce Richardson uint16_t
3199a2dd95SBruce Richardson profile_hook_rx_burst_cb(uint16_t port_id, uint16_t queue_id,
3299a2dd95SBruce Richardson 	struct rte_mbuf *pkts[], uint16_t nb_pkts,
3399a2dd95SBruce Richardson 	uint16_t max_pkts, void *user_param);
3499a2dd95SBruce Richardson 
3599a2dd95SBruce Richardson #endif /* RTE_ETHDEV_PROFILE_WITH_VTUNE */
3699a2dd95SBruce Richardson 
3799a2dd95SBruce Richardson #endif
38