Skip to content

Commit

Permalink
upcall: Remove redundant xlate_actions_for_side_effects().
Browse files Browse the repository at this point in the history
As a result of commit a0bab87 (ofproto: Remove per-flow miss hash
table from upcall handler.) we're guaranteed that every packet has had
xlate_actions() called on it at least once.  Therefore, there's no
need to re-xlate slow path flows just to shove their packets through
the system.

This also may fix a bug discussed here:
http://openvswitch.org/pipermail/discuss/2014-April/013670.html

Signed-off-by: Ethan Jackson <[email protected]>
Reported-by: Murphy McCauley <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
ejj committed May 23, 2014
1 parent 3b3f885 commit 691d39b
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions ofproto/ofproto-dpif-upcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,8 @@ upcall_init(struct upcall *upcall, struct flow *flow, struct ofpbuf *packet,
struct ofproto_dpif *ofproto, struct dpif_upcall *dupcall,
odp_port_t odp_in_port)
{
struct xlate_in xin;
struct pkt_metadata md = pkt_metadata_from_flow(flow);
struct xlate_in xin;

flow_extract(packet, &md, &upcall->flow);

Expand All @@ -708,8 +708,7 @@ upcall_init(struct upcall *upcall, struct flow *flow, struct ofpbuf *packet,
upcall->odp_in_port = odp_in_port;

xlate_in_init(&xin, upcall->ofproto, &upcall->flow, NULL,
upcall->stats.tcp_flags, NULL);
xin.may_learn = true;
upcall->stats.tcp_flags, packet);

if (upcall->upcall_type == DPIF_UC_MISS) {
xin.resubmit_stats = &upcall->stats;
Expand Down Expand Up @@ -867,13 +866,6 @@ handle_upcalls(struct handler *handler, struct upcall *upcalls,

fail_open = fail_open || upcall->xout.fail_open;

if (upcall->xout.slow) {
struct xlate_in xin;

xlate_in_init(&xin, upcall->ofproto, &upcall->flow, NULL, 0, packet);
xlate_actions_for_side_effects(&xin);
}

if (upcall->flow.in_port.ofp_port
!= vsp_realdev_to_vlandev(upcall->ofproto,
upcall->flow.in_port.ofp_port,
Expand Down

0 comments on commit 691d39b

Please sign in to comment.