[ovs-dev] [PATCH 2/2] nicira-ext: New Nicira vendor action NXAST_NOTE.

Ben Pfaff blp at nicira.com
Mon Nov 15 18:18:36 UTC 2010


On Fri, Nov 12, 2010 at 04:52:24PM -0800, Justin Pettit wrote:
> On Nov 12, 2010, at 4:29 PM, Ben Pfaff wrote:
> 
> > --- a/lib/ofp-parse.c
> > +++ b/lib/ofp-parse.c
> > @@ -277,6 +277,46 @@ str_to_action(char *str, struct ofpbuf *b)
> >   ...
> > +                high = hexit_value(*arg++);
> > +                if (high >= 0) {
> > +                    low = hexit_value(*arg++);
> > +                }
> > +                if (high < 0 || low < 0) {
> > +                    ovs_fatal(0, "bad hex digit in `note' argument");
> > +                }
> > +
> > +                byte = high * 16 + low;
> 
> Looks good.  I was just noticing that there are at least a couple of
> places that do this string to hex converstion now.  Do you think it
> would be worth adding a function to do this in the library utilities?

OK, done.

I pushed this series, and that refinement.




More information about the dev mailing list