datapath: Fix tracking of number of flows in hash table.
authorBen Pfaff <blp@nicira.com>
Sat, 10 Jan 2009 00:45:54 +0000 (16:45 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 13 Jan 2009 01:16:56 +0000 (17:16 -0800)
Fixes bug #684.

Thanks to Reid for noticing the problem.

datapath/table-hash.c

index 2951722..0e1692f 100644 (file)
@@ -135,7 +135,7 @@ static int table_hash_delete(struct datapath *dp, struct sw_table *swt,
                        struct sw_flow *flow = *bucket;
                        if (flow && flow_matches_desc(&flow->key, key, strict)
                                        && flow_has_out_port(flow, out_port))
-                               count = do_delete(dp, bucket, flow, NXFER_DELETE);
+                               count += do_delete(dp, bucket, flow, NXFER_DELETE);
                }
        }
        th->n_flows -= count;