Add has_recirc field to struct xlate_out. It is set to true during actions translation if the resulting actions include a recirc action. It is false otherwise.
This will be used by a subsequent patch that executes recirc actions for packet out in ovs-vswitchd. Signed-off-by: Simon Horman <ho...@verge.net.au> --- ofproto/ofproto-dpif-xlate.c | 3 +++ ofproto/ofproto-dpif-xlate.h | 1 + 2 files changed, 4 insertions(+) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 1233883..536489f 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -1966,6 +1966,7 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port, act_hash->hash_basis = xr->hash_basis; /* Recirc action. */ + ctx->xout->has_recirc = true; nl_msg_put_u32(&ctx->xout->odp_actions, OVS_ACTION_ATTR_RECIRC, xr->recirc_id); } else { @@ -3105,6 +3106,7 @@ xlate_out_copy(struct xlate_out *dst, const struct xlate_out *src) dst->has_learn = src->has_learn; dst->has_normal = src->has_normal; dst->has_fin_timeout = src->has_fin_timeout; + dst->has_recirc = src->has_recirc; dst->nf_output_iface = src->nf_output_iface; dst->mirrors = src->mirrors; @@ -3228,6 +3230,7 @@ xlate_actions__(struct xlate_in *xin, struct xlate_out *xout) ctx.xout->has_learn = false; ctx.xout->has_normal = false; ctx.xout->has_fin_timeout = false; + ctx.xout->has_recirc = false; ctx.xout->nf_output_iface = NF_OUT_DROP; ctx.xout->mirrors = 0; ofpbuf_use_stub(&ctx.xout->odp_actions, ctx.xout->odp_actions_stub, diff --git a/ofproto/ofproto-dpif-xlate.h b/ofproto/ofproto-dpif-xlate.h index 760736a..d1805d3 100644 --- a/ofproto/ofproto-dpif-xlate.h +++ b/ofproto/ofproto-dpif-xlate.h @@ -54,6 +54,7 @@ struct xlate_out { bool has_learn; /* Actions include NXAST_LEARN? */ bool has_normal; /* Actions output to OFPP_NORMAL? */ bool has_fin_timeout; /* Actions include NXAST_FIN_TIMEOUT? */ + bool has_recirc; /* Actions include OVS_ACTION_ATTR_RECIRC */ ofp_port_t nf_output_iface; /* Output interface index for NetFlow. */ mirror_mask_t mirrors; /* Bitmap of associated mirrors. */ -- 1.8.5.2 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev