ofproto-dpif: Update 'facet->rule' stats in facet_push_stats().
authorEthan Jackson <ethan@nicira.com>
Thu, 2 May 2013 22:39:06 +0000 (15:39 -0700)
committerEthan Jackson <ethan@nicira.com>
Thu, 9 May 2013 19:44:47 +0000 (12:44 -0700)
commiteafed69b66fa5b7b69035fe5aa2ae2102d66d6f6
tree46be6bab3da5e5ee31b9dd0ba78793da204dfc0a
parent0f49659a40f6e19cf908b9a3f571cf738bba2881
ofproto-dpif: Update 'facet->rule' stats in facet_push_stats().

Before this patch, stats for 'facet->rule' were handled differently
than stats which 'facet' resubmitted into.  The former were
maintained in 'facet' until it was destroyed, while the latter were
pushed regularly in facet_push_stats().

This inconsistent behavior was not only confusing, it was often
incorrect.  In some circumstances, if a facet changed rules, it
could carry the statistics from the entirety of its lifetime from
the old rule to the new one.  This patch remedies the issue by
handling all rule stats in facet_push_stats().

Reported-by: Tmusic <Tmusic987@gmail.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto-dpif.c