xref: /dpdk/lib/ethdev/ethdev_profile.h (revision daa02b5cddbb8e11b31d41e2bf7bb1ae64dcae2f)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2018 Intel Corporation
3  */
4 
5 #ifndef _RTE_ETHDEV_PROFILE_H_
6 #define _RTE_ETHDEV_PROFILE_H_
7 
8 #include "rte_ethdev.h"
9 
10 /**
11  * Initialization of the Ethernet device profiling.
12  * Implementation of this function depends on chosen profiling method,
13  * defined in configs.
14  *
15  * @param port_id
16  *  The port identifier of the Ethernet device.
17  * @param dev
18  *  Pointer to struct rte_eth_dev corresponding to given port_id.
19  *
20  * @return
21  *  - On success, zero.
22  *  - On failure, a negative value.
23  */
24 int
25 __rte_eth_dev_profile_init(uint16_t port_id, struct rte_eth_dev *dev);
26 
27 #ifdef RTE_ETHDEV_PROFILE_WITH_VTUNE
28 
29 uint16_t
30 profile_hook_rx_burst_cb(uint16_t port_id, uint16_t queue_id,
31 	struct rte_mbuf *pkts[], uint16_t nb_pkts,
32 	uint16_t max_pkts, void *user_param);
33 
34 #endif /* RTE_ETHDEV_PROFILE_WITH_VTUNE */
35 
36 #endif
37