From 15e34f24d61f5b29158999b7dda93de77061dbc4 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 16 Sep 2013 11:24:30 -0700 Subject: [PATCH] ofproto-dpif: Avoid unnecessarily counting packets. Signed-off-by: Ben Pfaff Acked-by: Jarno Rajahalme --- ofproto/ofproto-dpif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 01299e15e..80874b87f 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -3241,7 +3241,7 @@ flow_miss_should_make_facet(struct flow_miss *miss) hash = flow_hash_in_wildcards(&miss->flow, &miss->xout.wc, 0); return governor_should_install_flow(backer->governor, hash, - list_size(&miss->upcalls)); + miss->stats.n_packets); } /* Handles 'miss', which matches 'facet'. May add any required datapath @@ -3319,7 +3319,7 @@ handle_flow_miss(struct flow_miss *miss, struct flow_miss_op *ops, { struct facet *facet; - miss->ofproto->n_missed += list_size(&miss->upcalls); + miss->ofproto->n_missed += miss->stats.n_packets; facet = facet_lookup_valid(miss->ofproto, &miss->flow); if (!facet) { -- 2.47.0