From: Ben Pfaff Date: Mon, 16 Sep 2013 18:24:30 +0000 (-0700) Subject: ofproto-dpif: Avoid unnecessarily counting packets. X-Git-Tag: sliver-openvswitch-2.0.90-1~13^2~30 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=15e34f24d61f5b29158999b7dda93de77061dbc4;p=sliver-openvswitch.git ofproto-dpif: Avoid unnecessarily counting packets. Signed-off-by: Ben Pfaff Acked-by: Jarno Rajahalme --- 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) {