On Wed, Jul 27, 2016 at 04:23:07AM +0000, Ryan Moats wrote:
> [1] indicates that with incremental processing of logical flows
> desired conntrack groups are not being persisted.  This patch
> adds this capability, with the side effect of adding a ds_copy
> method that this capability leverages.
> 
> [1] http://openvswitch.org/pipermail/dev/2016-July/076320.html

Thanks for the fix!  Would you mind transforming the above to use
Reported-at, Reported-by, and Fixes?

> Signed-off-by: Ryan Moats <rmo...@us.ibm.com>

> +void
> +ds_copy(struct ds *dst, struct ds *source)
> +{
> +    dst->length = source->length;
> +    dst->allocated = source->allocated;
> +    dst->string = xmemdup(source->string, source->allocated + 1);
> +}

In the case where allocate is much bigger than length, the above is
pretty wasteful.  Would you mind doing separate xmalloc() and memcpy()
steps?

We tend to use the term "clone" for operations that initialize and copy
in one step; "copy" tend to imply copying into an already-initialized
destination.  So I would be more likely to call this ds_clone().

The actions_parse() function has a pretty clear explanatory comment, but
it doesn't hint at what the new uuid parameter means.  Also, should the
new parameter be part of action_params?  It's where most of the
parameters related to parsing go.

Thanks,

Ben.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to