1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation
7 #ifndef _RTE_TELEMETRY_H_
8 #define _RTE_TELEMETRY_H_
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.
21 * @b EXPERIMENTAL: this API may change without prior notice
23 * Initialize Telemetry
26 * 0 on successful initialisation.
28 * -ENOMEM on memory allocation error
30 * -EPERM on unknown error failure
32 * -EALREADY if Telemetry is already initialised.
34 int32_t __rte_experimental
35 rte_telemetry_init(void);
39 * @b EXPERIMENTAL: this API may change without prior notice
41 * Clean up and free memory.
48 int32_t __rte_experimental
49 rte_telemetry_cleanup(void);
53 * @b EXPERIMENTAL: this API may change without prior notice
55 * Runs various tests to ensure telemetry initialisation and register/unregister
56 * functions are working correctly.
59 * 0 on success when all tests have passed
61 * -1 on failure when the test has failed
63 int32_t __rte_experimental
64 rte_telemetry_selftest(void);