From: Stephen Hemminger <[email protected]>
Date: Fri, 18 Nov 2011 17:09:17 -0800 (PST)

> 
>> On Fri, Nov 18, 2011 at 3:23 PM, Stephen Hemminger
>> <[email protected]> wrote:
>> > On Fri, 18 Nov 2011 15:12:18 -0800
>> > Jesse Gross <[email protected]> wrote:
>> >
>> >> +             write_seqcount_begin(&stats->seqlock);
>> >> +             stats->tx_packets++;
>> >> +             stats->tx_bytes += sent;
>> >> +             write_seqcount_end(&stats->seqlock);
>> >
>> > There is a u64_stats_sync set of macros for this. It has the
>> > advantage of becoming a NOP on 64 bit platforms.
>> 
>> The reason why I did it this way is it ties the packet and byte count
>> together.
> 
> Ok, but why bother?
> No other software counters bother to group bytes/packets. Even
> hardware counters get read separately.

Agreed, this is totally pointless.  Please use the u64 state interfaces.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to