The first three patches in this series implement an RCU library within Open vSwitch. The library is self-contained; it does not depend on liburcu or another external library. (This is the primary difference between this series and the previous RFC version.)
The fourth patch adds one simple user of the RCU library. The remaining patches add RCU support for dpif-netdev. Ben Pfaff (8): ovs-atomic: Refactor declarations for GCC 4+, pthreads implementations. ovs-atomic: Add support for atomic pointer types. ovs-rcu: New library. ofproto: Use RCU to protect rule_actions. util: New functions for allocating memory while avoiding false sharing. ovs-thread: Replace ovsthread_counter by more general ovsthread_stats. dpif-netdev: Use ovsthread_stats for flow stats. dpif-netdev: Use RCU to protect data. lib/automake.mk | 2 + lib/dpif-netdev.c | 296 +++++++++++++++++++++++------------------- lib/fat-rwlock.c | 29 +---- lib/ovs-atomic-clang.h | 4 +- lib/ovs-atomic-gcc4+.h | 58 +++++---- lib/ovs-atomic-gcc4.7+.h | 4 +- lib/ovs-atomic-pthreads.h | 61 +++++---- lib/ovs-atomic.h | 23 ++++ lib/ovs-rcu.c | 293 +++++++++++++++++++++++++++++++++++++++++ lib/ovs-rcu.h | 171 ++++++++++++++++++++++++ lib/ovs-thread.c | 107 +++++++-------- lib/ovs-thread.h | 25 +++- lib/timeval.c | 11 ++ lib/util.c | 65 +++++++++- lib/util.h | 6 +- ofproto/connmgr.c | 5 +- ofproto/ofproto-dpif-upcall.c | 5 + ofproto/ofproto-dpif-xlate.c | 2 - ofproto/ofproto-dpif.c | 2 - ofproto/ofproto-provider.h | 19 ++- ofproto/ofproto.c | 120 ++++++++--------- 21 files changed, 932 insertions(+), 376 deletions(-) create mode 100644 lib/ovs-rcu.c create mode 100644 lib/ovs-rcu.h -- 1.8.5.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev