This series extends five ovs-appctl commands with structured JSON output
via the --format json option: fdb/stats-show, upcall/show,
dpif-netdev/pmd-sleep-show, dpif-netdev/pmd-stats-show, and dpctl/show.

Changes since v1:
  - All patches: split the main handler into separate text and JSON
    helper functions as suggested by Eelco Chaudron.
  - All patches: use dashes (not underscores) in JSON field names, and
    full words instead of abbreviations, as suggested by Eelco Chaudron
    and Ilya Maximets.
  - All patches: validate the complete pretty-printed JSON output in
    tests rather than grepping for individual fields, as suggested by
    Eelco Chaudron.
  - Patch 1 (fdb/stats-show): use bridge name as the top-level key;
    group statistics into "entries" and "events" sub-objects, as
    suggested by Eelco Chaudron and Ilya Maximets.
  - Patch 2 (upcall/show): use datapath name as the top-level key;
    group flow counters under "flows"; index revalidators by ID as an
    object, as suggested by Eelco Chaudron.
  - Patch 3 (pmd-sleep-show): use "threads" as the container key and
    thread names (pmd-cXX) as keys, matching the names visible in
    system tools like "top", as suggested by Ilya Maximets and
    Eelco Chaudron.  Drop the "_id" suffix from field names as
    suggested by Ilya Maximets.
  - Patch 4 (pmd-stats-show): use thread names as keys (matching
    patch 3); group average metrics under an "averages" sub-object,
    as suggested by Ilya Maximets.
  - Patch 5 (dpctl/show): use datapath name as the top-level key and
    port name as port key; use "port-number" field name as suggested
    by Eelco Chaudron and Ilya Maximets.  Make masks, cache, and
    statistics independent fields (null when unavailable) for a
    consistent schema regardless of command-line flags, as suggested
    by Eelco Chaudron.

Regarding pmd-perf-show (raised by Ilya Maximets): pmd-stats-show is
kept as the lightweight, scripting-friendly command for basic PMD
statistics.  JSON support for pmd-perf-show, with its histograms,
iteration history, and multiple output modes, is planned as a separate
follow-up series.

Timothy Redaelli (5):
  ofproto-dpif: Add JSON output to fdb/stats-show.
  ofproto-dpif-upcall: Add JSON output to upcall/show.
  dpif-netdev: Add JSON output to pmd-sleep-show.
  dpif-netdev: Add JSON output to pmd-stats-show.
  dpctl: Add JSON output to dpctl/show.

 NEWS                          |   4 +
 lib/dpctl.c                   | 203 +++++++++++++++++++++++++++++++++-
 lib/dpctl.h                   |  11 ++
 lib/dpif-netdev.c             | 173 ++++++++++++++++++++++++++++-
 ofproto/ofproto-dpif-upcall.c |  94 +++++++++++++---
 ofproto/ofproto-dpif.c        |  87 +++++++++++----
 tests/dpctl.at                |  17 +++
 tests/ofproto-dpif.at         |  44 ++++++++
 tests/pmd.at                  |  92 +++++++++++++++
 9 files changed, 684 insertions(+), 41 deletions(-)

-- 
2.53.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to