ofproto-dpif: Zero-out subfacet counters when installation fails.
authorJustin Pettit <jpettit@nicira.com>
Fri, 12 Jul 2013 23:56:55 +0000 (16:56 -0700)
committerJustin Pettit <jpettit@nicira.com>
Sat, 13 Jul 2013 01:50:20 +0000 (18:50 -0700)
commitc25d8d6d19384c6a3ea9b975fb6f595194459a7b
treea84e7da9d3203cc653e54222e7dc7507c267c38c
parenta51f34d93fd870eaf541762e6fe9d72fa6fb2335
ofproto-dpif: Zero-out subfacet counters when installation fails.

When deleting subfacets, subfacet_uninstall() asserts that the
subfacet's counters are zero to make sure we don't lose counters.  We
have seen cases where a subfacet cannot be installed, but the counters
have values.  This should not happen and indicates a bug, since we
shouldn't create a subfacet if the datapath has a flow.  A buggy
datapath could trigger this, so just zero out the counters and log an
error.

Bug #18460.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
ofproto/ofproto-dpif.c