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 00:59:43 +0000 (16:59 -0800)
commit551a2f6ca9a90a577bc25cdd913f6df6bd8d9b23
treebf08d0a14c672b15ce396587cb703f4e452f3bff
parent440c5152a47725cfe4b8ae9f6a93868fd7e1ad2e
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