[ovs-dev] [PATCH] Add Nicira vendor extension actions NXAST_STACK_PUSH/POP

Andy Zhou azhou at nicira.com
Sat Mar 2 00:48:34 UTC 2013


Thanks for the comments.  I will post the reworked patch based on the
feedbacks to this thread soon.


On Wed, Feb 27, 2013 at 8:44 PM, Ben Pfaff <blp at nicira.com> wrote:

> On Wed, Feb 27, 2013 at 05:12:16PM -0800, Ethan Jackson wrote:
> > +static union mf_value*
> > > +nx_stack_pop(struct ofpbuf* stack)
> > > +{
> > > +    union mf_value* v =  NULL;
> > > +    if (stack->size) {
> > > +        stack -> size -= sizeof *v;
> > > +        v = (union mf_value*)((char*)stack->data + stack->size);
> > > +    }
> > > +
> > > +    return v;
> > > +}
> > > +
> > >
> >
> > Any reason we can't just use ofpbuf_try_pull() instead?
>
> I think that would make it a queue instead of a stack.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130301/6580baaa/attachment-0003.html>


More information about the dev mailing list