ofproto: Move 'rule->used' to the provider.
authorJarno Rajahalme <jrajahalme@nicira.com>
Tue, 11 Feb 2014 17:49:30 +0000 (09:49 -0800)
committerJarno Rajahalme <jrajahalme@nicira.com>
Wed, 12 Feb 2014 21:58:47 +0000 (13:58 -0800)
Rule's 'used' timestamp is updated at the same time with the other
stats.  So far the 'used' has been updated without proper protection,
which may lead to 'tearing' in 32-bit architectures, resulting in an
incorrect 'used' timestamp.  While in practice this is highly
improbable, it is still better to handle this correctly.

This is resolved by moving the 'used' field to the provider's stats,
so that whatever protection is used for updating packet and byte
counts, can be also used for both reading and writing of the 'used'
timestamp.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>

No differences found