X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fofproto-dpif-xlate.c;h=c5e6600933685c3b6bdb851c598a337bb7f63787;hb=1e827902be9194d71ea851c9ce2676f65eeed33a;hp=0eadf46dde4265470990d7b51cbd37f090738e80;hpb=47ae2f6c8b2b055375ec56bc2094b58b81655225;p=sliver-openvswitch.git diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 0eadf46dd..c5e660093 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -581,7 +581,7 @@ xlate_receive(const struct dpif_backer *backer, struct ofpbuf *packet, * an OpenFlow controller properly, so that it looks correct * for sFlow, and so that flow_extract() will get the correct * vlan_tci if it is called on 'packet'. */ - eth_push_vlan(packet, flow->vlan_tci); + eth_push_vlan(packet, htons(ETH_TYPE_VLAN), flow->vlan_tci); } /* We can't reproduce 'key' from 'flow'. */ fitness = fitness == ODP_FIT_PERFECT ? ODP_FIT_TOO_MUCH : fitness; @@ -2999,6 +2999,7 @@ actions_output_to_local_port(const struct xlate_ctx *ctx) /* Thread safe call to xlate_actions__(). */ void xlate_actions(struct xlate_in *xin, struct xlate_out *xout) + OVS_EXCLUDED(xlate_rwlock) { ovs_rwlock_rdlock(&xlate_rwlock); xlate_actions__(xin, xout); @@ -3255,7 +3256,6 @@ xlate_send_packet(const struct ofport_dpif *ofport, struct ofpbuf *packet) struct ofpact_output output; struct flow flow; union flow_in_port in_port_; - int error; ofpact_init(&output.ofpact, OFPACT_OUTPUT, sizeof output); /* Use OFPP_NONE as the in_port to avoid special packet processing. */ @@ -3270,9 +3270,9 @@ xlate_send_packet(const struct ofport_dpif *ofport, struct ofpbuf *packet) } output.port = xport->ofp_port; output.max_len = 0; - error = ofproto_dpif_execute_actions(xport->xbridge->ofproto, &flow, NULL, - &output.ofpact, sizeof output, - packet); ovs_rwlock_unlock(&xlate_rwlock); - return error; + + return ofproto_dpif_execute_actions(xport->xbridge->ofproto, &flow, NULL, + &output.ofpact, sizeof output, + packet); }