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:46 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-10-27 15:18:23 +0200
commit0fe3a37924d4fb60c712098c33bdae3c2b9f5c6c (patch)
treec84aa4e1087eb4d10af7ef51f83de643e838760c /lib/librte_telemetry/rte_telemetry.h
parent67c3c2de48105f58bd478675c3f09b6b4261d06c (diff)
downloaddpdk-0fe3a37924d4fb60c712098c33bdae3c2b9f5c6c.zip
dpdk-0fe3a37924d4fb60c712098c33bdae3c2b9f5c6c.tar.gz
dpdk-0fe3a37924d4fb60c712098c33bdae3c2b9f5c6c.tar.xz
telemetry: format json response when sending stats
This patch adds functionality to create a JSON message in order to send it to a client socket. When stats are requested by a client, they are retrieved from the metrics library and encoded in JSON format. 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> 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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index 97674ae..119db16 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -48,4 +48,19 @@ rte_telemetry_init(void);
int32_t __rte_experimental
rte_telemetry_cleanup(void);
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * Runs various tests to ensure telemetry initialisation and register/unregister
+ * functions are working correctly.
+ *
+ * @return
+ * 0 on success when all tests have passed
+ * @return
+ * -1 on failure when the test has failed
+ */
+int32_t __rte_experimental
+rte_telemetry_selftest(void);
+
#endif