[ovs-dev] [PATCH 1/3] ofp-parse: Separate fields properly.

Jesse Gross jesse at nicira.com
Wed Sep 9 16:50:04 UTC 2015


On Tue, Sep 8, 2015 at 1:48 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Mon, Aug 31, 2015 at 07:57:04PM -0700, Jesse Gross wrote:
>> Currently, each token in an OpenFlow match field is treated separately -
>> whether this is a name, a value, or a single identifier. However, this
>> means that attempting to get a value may result in grabbing the next
>> token if no value exists. This avoids that problem by breaking the match
>> string down into its components and then individually separating it into
>> name/value pairs if appropriate.
>>
>> Signed-off-by: Jesse Gross <jesse at nicira.com>
>
> Did you consider using ofputil_parse_key_value()?  It is, apparently,
> tailor-made for this, but I guess some of the details might make it
> incompatible with the legacy format that parse_ofp_str__() deals with.

It's a good idea - it ends up being almost a drop in replacement for
the current code. I made that change, which also makes this patch much
smaller.



More information about the dev mailing list