2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

dpif/stats: Add miniflow extract opt hits counter

This commit adds a new counter to be displayed to the user when
requesting datapath packet statistics. It counts the number of
packets that are parsed and a miniflow built up from it by the
optimized miniflow extract parsers.

The ovs-appctl command "dpif-netdev/pmd-perf-show" now has an
extra entry indicating if the optimized MFEX was hit:

  - MFEX Opt hits:        6786432  (100.0 %)

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
Harry van Haaren
2021-07-15 21:36:14 +05:30
committed by Ian Stokes
parent 50be6715c0
commit dc39608d2a
6 changed files with 22 additions and 7 deletions

View File

@@ -310,8 +310,11 @@ dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread *pmd,
}
/* At this point we don't return error anymore, so commit stats here. */
uint32_t mfex_hit_cnt = __builtin_popcountll(mf_mask);
pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_RECV, batch_size);
pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_PHWOL_HIT, phwol_hits);
pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_MFEX_OPT_HIT,
mfex_hit_cnt);
pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_EXACT_HIT, emc_hits);
pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_SMC_HIT, smc_hits);
pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_MASKED_HIT,