This series adds --format=json support to five ovs-appctl commands
commonly used for monitoring Open vSwitch state:
- fdb/stats-show: flat JSON object with the bridge name and all
MAC learning table counters.
- upcall/show: array of udpif objects including flow counts, dump
duration and per-revalidator key counts.
- dpif-netdev/pmd-sleep-show: object with the default max sleep
and a per-PMD-thread array (DPDK only).
- dpif-netdev/pmd-stats-show: array of per-PMD-thread objects
with packet counts, cache hits and cycle statistics (DPDK only).
- dpctl/show: array of datapath objects with lookup statistics,
flow and mask counts, cache statistics and per-port statistics.
All five commands follow the mechanism introduced in commit 939a5cea5
("Add global option for JSON output to ovs-appctl"). When --format=json
is not requested, the existing text output is unchanged.
Each patch includes an autotest case exercising the JSON output path.
Reported-at: https://issues.redhat.com/browse/FDP-2444
Signed-off-by: Timothy Redaelli <[email protected]>
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.
lib/dpctl.c | 252 +++++++++++++++++++++++++++++++++-
lib/dpctl.h | 10 ++
lib/dpif-netdev.c | 147 ++++++++++++++++++--
ofproto/ofproto-dpif-upcall.c | 123 ++++++++++++-----
ofproto/ofproto-dpif.c | 52 +++++--
tests/dpctl.at | 4 +
tests/ofproto-dpif.at | 14 ++
tests/pmd.at | 16 +++
8 files changed, 558 insertions(+), 60 deletions(-)
--
2.53.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev