[ovs-git] Open vSwitch: lib/classifier: Remove unused typedef cls_cb_func. (master)

dev at openvswitch.org dev at openvswitch.org
Mon Jul 7 21:04:25 UTC 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  5667711b7d5015528afaf4f3e94976362d4b392d (commit)
       via  f5d16e557ffe376a23ac3fd2cf1a7bcab2013ec2 (commit)
       via  24f8381214966e90819bf4a9ecabf076cbfc1b08 (commit)
       via  6969766b7557b33e7588abe5956c21c23450110c (commit)
       via  25045d755e1161fd6d0097db683a91d9bd5d2913 (commit)
       via  541bfad20a51d6dc3c051368d70d49e13b040fb9 (commit)
      from  33c6a1b9d4584afc0ac89b25edf666000ad938a7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5667711b7d5015528afaf4f3e94976362d4b392d
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=5667711b7d5015528afaf4f3e94976362d4b392d
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
lib/classifier: Remove unused typedef cls_cb_func.
		
Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>

commit f5d16e557ffe376a23ac3fd2cf1a7bcab2013ec2
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=f5d16e557ffe376a23ac3fd2cf1a7bcab2013ec2
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
ofproto-dpif: Use ovs_refcount_try_ref_rcu().
		
This is a prerequisite step in making the classifier lookups lockless.
If taking a reference fails, we do the lookup again, as a new (lower
priority) rule may now match instead.

Also remove unwildcarding dl_type and nw_frag, as these are already
taken care of by xlate_actions().

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

commit 24f8381214966e90819bf4a9ecabf076cbfc1b08
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=24f8381214966e90819bf4a9ecabf076cbfc1b08
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
Use ovs_refcount_unref_relaxed.
		
After a quick analysis, in most cases the access to refcounted objects
is clearly protected either with an explicit lock/mutex, or RCU. there
are only a few places where I left a call to ovs_refcount_unref().
Upon closer analysis it may well be that those could also use the
relaxed form.

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

commit 6969766b7557b33e7588abe5956c21c23450110c
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=6969766b7557b33e7588abe5956c21c23450110c
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
lib/ovs-atomic: Add ovs_refcount_unref_relaxed(), ovs_refcount_try_ref_rcu().
		
When a reference counted object is also RCU protected the deletion of
the object's memory is always postponed.  This allows
memory_order_relaxed to be used also for unreferencing, as RCU
quiescing provides a full memory barrier (it has to, or otherwise
there could be lingering accesses to objects after they are recycled).

Also, when access to the reference counted object is protected via a
mutex or a lock, the locking primitives provide the required memory
barrier functionality.

Also, add ovs_refcount_try_ref_rcu(), which takes a reference only if
the refcount is non-zero and returns true if a reference was taken,
false otherwise.  This can be used in combined RCU/refcount scenarios
where we have an RCU protected reference to an refcounted object, but
which may be unref'ed at any time.  If ovs_refcount_try_ref_rcu()
fails, the object may still be safely used until the current thread
quiesces.

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

commit 25045d755e1161fd6d0097db683a91d9bd5d2913
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=25045d755e1161fd6d0097db683a91d9bd5d2913
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
lib/ovs-atomic: Add atomic compare_exchange.
		
Add support for atomic compare_exchange operations.

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

commit 541bfad20a51d6dc3c051368d70d49e13b040fb9
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=541bfad20a51d6dc3c051368d70d49e13b040fb9
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
ovs-atomic: Use explicit memory order for ovs_refcount.
		
Use explicit variants of atomic operations for the ovs_refcount to
avoid the overhead of the default memory_order_seq_cst.

Adding a reference requires no memory ordering, as the calling thread
is already assumed to have protected access to the object being
reference counted.  Hence, memory_order_relaxed is used for
ovs_refcount_ref().  ovs_refcount_read() does not change the reference
count, so it can also use memory_order_relaxed.

Unreferencing an object needs a release barrier, so that none of the
accesses to the protected object are reordered after the atomic
decrement operation.  Additionally, an explicit acquire barrier is
needed before the object is recycled, to keep the subsequent accesses
to the object's memory from being reordered before the atomic
decrement operation.

This patch follows the memory ordering and argumentation discussed
here:

http://www.chaoticmind.net/~hcb/projects/boost.atomic/doc/atomic/usage_examples.html

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

-----------------------------------------------------------------------

Summary of changes:
 lib/bfd.c                    |    2 +-
 lib/cfm.c                    |    2 +-
 lib/classifier.h             |    2 -
 lib/dpif-netdev.c            |    6 +-
 lib/lacp.c                   |    2 +-
 lib/mcast-snooping.c         |    2 +-
 lib/ovs-atomic-clang.h       |   14 +++++
 lib/ovs-atomic-gcc4+.h       |   23 ++++++++
 lib/ovs-atomic-gcc4.7+.h     |   14 +++++
 lib/ovs-atomic-locked.h      |   11 ++++
 lib/ovs-atomic-pthreads.h    |   10 ++++
 lib/ovs-atomic.h             |  132 +++++++++++++++++++++++++++++++++++++++---
 lib/ovs-rcu.c                |    5 +-
 lib/stp.c                    |    2 +-
 ofproto/bond.c               |    2 +-
 ofproto/netflow.c            |    2 +-
 ofproto/ofproto-dpif-ipfix.c |    2 +-
 ofproto/ofproto-dpif-sflow.c |    2 +-
 ofproto/ofproto-dpif.c       |   40 +++++++------
 ofproto/ofproto-dpif.h       |    9 +++
 ofproto/ofproto-provider.h   |    1 +
 ofproto/ofproto.c            |   11 +++-
 22 files changed, 254 insertions(+), 42 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list