[ovs-git] [openvswitch/ovs] d16154: ofproto-dpif: Use acquire/release barriers with 't...
GitHub
noreply at github.com
Wed Jan 18 23:41:25 UTC 2017
Branch: refs/heads/branch-2.7
Home: https://github.com/openvswitch/ovs
Commit: d161542c85cdb6277abdeee71f92070da4ce8330
https://github.com/openvswitch/ovs/commit/d161542c85cdb6277abdeee71f92070da4ce8330
Author: Jarno Rajahalme <jarno at ovn.org>
Date: 2017-01-18 (Wed, 18 Jan 2017)
Changed paths:
M ofproto/ofproto-dpif.c
Log Message:
-----------
ofproto-dpif: Use acquire/release barriers with 'tables_version'.
Use memory_order_release when updating the tables version number to
make sure no memory accesses before the atomic_store (possibly
relating to setting up the new version) are reordered to take place
after the atomic_store, which makes the new version available to other
threads.
Correspondingly, use memory_order_acquire when reading the
current tables_version to make sure no later memory accesses (possibly
relating to the current version) are reordered to take place before
the atomic_read to ensure that those memory accesses can not relate to
an older version than returned by the atomic_read.
Suggested-by: Daniele Di Proietto <ddiproietto at vmware.com>
Fixes: 621b8064b7 ("ofproto: Infra for table versioning.")
Signed-off-by: Jarno Rajahalme <jarno at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>
More information about the git
mailing list