On 1/5/23 08:56, Eelco Chaudron wrote:
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.
Okay, this makes a lot more sense. If we set it to 0 then it would be as
if all the stats were suddenly dropped to 0 which is not the case. Using
the the last known value makes more sense.
In addition if the 'ofproto-dpif-upcall: Don't set statistics to 0 when
they jump back' patch get's applied, the packet count will become
even more exotic, as 0 - 'a few packets' results in a huge value
for stats to be pushed.
Signed-off-by: Eelco Chaudron <[email protected]>
Acked-by: Michael Santana <[email protected]>
---
ofproto/ofproto-dpif-upcall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index be3c894b4..886ba54b8 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -2879,7 +2879,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);
}
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev