[ovs-dev] [v2] ofp-util: compile group stats with visual studio

Andy Zhou azhou at nicira.com
Thu May 8 22:38:41 UTC 2014


On Mon, May 5, 2014 at 8:18 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Thu, Apr 24, 2014 at 05:34:09PM -0700, Andy Zhou wrote:
>> Visual studio supports zero-size array within a struct or union,
>> but has to be the last element. GCC does not have this restriction.
>>
>> Commits 644cfd84772eb7d8 and 6fdaa45a6f6c9 make use of 0 size array.
>> Remove them so that visual studio can compile them as well.
>>
>> Reported-by: Gurucharan Shetty <gshetty at nicira.com>
>> Signed-off-by: Andy Zhou <azhou at nicira.com>
>
> This use of ofpmp_append() twice could cause a set of group stats to be
> separated from its counters, put into two different stats reply
> messages, which would confuse the recipient:
> +            gs11 = ofpmp_append(replies, sizeof *gs11);
> +            bucket_counters = ofpmp_append(replies, bucket_counter_size);
>
> Either we need to use a single call to ofpmp_append() here, or use
> ordinary ofpbuf operations followed by ofpmp_postappend().

Thanks for pointing this out. I will switch to single call to
ofpmp_append() and send
out v3.



More information about the dev mailing list