On Tue, Jan 08, 2013 at 04:08:54PM -0800, Gurucharan Shetty wrote:
>      if (wc->masks.in_port) {
> -        ds_put_format(s, "in_port=%"PRIu16",", f->in_port);
> +        if (f->in_port >= OFPP_FIRST_RESV) {
> +            struct ds reserved_port;
> +            ds_init(&reserved_port);
> +            ofputil_format_port(f->in_port, &reserved_port);
> +            ds_put_format(s, "in_port=%s,", ds_cstr(&reserved_port));
> +            ds_destroy(&reserved_port);
> +        } else {
> +            ds_put_format(s, "in_port=%"PRIu16",", f->in_port);
> +        }

Why not just this:
        ds_put_cstr(s, "in_port=");
        ofputil_format_port(f->in_port, s);
        ds_put_char(s, ',');

Thanks,

Ben.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to