On Thu, May 09, 2013 at 02:34:37PM -0700, Jesse Gross wrote:
> On Thu, May 2, 2013 at 2:06 AM, Simon Horman <ho...@verge.net.au> wrote:
> > diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
> > index 068699f..cd8d229 100644
> > --- a/lib/ofp-actions.c
> > +++ b/lib/ofp-actions.c
> > @@ -1141,6 +1141,13 @@ ofpact_check__(const struct ofpact *a, const struct 
> > flow *flow, int max_ports,
> >                 ovs_be16 *dl_type)
> >  {
> >      const struct ofpact_enqueue *enqueue;
> > +    struct flow updated_flow;
> > +
> > +    if (flow->dl_type != *dl_type) {
> > +        updated_flow = *flow;
> > +        updated_flow.dl_type = *dl_type;
> > +        flow = &updated_flow;
> > +    }
> 
> What if we put this check in the loop in ofpact_check()? It seems like
> that would avoid repeatedly copying 'flow'.

Sure, I think that should work.
Sorry for not seeing that earlier.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to