From: Justin Pettit Date: Fri, 22 Feb 2013 22:07:47 +0000 (-0800) Subject: ofproto-dpif: Look at the flow's ofproto when handling flow misses. X-Git-Tag: sliver-openvswitch-1.10.90-1~11^2~12 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ddbc59545912fd7ec42cd89fdd57fe91d3b8377d;p=sliver-openvswitch.git ofproto-dpif: Look at the flow's ofproto when handling flow misses. When handling flow misses, an attempt is made to group identical packets together. Before the single datapath, each OpenFlow port number was unique, so the flow_equal() function was sufficient to check whether packets are identical. With the single datapath, the OpenFlow port numbers are shared across bridges, so packets that arrive at the same time and are identical other than their ingress port were being serviced by the same ofproto instance. This commit changes the duplicate flow finding function to take the ofproto into account. Bug #14934 Signed-off-by: Justin Pettit Acked-by: Ethan Jackson --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index f54f9ffda..4232594d0 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -3341,12 +3341,13 @@ process_special(struct ofproto_dpif *ofproto, const struct flow *flow, } static struct flow_miss * -flow_miss_find(struct hmap *todo, const struct flow *flow, uint32_t hash) +flow_miss_find(struct hmap *todo, const struct ofproto_dpif *ofproto, + const struct flow *flow, uint32_t hash) { struct flow_miss *miss; HMAP_FOR_EACH_WITH_HASH (miss, hmap_node, hash, todo) { - if (flow_equal(&miss->flow, flow)) { + if (miss->ofproto == ofproto && flow_equal(&miss->flow, flow)) { return miss; } } @@ -3814,7 +3815,7 @@ handle_miss_upcalls(struct dpif_backer *backer, struct dpif_upcall *upcalls, /* Add other packets to a to-do list. */ hash = flow_hash(&miss->flow, 0); - existing_miss = flow_miss_find(&todo, &miss->flow, hash); + existing_miss = flow_miss_find(&todo, ofproto, &miss->flow, hash); if (!existing_miss) { hmap_insert(&todo, &miss->hmap_node, hash); miss->ofproto = ofproto;