From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Laatz Subject: [PATCH v2 00/10] introduce telemetry library Date: Wed, 3 Oct 2018 18:36:02 +0100 Message-ID: <20181003173612.67101-1-kevin.laatz@intel.com> References: <1535026093-101872-1-git-send-email-ciara.power@intel.com> Cc: harry.van.haaren@intel.com, stephen@networkplumber.org, gaetan.rivet@6wind.com, shreyansh.jain@nxp.com, thomas@monjalon.net, Kevin Laatz To: dev@dpdk.org Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id A82564C96 for ; Wed, 3 Oct 2018 19:36:18 +0200 (CEST) In-Reply-To: <1535026093-101872-1-git-send-email-ciara.power@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patchset introduces a Telemetry library for DPDK Service Assurance. This library provides an easy way to query DPDK Ethdev metrics. The telemetry library provides a method for a service assurance component to retrieve metrics from a DPDK packet forwarding application. Communicating from the service assurance component to DPDK is done using a UNIX domain socket, passing a JSON formatted string. A reply is sent (again a JSON formatted string) of the current DPDK metrics. The telemetry component makes use of the existing rte_metrics library to query values. The values to be transmitted via the telemetry infrastructure must be present in the Metrics library. Currently the ethdev values are pushed to the metrics library, and the queried from there there is an open question on how applications would like this to occur. Currently only ethdev to metrics functionality is implemented, however other subsystems like crypto, eventdev, keepalive etc can use similar mechanisms. Exposing DPDK Telemetry via a socket interface enables service assurance agents like collectd to consume data from DPDK. This is vital for monitoring, fault-detection, and error reporting. A collectd plugin has been created to interact with the DPDK Telemetry component, showing how it can be used in practice. The collectd plugin will be upstreamed to collectd at a later stage. A small python script is provided in ./usertools/telemetry_client.py to quick-start using DPDK Telemetry. Note: We are aware that the --telemetry flag is not working for meson builds, we are working on it for a future patch. Despite opterr being set to 0, --telemetry said to be 'unrecognized' as a startup print. This is a cosmetic issue and will also be addressed. --- v2: - Reworked telemetry as part of EAL instead of using vdev (Gaetan) - Refactored rte_telemetry_command (Gaetan) - Added MAINTAINERS file entry (Stephen) - Updated docs to reflect vdev to eal rework - Removed collectd patch from patchset (Thomas) - General code clean up from v1 feedback Ciara Power, Brian Archbold and Kevin Laatz (10): telemetry: initial telemetry infrastructure telemetry: add initial connection socket telemetry: add client feature and sockets telemetry: add parser for client socket messages telemetry: update metrics before sending stats telemetry: format json response when sending stats telemetry: add tests for telemetry api telemetry: add ability to disable selftest doc: add telemetry documentation usertools: add client python script for telemetry MAINTAINERS | 5 + config/common_base | 5 + doc/guides/howto/index.rst | 1 + doc/guides/howto/telemetry.rst | 85 + lib/Makefile | 2 + lib/librte_eal/common/include/rte_eal.h | 19 + lib/librte_eal/linuxapp/eal/eal.c | 37 +- lib/librte_eal/rte_eal_version.map | 7 + lib/librte_telemetry/Makefile | 30 + lib/librte_telemetry/meson.build | 9 + lib/librte_telemetry/rte_telemetry.c | 1786 +++++++++++++++++++++ lib/librte_telemetry/rte_telemetry.h | 48 + lib/librte_telemetry/rte_telemetry_internal.h | 81 + lib/librte_telemetry/rte_telemetry_parser.c | 586 +++++++ lib/librte_telemetry/rte_telemetry_parser.h | 13 + lib/librte_telemetry/rte_telemetry_parser_test.c | 534 ++++++ lib/librte_telemetry/rte_telemetry_parser_test.h | 39 + lib/librte_telemetry/rte_telemetry_socket_tests.h | 36 + lib/librte_telemetry/rte_telemetry_version.map | 7 + lib/meson.build | 2 +- mk/rte.app.mk | 1 + usertools/dpdk-telemetry-client.py | 116 ++ 22 files changed, 3447 insertions(+), 2 deletions(-) create mode 100644 doc/guides/howto/telemetry.rst create mode 100644 lib/librte_telemetry/Makefile create mode 100644 lib/librte_telemetry/meson.build create mode 100644 lib/librte_telemetry/rte_telemetry.c create mode 100644 lib/librte_telemetry/rte_telemetry.h create mode 100644 lib/librte_telemetry/rte_telemetry_internal.h create mode 100644 lib/librte_telemetry/rte_telemetry_parser.c create mode 100644 lib/librte_telemetry/rte_telemetry_parser.h create mode 100644 lib/librte_telemetry/rte_telemetry_parser_test.c create mode 100644 lib/librte_telemetry/rte_telemetry_parser_test.h create mode 100644 lib/librte_telemetry/rte_telemetry_socket_tests.h create mode 100644 lib/librte_telemetry/rte_telemetry_version.map create mode 100644 usertools/dpdk-telemetry-client.py -- 2.9.5