[ovs-dev] [generic tci mask 2/8] ofp-print: Avoid converting flow to ofp_match just to format it.

Justin Pettit jpettit at nicira.com
Fri Nov 19 22:32:58 UTC 2010


Looks good.

--Justin


On Nov 10, 2010, at 3:37 PM, Ben Pfaff wrote:

> These days we have a function to format a struct flow directly, so we might
> as well use it.
> ---
> lib/ofp-print.c |    5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/ofp-print.c b/lib/ofp-print.c
> index bc77756..c48c5fd 100644
> --- a/lib/ofp-print.c
> +++ b/lib/ofp-print.c
> @@ -132,12 +132,11 @@ ofp_packet_in(struct ds *string, const void *oh, size_t len, int verbosity)
>     if (verbosity > 0) {
>         struct flow flow;
>         struct ofpbuf packet;
> -        struct ofp_match match;
> +
>         packet.data = (void *) op->data;
>         packet.size = data_len;
>         flow_extract(&packet, 0, ntohs(op->in_port), &flow);
> -        flow_to_match(&flow, 0, false, &match);
> -        ofp_print_match(string, &match, verbosity);
> +        flow_format(string, &flow);
>         ds_put_char(string, '\n');
>     }
>     if (verbosity > 1) {
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list