[ovs-git] [openvswitch/ovs] 844e83: ofproto-dpif: Use acquire/release barriers with 't...

GitHub noreply at github.com
Fri Jan 20 00:57:54 UTC 2017


  Branch: refs/heads/branch-2.5
  Home:   https://github.com/openvswitch/ovs
  Commit: 844e83c21de63977ef080da8abb5768525b192fb
      https://github.com/openvswitch/ovs/commit/844e83c21de63977ef080da8abb5768525b192fb
  Author: Jarno Rajahalme <jarno at ovn.org>
  Date:   2017-01-19 (Thu, 19 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