On May 30, 2013, at 0:24 , ext Ethan Jackson wrote: > +/* Context used by xlate_actions() and its callees. */ > +struct xlate_ctx { > + struct xlate_in *xin; > + struct xlate_out *xout; > > - struct ofpbuf *odp_actions; /* Datapath actions. */ > - tag_type tags; /* Tags associated with actions. */ > - enum slow_path_reason slow; /* 0 if fast path may be used. */ > - bool has_learn; /* Actions include NXAST_LEARN? */ > - bool has_normal; /* Actions output to OFPP_NORMAL? */ > - bool has_fin_timeout; /* Actions include NXAST_FIN_TIMEOUT? */ > - uint16_t nf_output_iface; /* Output interface index for NetFlow. */ > - mirror_mask_t mirrors; /* Bitmap of associated mirrors. */ > + struct ofproto_dpif *ofproto; > + > + /* Flow at the last commit. */ > + struct flow base_flow; > + > + /* Tunnel IP destination address as received. This is stored separately > + * as the base_flow.tunnel is cleared on init to reflect the datapath > + * behavior. Used to make sure not to send tunneled output to ourselves, > + * which might lead to an infinite loop. This could happen easily > + * if a tunnel is marked as 'ip_remote=flow', and the flow does not > + * actually set the tun_dst field. */ > + ovs_be32 orig_tunnel_ip_dst;
orig_tunnel_ip_dst is not used in 1.11 yet, so it should be deleted from this patch. There is only one use of it later in the patch, which should also be removed. ... > > - > -/* Translates the 'ofpacts_len' bytes of "struct ofpacts" starting at > 'ofpacts' > - * into datapath actions in 'odp_actions', using 'ctx'. */ > -static void > -xlate_actions(struct xlate_ctx *ctx, > - const struct ofpact *ofpacts, size_t ofpacts_len, > - struct ofpbuf *odp_actions) > -{ > - /* Normally false. Set to true if we ever hit MAX_RESUBMIT_RECURSION, so > - * that in the future we always keep a copy of the original flow for > - * tracing purposes. */ > - static bool hit_resubmit_limit; > - > - enum slow_path_reason special; > - struct ofport_dpif *in_port; > - struct flow orig_flow; > + ctx.xin = xin; > + ctx.xout = xout; > + > + ctx.ofproto = xin->ofproto; > + ctx.rule = xin->rule; > + > + ctx.base_flow = ctx.xin->flow; > + memset(&ctx.base_flow.tunnel, 0, sizeof ctx.base_flow.tunnel); > + ctx.base_flow.vlan_tci = xin->initial_vals.vlan_tci; > + ctx.base_flow.tunnel.ip_tos = xin->initial_vals.tunnel_ip_tos; > + ctx.orig_tunnel_ip_dst = ctx.xin->flow.tunnel.ip_dst; > + Here. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev