lib/cfm: Use relaxed atomics and optimize cfm_should_process_flow().
authorJarno Rajahalme <jrajahalme@nicira.com>
Fri, 29 Aug 2014 17:34:52 +0000 (10:34 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Fri, 29 Aug 2014 17:34:52 +0000 (10:34 -0700)
commit7e2b277bed0878b5350f61de9e43d1a5b4d7c34b
tree377f03dd0c24fd392c1166bcf94f338ea449a3e2
parent94f756daf21af97876266015e758aa96556ff6e8
lib/cfm: Use relaxed atomics and optimize cfm_should_process_flow().

The atomics here do not synchronize the state of any other variables,
so we can use relaxed atomics.

cfm_should_process_flow() is rearranged to set the megaflow mask bits
only if necessary, and to avoid the atomic operation on non-CFM
packets.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/cfm.c