On Mon, Jul 18, 2011 at 02:35:06PM -0700, Ethan Jackson wrote:
> Sounds good to me, here is another version.

Thanks, just one comment left:

> +/* Returns a string representation of 'fields'. */
> +const char *
> +flow_hash_fields_to_str(enum nx_hash_fields fields)
> +{
> +    static char *symmetric_l4 = "symmetric_l4";
> +    static char *eth_src = "eth_src";
> +    static char *unknown = "<unknown>";
> +
> +    switch (fields) {
> +    case NX_HASH_FIELDS_ETH_SRC: return eth_src;
> +    case NX_HASH_FIELDS_SYMMETRIC_L4: return symmetric_l4;
> +    default: return unknown;
> +    }
> +}

What's the benefit of separate declarations for the strings?  Why not
just write, e.g. return "symmetric_l4"?

Thanks,

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

Reply via email to