Before we introduced threading, any given ``learn'' action took effect in
the flow table before the next incoming flow was set up.  This meant that
if a packet came in, used ``learn'' to set up a flow to handle replies, and
then a reply came in, the reply would always hit the flow set up by the
``learn'' action.  Until now, with the threading implementation, though,
the effects of ``learn'' actions happen asynchronously via a queue, which
means that the reply can arrive before the flow to handle it is set up.
This introduced an unacceptable regression in important use cases.

This series fixes the problem by switching back to executing learn actions
before forwarding the packet that triggered it.

I imagine that there is considerable opportunity for optimization here.

Ben Pfaff (25):
  ofproto: Do not call ->rule_destruct() if ->rule_construct() failed.
  ofproto: Support out_group feature when matching on cookie.
  ofproto: Factor code out of collect_rules_{loose,strict} into new
    helper.
  ofproto: Correct comments.
  ofproto: Avoid gratuitous memory allocation and free.
  ofproto-dpif: Remove vestigial "clogged" feature.
  ofproto: Merge ofproto_rule_delete() and ofproto_delete_rule().
  ofproto: Move function find_meter() into ofpacts as
    ofpacts_get_meter().
  ofproto: Remove soon-to-be-invalid optimizations.
  ofproto: Break actions out of rule into new rule_actions structure.
  ofproto: Add a ref_count to "struct rule" to protect it from being
    freed.
  guarded-list: New data structure for thread-safe queue.
  classifier: Allow CLS_CURSOR_FOR_EACH to use a const-qualified
    iterator.
  ofproto: Move rule_execute() out of ofopgroup_complete().
  ofproto: Drop 'expirable_mutex' in favor of new global
    'ofproto_mutex'.
  ofproto: Protect index by cookie with ofproto_mutex.
  ofproto: Replace rwlock in struct rule by a mutex.
  ofproto: Remove ->timeout_mutex from struct rule (just use ->mutex).
  ofproto: Make some functions for rules private to ofproto.c.
  ofproto: Mark immutable members of struct rule 'const'.
  ofproto: New helper any_pending_ops().
  ofproto: Refactor eviction cases to use common code.
  ofproto: Add global locking around flow table changes.
  ofproto: Remove redundant cls parameter from a few functions.
  ofproto-dpif: Move "learn" actions into individual threads.

 lib/automake.mk               |    2 +
 lib/classifier.c              |    3 +-
 lib/classifier.h              |    7 +-
 lib/guarded-list.c            |   65 +++
 lib/guarded-list.h            |   36 ++
 lib/ofp-actions.c             |   24 +
 lib/ofp-actions.h             |    1 +
 ofproto/connmgr.c             |   11 +-
 ofproto/connmgr.h             |    3 +-
 ofproto/fail-open.c           |    3 +-
 ofproto/ofproto-dpif-upcall.c |    2 +-
 ofproto/ofproto-dpif-xlate.c  |   44 +-
 ofproto/ofproto-dpif.c        |  272 ++++--------
 ofproto/ofproto-dpif.h        |   16 +-
 ofproto/ofproto-provider.h    |  300 ++++++++++---
 ofproto/ofproto.c             |  984 +++++++++++++++++++++++++----------------
 ofproto/ofproto.h             |    2 +-
 17 files changed, 1104 insertions(+), 671 deletions(-)
 create mode 100644 lib/guarded-list.c
 create mode 100644 lib/guarded-list.h

-- 
1.7.10.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to