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:
committed by
Ian Stokes
parent
50be6715c0
commit
dc39608d2a
@@ -648,6 +648,7 @@ pmd_info_show_stats(struct ds *reply,
|
||||
" packet recirculations: %"PRIu64"\n"
|
||||
" avg. datapath passes per packet: %.02f\n"
|
||||
" phwol hits: %"PRIu64"\n"
|
||||
" mfex opt hits: %"PRIu64"\n"
|
||||
" emc hits: %"PRIu64"\n"
|
||||
" smc hits: %"PRIu64"\n"
|
||||
" megaflow hits: %"PRIu64"\n"
|
||||
@@ -657,10 +658,9 @@ pmd_info_show_stats(struct ds *reply,
|
||||
" avg. packets per output batch: %.02f\n",
|
||||
total_packets, stats[PMD_STAT_RECIRC],
|
||||
passes_per_pkt, stats[PMD_STAT_PHWOL_HIT],
|
||||
stats[PMD_STAT_EXACT_HIT],
|
||||
stats[PMD_STAT_SMC_HIT],
|
||||
stats[PMD_STAT_MASKED_HIT], lookups_per_hit,
|
||||
stats[PMD_STAT_MISS], stats[PMD_STAT_LOST],
|
||||
stats[PMD_STAT_MFEX_OPT_HIT], stats[PMD_STAT_EXACT_HIT],
|
||||
stats[PMD_STAT_SMC_HIT], stats[PMD_STAT_MASKED_HIT],
|
||||
lookups_per_hit, stats[PMD_STAT_MISS], stats[PMD_STAT_LOST],
|
||||
packets_per_batch);
|
||||
|
||||
if (total_cycles == 0) {
|
||||
@@ -7037,7 +7037,7 @@ dfc_processing(struct dp_netdev_pmd_thread *pmd,
|
||||
bool md_is_valid, odp_port_t port_no)
|
||||
{
|
||||
struct netdev_flow_key *key = &keys[0];
|
||||
size_t n_missed = 0, n_emc_hit = 0, n_phwol_hit = 0;
|
||||
size_t n_missed = 0, n_emc_hit = 0, n_phwol_hit = 0, n_mfex_opt_hit = 0;
|
||||
struct dfc_cache *cache = &pmd->flow_cache;
|
||||
struct dp_packet *packet;
|
||||
const size_t cnt = dp_packet_batch_size(packets_);
|
||||
@@ -7148,6 +7148,8 @@ dfc_processing(struct dp_netdev_pmd_thread *pmd,
|
||||
*n_flows = map_cnt;
|
||||
|
||||
pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_PHWOL_HIT, n_phwol_hit);
|
||||
pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_MFEX_OPT_HIT,
|
||||
n_mfex_opt_hit);
|
||||
pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_EXACT_HIT, n_emc_hit);
|
||||
|
||||
if (!smc_enable_db) {
|
||||
|
Reference in New Issue
Block a user