This series enhances the lib/classifier to allow lockless iteration that is also robust against concurrent modifications of arbitrary classifier rules. This makes it possible to use a classifier without any additional synchronization in some use cases.
Iteration is typically not in performance critical code paths, so this should have no effect on performance, but this makes the code cleaner and more robust. Jarno Rajahalme (7): lib/ofproto: Remove obsolete FIXME comment. lib/ofproto: Add comments about races in ofproto_flush(). lib/ovs-rcu: Support static initialization. lib/rculist: New RCU-iterator, single-writer doubly-linked list. tests/test-classifier: Properly use ovsrcu_postpone. lib/classifier: Lockless and robust classifier iteration. lib/classifier: Constify cls_subtable fields. lib/automake.mk | 2 + lib/classifier-private.h | 84 ++++-- lib/classifier.c | 641 ++++++++++++++++++++---------------------- lib/classifier.h | 83 +++--- lib/flow.c | 4 +- lib/ovs-rcu.h | 4 +- lib/pvector.h | 7 + lib/rculist.c | 27 ++ lib/rculist.h | 404 ++++++++++++++++++++++++++ ofproto/connmgr.c | 2 +- ofproto/fail-open.h | 2 +- ofproto/ofproto-dpif-xlate.c | 2 +- ofproto/ofproto-dpif.c | 2 +- ofproto/ofproto-provider.h | 4 +- ofproto/ofproto.c | 20 +- tests/test-classifier.c | 62 ++-- utilities/ovs-ofctl.c | 12 +- 17 files changed, 918 insertions(+), 444 deletions(-) create mode 100644 lib/rculist.c create mode 100644 lib/rculist.h -- 1.7.10.4 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
