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

GitHub noreply at github.com
Wed Jan 18 23:41:56 UTC 2017


  Branch: refs/heads/branch-2.6
  Home:   https://github.com/openvswitch/ovs
  Commit: 02bb2f32077802122373af74f2d3b2351fbd5244
      https://github.com/openvswitch/ovs/commit/02bb2f32077802122373af74f2d3b2351fbd5244
  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