The OpenFlow and datapath port numbers for the local port are different.
We were translating them in one direction (in flow_to_match()) but not
in the other (in flow_from_match()).
This fixes a performance problem (we were setting up the wrong flow).
}
flow->nw_src = match->nw_src;
flow->nw_dst = match->nw_dst;
- flow->in_port = ntohs(match->in_port);
+ flow->in_port = (match->in_port == htons(OFPP_LOCAL) ? ODPP_LOCAL
+ : ntohs(match->in_port));
flow->dl_vlan = match->dl_vlan;
flow->dl_type = match->dl_type;
flow->tp_src = match->tp_src;