mempool: fix slow allocation of large mempools
[dpdk.git] / lib / librte_telemetry / rte_telemetry.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018 Intel Corporation
3  */
4
5 #include <stdint.h>
6
7 #ifndef _RTE_TELEMETRY_H_
8 #define _RTE_TELEMETRY_H_
9
10 /**
11  * @file
12  * RTE Telemetry
13  *
14  * The telemetry library provides a method to retrieve statistics from
15  * DPDK by sending a JSON encoded message over a socket. DPDK will send
16  * a JSON encoded response containing telemetry data.
17  ***/
18
19 /**
20  * @warning
21  * @b EXPERIMENTAL: this API may change without prior notice
22  *
23  * Initialize Telemetry
24  *
25  * @return
26  *  0 on successful initialisation.
27  * @return
28  *  -ENOMEM on memory allocation error
29  * @return
30  *  -EPERM on unknown error failure
31  * @return
32  *  -EALREADY if Telemetry is already initialised.
33  */
34 __rte_experimental
35 int32_t
36 rte_telemetry_init(void);
37
38 /**
39  * @warning
40  * @b EXPERIMENTAL: this API may change without prior notice
41  *
42  * Clean up and free memory.
43  *
44  * @return
45  *  0 on success
46  * @return
47  *  -EPERM on failure
48  */
49 __rte_experimental
50 int32_t
51 rte_telemetry_cleanup(void);
52
53 /**
54  * @warning
55  * @b EXPERIMENTAL: this API may change without prior notice
56  *
57  * Runs various tests to ensure telemetry initialisation and register/unregister
58  * functions are working correctly.
59  *
60  * @return
61  *  0 on success when all tests have passed
62  * @return
63  *  -1 on failure when the test has failed
64  */
65 __rte_experimental
66 int32_t
67 rte_telemetry_selftest(void);
68
69 #endif