> On Jul 3, 2015, at 8:36 AM, Sorin Vinturis <svintu...@cloudbasesolutions.com> 
> wrote:
> 
> 
> +__inline BOOLEAN OvsBufferIsEmpty(char *buf, size_t size)
> +{
> +    return (buf[0] == 0 && !memcmp(buf, buf + 1, size - 1));
> +}
> +

The reason 'instance->dumpState.ovsMsg’ was a pointer and not a structure 
originally was to save on this check essentially. OVS_IOCTL_READ() are very 
common esp. while dumping and we want to save cycles.

Unless, there’s a gain in converting 'instance->dumpState.ovsMsg’ to a 
structure from a pointer, I’m inclined to keep the code as-is.

thanks,
-- Nithin
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to