rawdev: add telemetry callbacks
authorCiara Power <ciara.power@intel.com>
Thu, 30 Apr 2020 16:01:30 +0000 (17:01 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 10 May 2020 22:37:09 +0000 (00:37 +0200)
commitb1ad0e124536a51dbb1460a7fcb8f701982c1246
tree4e9c3aba1adef1a9c958c3c75c4d92548435cd7c
parentc190daedb9b1486db7834d139859e0b4c063a0b0
rawdev: add telemetry callbacks

The rawdev library now registers commands with telemetry, and
implements the corresponding callback functions. These allow a list of
rawdev devices and xstats for a rawdev port to be queried.

An example usage, with ioat rawdev driver instances, is shown below:

Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2
{"version": "DPDK 20.05.0-rc0", "pid": 65777, "max_output_len": 16384}
--> /
{"/": ["/", "/ethdev/link_status", "/ethdev/list", "/ethdev/xstats", \
    "/help", "/info", "/rawdev/list", "/rawdev/xstats"]}
--> /rawdev/list
{"/rawdev/list": [0, 1, 2, 3, 4, 5]}
--> /rawdev/xstats,0
{"/rawdev/xstats": {"failed_enqueues": 0, "successful_enqueues": 0, \
    "copies_started": 0, "copies_completed": 0}}

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
lib/librte_rawdev/Makefile
lib/librte_rawdev/meson.build
lib/librte_rawdev/rte_rawdev.c