ofproto-dpif: Keep subfacets longer to avoid assert-fail in facet_account().
authorBen Pfaff <blp@nicira.com>
Fri, 6 Jan 2012 23:03:07 +0000 (15:03 -0800)
committerBen Pfaff <blp@nicira.com>
Sat, 7 Jan 2012 01:02:13 +0000 (17:02 -0800)
commitb87dd2dcf4a2af434d1b92f6efcb32f54fee03b2
treea4a3cd23208761e64738a6a35de72faead2f9e78
parent2716b6379dc86331330d78b496985e908320ddfa
ofproto-dpif: Keep subfacets longer to avoid assert-fail in facet_account().

If a subfacet expired when its facet still had statistics that had not
yet been pushed into the rule, and the facet either used the "normal"
action or the bridge contained a bond port, then facet_account() would
be called after the last subfacet was removed from its facet's list of
subfacets, triggering an assertion failure in list_front().

This fixes the problem by always running facet_flush_stats() (which calls
facet_account()) before deleting the last subfacet from a facet.

This problem took a while to surface because subfacets usually expire only
long after their statistics have been pushed into the rule.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Reported-by: Mike Kruze <mkruze@nicira.com>
Bug #9074.
AUTHORS
ofproto/ofproto-dpif.c