diff options
author | Cian Ferriter <cian.ferriter@intel.com> | 2021-07-09 15:58:20 +0000 |
---|---|---|
committer | Ian Stokes <ian.stokes@intel.com> | 2021-07-09 17:13:55 +0100 |
commit | d76a719a7aa0e040e943dfbc75e482fbb6350475 (patch) | |
tree | 3cdd7bdc3452fe9e0beeb15bd0629a7ad8bbf164 /lib/dpif-netdev-avx512.c | |
parent | 3f86fdf5ce951cfaf0588b4620e3054f4b5b7136 (diff) | |
download | openvswitch-d76a719a7aa0e040e943dfbc75e482fbb6350475.tar.gz |
dpif-netdev: Add a partial HWOL PMD statistic.
It is possible for packets traversing the userspace datapath to match a
flow before hitting on EMC by using a mark ID provided by a NIC. Add a
PMD statistic for this hit.
Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Diffstat (limited to 'lib/dpif-netdev-avx512.c')
-rw-r--r-- | lib/dpif-netdev-avx512.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/dpif-netdev-avx512.c b/lib/dpif-netdev-avx512.c index 1ae66ca6c..6f9aa8284 100644 --- a/lib/dpif-netdev-avx512.c +++ b/lib/dpif-netdev-avx512.c @@ -127,6 +127,7 @@ dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread *pmd, uint32_t emc_hits = 0; uint32_t smc_hits = 0; + uint32_t phwol_hits = 0; /* A 1 bit in this mask indicates a hit, so no DPCLS lookup on the pkt. */ uint32_t hwol_emc_smc_hitmask = 0; @@ -178,6 +179,7 @@ dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread *pmd, rules[i] = &f->cr; pkt_meta[i].tcp_flags = parse_tcp_flags(packet); pkt_meta[i].bytes = dp_packet_size(packet); + phwol_hits++; hwol_emc_smc_hitmask |= (1 << i); continue; } @@ -286,6 +288,7 @@ dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread *pmd, /* At this point we don't return error anymore, so commit stats here. */ 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_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, |