xref: /dpdk/drivers/net/nfb/nfb_stats.h (revision 9970a9ad07db7745ca6bc441819b287940ae86ea)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2019 Cesnet
3  * Copyright(c) 2019 Netcope Technologies, a.s. <info@netcope.com>
4  * All rights reserved.
5  */
6 
7 #ifndef _NFB_STATS_H_
8 #define _NFB_STATS_H_
9 
10 #include <nfb/nfb.h>
11 #include <nfb/ndp.h>
12 
13 #include <rte_ethdev.h>
14 
15 /**
16  * DPDK callback to get device statistics.
17  *
18  * @param dev
19  *   Pointer to Ethernet device structure.
20  * @param[out] stats
21  *   Stats structure output buffer.
22  *
23  * @return
24  *   0 on success and stats is filled, negative errno value otherwise.
25  */
26 int
27 nfb_eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats);
28 
29 /**
30  * DPDK callback to clear device statistics.
31  *
32  * @param dev
33  *   Pointer to Ethernet device structure.
34  *
35  * @return
36  *   0 on success, negative errno value otherwise.
37  */
38 int
39 nfb_eth_stats_reset(struct rte_eth_dev *dev);
40 
41 #endif /* _NFB_STATS_H_ */
42