2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-05 00:35:33 +00:00

ofproto: Datapath statistics accounted twice.

Due to an error introduced in  Commit 6f1435f "ofproto: Resubmit
statistics improperly account during failover." Flow statistics
could be double accounted when removed from the datapath.

Reported-by: KK Yap <yapkke@stanford.edu>
This commit is contained in:
Ethan Jackson
2011-05-18 11:52:08 -07:00
parent 76abe283ba
commit 827ab71c97

View File

@@ -1744,8 +1744,8 @@ facet_is_controller_flow(struct facet *facet)
static void
facet_reset_dp_stats(struct facet *facet, struct dpif_flow_stats *stats)
{
if (stats && facet->dp_packet_count < stats->n_packets
&& facet->dp_byte_count < stats->n_bytes) {
if (stats && facet->dp_packet_count <= stats->n_packets
&& facet->dp_byte_count <= stats->n_bytes) {
stats->n_packets -= facet->dp_packet_count;
stats->n_bytes -= facet->dp_byte_count;
}