[ovs-dev] [PATCH v2 08/21] expr: Give a subfield a direct pointer to its parent in struct expr_symbol.

Ryan Moats rmoats at us.ibm.com
Mon Aug 8 17:07:52 UTC 2016


"dev" <dev-bounces at openvswitch.org> wrote on 08/08/2016 11:14:19 AM:

> From: Ben Pfaff <blp at ovn.org>
> To: dev at openvswitch.org
> Cc: Ben Pfaff <blp at ovn.org>
> Date: 08/08/2016 11:16 AM
> Subject: [ovs-dev] [PATCH v2 08/21] expr: Give a subfield a direct
> pointer to its parent in struct expr_symbol.
> Sent by: "dev" <dev-bounces at openvswitch.org>
>
> Until now, symbols that represent subfields and predicates were both
> implemented as the same string member, named 'expansion', inside struct
> expr.  This makes it a little inconvenient to find the parent of a
subfield
> for two reasons.  First, one must actually parse the string, e.g. to
> convert "vlan.tci[13..15]" into a pointer to a struct.  Second, and more
> importantly, to parse the string it's necessary to have access to the
> symbol table, which isn't always convenient to pass around.  This commit
> avoids the problem by breaking apart subfields and predicates and giving
> the former a direct pointer to the parent symbol.
>
> We could do the same thing for predicates by storing a pointer to a
> pre-built struct expr, but so far it's not necessary.
>
> Signed-off-by: Ben Pfaff <blp at ovn.org>
> ---

Since PS5 and PS6 didn't appear in patchworks and PS7 didn't appear in
my mailbox this can be considered an ack of PS 5, 6, 7, and 8...

Acked-by: Ryan Moats <rmoats at us.ibm.com>



More information about the dev mailing list