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>
Sat, 10 Jan 2009 00:45:54 +0000 (16:45 -0800)
Fixes bug #684.

Thanks to Reid for noticing the problem.

datapath/table-hash.c

index a501c3caa26ede48dd6f333aae2e9036e1fad2f3..9e27b0c4910425a8a473e98bbe65124f4edf83d8 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;