#include <stdlib.h>
#include "flow.h"
#include "list.h"
+#include "openflow.h"
#include "switch-flow.h"
#include "datapath.h"
if (f->priority == flow->priority
&& f->key.wildcards == flow->key.wildcards
&& flow_matches_2wild(&f->key, &flow->key)) {
+ /* Keep stats from the original flow */
+ flow->used = f->used;
+ flow->created = f->created;
+ flow->packet_count = f->packet_count;
+ flow->byte_count = f->byte_count;
+
flow->serial = f->serial;
list_replace(&flow->node, &f->node);
list_replace(&flow->iter_node, &f->iter_node);
{
struct sw_table_linear *tl = (struct sw_table_linear *) swt;
stats->name = "linear";
- stats->n_flows = tl->n_flows;
+ stats->wildcards = OFPFW_ALL;
+ stats->n_flows = tl->n_flows;
stats->max_flows = tl->max_flows;
stats->n_matched = swt->n_matched;
}