On 4/2/26 1:03 PM, Eelco Chaudron via dev wrote:
>
>
> On 13 Mar 2026, at 21:51, Timothy Redaelli via dev wrote:
>
>> When --format json is passed to ovs-appctl, pmd-stats-show returns a
>> JSON array with one object per PMD thread (plus an object for the main
>> thread, identified by "type":"main"). Each object contains packet
>> counts, cache hit counters, cycle usage and their derived percentages.
>> All floating-point fields are always present even when the divisor is
>> zero (they are reported as 0.0 in that case).
>>
>> Example output (abbreviated):
>> [{"type":"pmd","numa_id":0,"core_id":3,
>> "packets_received":1000,"emc_hits":500,
>> "megaflow_hits":400,"miss_with_success_upcall":100,
>> "idle_cycles_pct":90.0,"processing_cycles_pct":10.0,...}]
>>
>> Signed-off-by: Timothy Redaelli <[email protected]>
>
>
> Hi Timothy,
>
> For this patch, please index the PMDs by their core_id rather than using
> an array. This is consistent with the approach used in patch 3
> (pmd-sleep-show). Here's the suggested structure:
>
> {
> "pmds": {
"threads", especially since there will be one called "main".
> "3": {
> "numa_id": 0,
> "packets_received": 1000,
> "packet_recirculations": 50,
> "avg_datapath_passes_per_packet": 1.05,
> "phwol_hits": 100,
> "mfex_opt_hits": 200,
> "simple_match_hits": 150,
> "emc_hits": 500,
> "smc_hits": 100,
> "megaflow_hits": 400,
> "avg_subtable_lookups_per_megaflow_hit": 1.2,
> "miss_with_success_upcall": 100,
> "miss_with_failed_upcall": 0,
> "avg_packets_per_output_batch": 32.5,
> "idle_cycles": 900000,
> "idle_cycles_percentage": 90.0,
> "processing_cycles": 100000,
> "processing_cycles_percentage": 10.0,
> "avg_cycles_per_packet": 1000.0,
> "avg_processing_cycles_per_packet": 100.0
> },
> "5": {
> "numa_id": 0,
> ...
> }
> }
> }
>
> You can skip the type variable, and also it would be wise to group related
> counters. Maybe packet, hit, cycle counters, etc.?
+1
I'd say:
"packets": "received", "recicrulated"
"flow-cache-hits": "partial-hardware-offload", "simple", "exact",
"signature", "megaflow"
"optimized-miniflow-extract": /* This one doesn't fit into cache hits,
* as it's not a cache. But it will also
* be removed soon. */
"upcalls": "success", "failure"
"cycles":
"idle": "count", "percentage"
"processing": "count", "percentage"
"averages": "datapath-passes-per-packet", "cycles-per-packet", ...
WDYT?
But also, I don't think we should expand the pmd-stats-show command with
new capabilities. We actually need to re-direct it into pmd-perf-show,
and if we want a JSON output, we should add it to the perf-show one.
Considerations above apply to the perf-show command as they are similar.
Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev