On 25 Sep 2026, at 12:16, Timothy Redaelli wrote:

> When --format json is passed to ovs-appctl, dpctl/show returns a JSON
> object keyed by datapath name.  Each entry contains "flows", "lookups"
> (hit/lost/missed), and "ports" (keyed by port name, each with
> "port-number" and "type").  The optional sections "masks" and "cache"
> are only reported when the datapath supports them, and so are the port
> "config" and "statistics" sub-objects.  "cache" contains "statistics"
> (hits and hit rate) and "config", an array with the name and the size
> of every cache level.
>
> The output_format field is added to struct dpctl_params so the handler
> can select the appropriate callback (show_dpif or show_dpif_json).
> The JSON accumulator is stored in dpctl_params.json, and the reply
> is sent by dpctl_unixctl_handler based on whether json is set.  On
> error, the JSON object is discarded and a text error reply is sent.
>
> Since the JSON error path reuses the text error string, a failure of
> dps_for_each() to enumerate the datapaths is now reported instead of
> replying with an empty message.
>
> Example output:
>   {"ovs-system": {"flows": 0,
>                   "lookups": {"hit": 0, "lost": 0, "missed": 0},
>                   "ports": {"br0": {"port-number": 0,
>                                     "type": "internal"}}}}
>
> Signed-off-by: Timothy Redaelli <[email protected]>

Thanks for the rework Timothy. The Changes look good to me.

Acked-by: Eelco Chaudron <[email protected]>

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

Reply via email to