From dc39608d2a72805e7cd7be4f28552d0275f87123 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Thu, 15 Jul 2021 21:36:14 +0530 Subject: 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 Acked-by: Flavio Leitner Acked-by: Eelco Chaudron Signed-off-by: Ian Stokes --- lib/dpif-netdev-avx512.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/dpif-netdev-avx512.c') diff --git a/lib/dpif-netdev-avx512.c b/lib/dpif-netdev-avx512.c index 7772b7abf..544d36903 100644 --- a/lib/dpif-netdev-avx512.c +++ b/lib/dpif-netdev-avx512.c @@ -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, -- cgit v1.2.1