examples/l3fwd-power: use new telemetry
authorCiara Power <ciara.power@intel.com>
Thu, 30 Apr 2020 16:01:31 +0000 (17:01 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 10 May 2020 22:37:15 +0000 (00:37 +0200)
commita35919a1139b2e2351216e1a42a5e35f9e27b06c
tree4abd9c1ec0c1d2b401553cc6fa14939121771f3f
parentb1ad0e124536a51dbb1460a7fcb8f701982c1246
examples/l3fwd-power: use new telemetry

The l3fwd-power example app now registers a stats command with
telemetry, and provides a callback function to handle formatting the
power stats.

An example usage is shown below:

Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2
{"version": "DPDK 20.05.0-rc0", "pid": 63384, "max_output_len": 16384}
--> /
{"/": ["/", "/ethdev/link_status", "/ethdev/list", "/ethdev/xstats", \
    "/help", "/info", "/l3fwd-power/stats", "/rawdev/list", \
    "/rawdev/xstats"]}
--> /l3fwd-power/stats
{"/l3fwd-power/stats": {"empty_poll": 281625000, "full_poll": 0, \
    "busy_percent": 0}}

The existing stats tracking done by the app using the metrics
library is unaffected. This will still be used to ensure backward
compatibility.

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>
examples/l3fwd-power/Makefile
examples/l3fwd-power/main.c
examples/l3fwd-power/meson.build