This seems fine to me. I think the commit message could use more explanation of why this patch was written. Is it simply to clean up the code, or is there some other reason which is non-obvious to me?
Ethan On Tue, Sep 27, 2011 at 16:27, Ben Pfaff <[email protected]> wrote: > --- > ofproto/ofproto-dpif.c | 26 +++++++++++++------------- > 1 files changed, 13 insertions(+), 13 deletions(-) > > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c > index 8f3e900..5136631 100644 > --- a/ofproto/ofproto-dpif.c > +++ b/ofproto/ofproto-dpif.c > @@ -1767,12 +1767,6 @@ handle_miss_upcall(struct ofproto_dpif *ofproto, > struct dpif_upcall *upcall) > return; > } > > - /* Check with in-band control to see if this packet should be sent > - * to the local port regardless of the flow table. */ > - if (connmgr_msg_in_hook(ofproto->up.connmgr, &flow, upcall->packet)) { > - send_packet(ofproto, OVSP_LOCAL, upcall->packet); > - } > - > facet = facet_lookup_valid(ofproto, &flow); > if (!facet) { > struct rule_dpif *rule = rule_dpif_lookup(ofproto, &flow, 0); > @@ -3504,6 +3498,7 @@ xlate_actions(struct action_xlate_ctx *ctx, > COVERAGE_INC(ofproto_dpif_xlate); > > ctx->odp_actions = ofpbuf_new(512); > + ofpbuf_reserve(ctx->odp_actions, NL_A_U32_SIZE); > ctx->tags = 0; > ctx->may_set_up_flow = true; > ctx->has_learn = false; > @@ -3518,16 +3513,21 @@ xlate_actions(struct action_xlate_ctx *ctx, > > if (process_special(ctx->ofproto, &ctx->flow, ctx->packet)) { > ctx->may_set_up_flow = false; > + return ctx->odp_actions; > } else { > do_xlate_actions(in, n_in, ctx); > - } > > - /* Check with in-band control to see if we're allowed to set up this > - * flow. */ > - if (!connmgr_may_set_up_flow(ctx->ofproto->up.connmgr, &ctx->flow, > - ctx->odp_actions->data, > - ctx->odp_actions->size)) { > - ctx->may_set_up_flow = false; > + if (!connmgr_may_set_up_flow(ctx->ofproto->up.connmgr, &ctx->flow, > + ctx->odp_actions->data, > + ctx->odp_actions->size)) { > + ctx->may_set_up_flow = false; > + if (ctx->packet > + && connmgr_msg_in_hook(ctx->ofproto->up.connmgr, &ctx->flow, > + ctx->packet)) { > + nl_msg_push_u32(ctx->odp_actions, OVS_ACTION_ATTR_OUTPUT, > + OVSP_LOCAL); > + } > + } > } > > return ctx->odp_actions; > -- > 1.7.4.4 > > _______________________________________________ > dev mailing list > [email protected] > http://openvswitch.org/mailman/listinfo/dev > _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
