summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Chaudron <echaudro@redhat.com>2023-01-05 13:56:59 +0100
committerIlya Maximets <i.maximets@ovn.org>2023-02-15 19:43:58 +0100
commitbb925b0025257081fddaa89da7fa4f4773faba7a (patch)
tree18d3595447850f92ab596f1445c6ee30902ef5ed
parented44eefb8804c085db2b4918c7f99a04146aea98 (diff)
downloadopenvswitch-bb925b0025257081fddaa89da7fa4f4773faba7a.tar.gz
ofproto-dpif-upcall: Use last known stats ukey stats on revalidate missed dp flows.
Instead of using all zero stats when executing a revalidate for missed dp flows, use the last known stats to avoid odd statistics being used. As these zero stats are stored in the ukey, the next time revalidate_ukey() is called the delta between the new stats and the zero stats is used, which would cause an additional increase in total packets/bytes. Signed-off-by: Eelco Chaudron <echaudro@redhat.com> Acked-by: Michael Santana <msantana@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r--ofproto/ofproto-dpif-upcall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index dd5e3bb97..e05ffe312 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -2874,7 +2874,7 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge)
} else {
struct dpif_flow_stats stats;
COVERAGE_INC(revalidate_missed_dp_flow);
- memset(&stats, 0, sizeof stats);
+ memcpy(&stats, &ukey->stats, sizeof stats);
result = revalidate_ukey(udpif, ukey, &stats, &odp_actions,
reval_seq, &recircs, false);
}