summaryrefslogtreecommitdiff
path: root/lib/librte_telemetry/rte_telemetry.h
diff options
context:
space:
mode:
authorCiara Power <ciara.power@intel.com>2018-10-27 10:17:41 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-10-27 15:18:20 +0200
commit8877ac688b5267c5edec38fbd07dfad0c993c020 (patch)
treededbadfced20111a3486fe6ac2357b9b3e27b844 /lib/librte_telemetry/rte_telemetry.h
parent6911c9fd8fbec52f68e48515c0a1681fd0c8a25b (diff)
downloaddpdk-8877ac688b5267c5edec38fbd07dfad0c993c020.zip
dpdk-8877ac688b5267c5edec38fbd07dfad0c993c020.tar.gz
dpdk-8877ac688b5267c5edec38fbd07dfad0c993c020.tar.xz
telemetry: introduce infrastructure
This patch adds the infrastructure and initial code for the telemetry library. The telemetry init is registered with eal_init(). We can then check to see if --telemetry was passed as an eal option. If --telemetry was parsed, then we call telemetry init at the end of eal init. Control threads are used to get CPU cycles for telemetry, which are configured in this patch also. Signed-off-by: Ciara Power <ciara.power@intel.com> Signed-off-by: Brian Archbold <brian.archbold@intel.com> Signed-off-by: Kevin Laatz <kevin.laatz@intel.com> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Diffstat (limited to 'lib/librte_telemetry/rte_telemetry.h')
-rw-r--r--lib/librte_telemetry/rte_telemetry.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
new file mode 100644
index 0000000..97674ae
--- /dev/null
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018 Intel Corporation
+ */
+
+#include <stdint.h>
+
+#ifndef _RTE_TELEMETRY_H_
+#define _RTE_TELEMETRY_H_
+
+/**
+ * @file
+ * RTE Telemetry
+ *
+ * The telemetry library provides a method to retrieve statistics from
+ * DPDK by sending a JSON encoded message over a socket. DPDK will send
+ * a JSON encoded response containing telemetry data.
+ ***/
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * Initialize Telemetry
+ *
+ * @return
+ * 0 on successful initialisation.
+ * @return
+ * -ENOMEM on memory allocation error
+ * @return
+ * -EPERM on unknown error failure
+ * @return
+ * -EALREADY if Telemetry is already initialised.
+ */
+int32_t __rte_experimental
+rte_telemetry_init(void);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * Clean up and free memory.
+ *
+ * @return
+ * 0 on success
+ * @return
+ * -EPERM on failure
+ */
+int32_t __rte_experimental
+rte_telemetry_cleanup(void);
+
+#endif