} else {
struct sw_flow *old_flow = *bucket;
if (!flow_compare(&old_flow->key.flow, &flow->key.flow)) {
+ /* Keep stats from the original flow */
+ flow->used = old_flow->used;
+ flow->created = old_flow->created;
+ flow->packet_count = old_flow->packet_count;
+ flow->byte_count = old_flow->byte_count;
+
*bucket = flow;
flow_free(old_flow);
retval = 1;
{
struct sw_table_hash *th = (struct sw_table_hash *) swt;
stats->name = "hash";
- stats->n_flows = th->n_flows;
+ stats->wildcards = 0; /* No wildcards are supported. */
+ stats->n_flows = th->n_flows;
stats->max_flows = th->bucket_mask + 1;
stats->n_matched = swt->n_matched;
}
for (i = 0; i < 2; i++)
table_hash_stats(t2->subtable[i], &substats[i]);
stats->name = "hash2";
- stats->n_flows = substats[0].n_flows + substats[1].n_flows;
+ stats->wildcards = 0; /* No wildcards are supported. */
+ stats->n_flows = substats[0].n_flows + substats[1].n_flows;
stats->max_flows = substats[0].max_flows + substats[1].max_flows;
stats->n_matched = swt->n_matched;
}