[ovs-git] Open vSwitch: lib/classifier: Support variable sized miniflows. (master)

dev at openvswitch.org dev at openvswitch.org
Tue Apr 29 23:04:01 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  3016f3e4a80aa47510f5eab7b3927c20278b0281 (commit)
       via  27bbe15dec4e1862396b5c4d265f0ced71b49930 (commit)
       via  627fb667b2604e28fb0b658760e6bd46912ebc08 (commit)
       via  ec988646afe6aee6a63d6894a3e9b50f715d5941 (commit)
       via  124f09c9279ae41eba4bf0d6419387e8ec9a1a78 (commit)
       via  d4570fd8ba5f36f21b9b631628e812de0189fa20 (commit)
       via  cabd4c43854275943792a8b1bb4c7b719e210259 (commit)
       via  ac4aa4c83f94cfbc0b056cb636987e39e7909cdb (commit)
       via  3d91d9094dcf49c210bd4ebae4bd1e0cea9defce (commit)
       via  28a560d97a8b6882e7dfd4df2e52806dba4fd0e5 (commit)
       via  003ce655b7116d18c86a74c50391e54990346931 (commit)
       via  dc723c447a797e555d400594133a35b9841eb1de (commit)
       via  0d593ee424de4bb9e3d4dbe7d81c126a4efaa267 (commit)
       via  e45d584eea92b71348501ce648f654837b14bb0f (commit)
      from  1f14e0558dc6e77f9fab836ccfad00341535057d (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 3016f3e4a80aa47510f5eab7b3927c20278b0281
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=3016f3e4a80aa47510f5eab7b3927c20278b0281
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
lib/classifier: Support variable sized miniflows.
		
Change the classifier to allocate variable sized miniflows and
minimasks in cls_match and cls_subtable, respectively.  Do not
duplicate the mask in cls_rule any more.

miniflow_clone and miniflow_move can now take variably sized miniflows
as source.  The destination is assumed to be regularly sized miniflow.

Inlining miniflow and mask values reduces memory indirection and helps
reduce cache misses.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


commit 27bbe15dec4e1862396b5c4d265f0ced71b49930
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=27bbe15dec4e1862396b5c4d265f0ced71b49930
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
lib/flow: Maintain miniflow offline values explicitly.
		
This allows use of miniflows that have all of their values inline.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


commit 627fb667b2604e28fb0b658760e6bd46912ebc08
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=627fb667b2604e28fb0b658760e6bd46912ebc08
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
lib/classifier: Separate cls_rule internals from the API.
		
Keep an internal representation of a rule separate from the one
embedded into user's structs.  This allows for further memory
optimization in the classifier.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


commit ec988646afe6aee6a63d6894a3e9b50f715d5941
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=ec988646afe6aee6a63d6894a3e9b50f715d5941
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
classifier: Use array for subtables instead of a list.
		
Using a linear array allows more efficient memory access for lookups.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


commit 124f09c9279ae41eba4bf0d6419387e8ec9a1a78
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=124f09c9279ae41eba4bf0d6419387e8ec9a1a78
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
lib: Add prefetch support (for GCC)
		
Define OVS_PREFETCH() and OVS_PREFETCH_WRITE() using builtin prefetch
for GCC, and ovs_prefetch_range() for prefetching a range of addresses.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


commit d4570fd8ba5f36f21b9b631628e812de0189fa20
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=d4570fd8ba5f36f21b9b631628e812de0189fa20
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
lib/flow: Optimize minimask_has_extra() and minimask_is_catchall()
		
We only need to iterate over the bits masked by the 'b' in
minimask_has_extra(), since for zeroes in 'b' there can be no 'extra'
wildcards in 'a', as 'b' has already wildcarded all the bits.

minimask_is_catchall() can be simplified by the invariant that mask's
map never has 1-bits for all-zero values.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


commit cabd4c43854275943792a8b1bb4c7b719e210259
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=cabd4c43854275943792a8b1bb4c7b719e210259
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
lib/classifier: Hide more of the internal data structures.
		
It is better not to expose definitions not needed by users.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


commit ac4aa4c83f94cfbc0b056cb636987e39e7909cdb
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=ac4aa4c83f94cfbc0b056cb636987e39e7909cdb
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
ofproto: Use classifer cursor API to collect vlan usage.
		
This was the only place in OVS code that accessed classifier internal
data structures directly.  Use the classifier cursor API instead, so
that following patches can hide classifier internal data structures.

Note: There seems to be no test case to verify that this vlan usage
collection is implemented correctly.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


commit 3d91d9094dcf49c210bd4ebae4bd1e0cea9defce
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=3d91d9094dcf49c210bd4ebae4bd1e0cea9defce
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
lib: Inline functions used in classifier_lookup.
		
This helps about 1% in TCP_CRR performance test.  However, this also
helps by clearly showing the classifier_lookup() cost in perf reports
as one item.

This also cleans up the flow/match APIs from functionality only used
by the classifier, making is more straightforward to evolve them
later.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


commit 28a560d97a8b6882e7dfd4df2e52806dba4fd0e5
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=28a560d97a8b6882e7dfd4df2e52806dba4fd0e5
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
lib/flow: Simplify miniflow accessors, add ipv6 support.
		
Add new macro MINIFLOW_MAP(FIELD) that returns the map covering the
given struct flow field.

Change the miniflow accessors to macros so that they can take the
field name directly.

Use these to add ipv6 support to miniflow_hash_5tuple().

Add ipv6 support to flow_hash_5tuple() as well so that these two
functions continue to return the same hash value for the corresponding
flows.

Also, simplify miniflow_get_metadata().

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


commit 003ce655b7116d18c86a74c50391e54990346931
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=003ce655b7116d18c86a74c50391e54990346931
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
ofproto: Inline trivial functions.
		
rule_dpif_is_internal is among the top ten OVS internal functions in
recent perf reports.  Inline it and some other equally trivial
functions.

This change removes rule_is_internal(), since the fact that a table is
an internal one is defined within ofproto-dpif, not ofproto.

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


commit dc723c447a797e555d400594133a35b9841eb1de
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=dc723c447a797e555d400594133a35b9841eb1de
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
ofproto: Inline actions in struct rule_actions.
		
Allocate struct rule_actions and the space for the actions at once.
This reduces one memory indirection and helps reduce cache misses
visible in perf annotations.

Fix some old comments referring to ref count, since we now use RCU for
this.

Enforce constness of the actions that are assigned from rule_actions
throughout the code.

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


commit 0d593ee424de4bb9e3d4dbe7d81c126a4efaa267
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=0d593ee424de4bb9e3d4dbe7d81c126a4efaa267
Author: Ben Pfaff <blp at nicira.com>
		
ovs-rcu: Log the name of the main thread as "main" instead of "".
		
The main thread has the empty string as its name, but that's not a good
log string.

Without this patch we can get log message like
    blocked 1000 ms waiting for  to quiesce
from ovsrcu_synchronize().

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Alex Wang <alexw at nicira.com>


commit e45d584eea92b71348501ce648f654837b14bb0f
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=e45d584eea92b71348501ce648f654837b14bb0f
Author: Ben Pfaff <blp at nicira.com>
		
tests: Whitelist messages about RCU blocking in the testsuite.
		
In production these may indicate a bug, but in the testsuite they probably
just indicate a time-warp.

Reported-by: Alex Wang <alexw at nicira.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Alex Wang <alexw at nicira.com>


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

Summary of changes:
 lib/classifier.c             |  824 ++++++++++++++++++++++++++++++++----------
 lib/classifier.h             |   73 +---
 lib/compiler.h               |   14 +
 lib/dpif-netdev.c            |   32 +-
 lib/flow.c                   |  390 +++++++-------------
 lib/flow.h                   |  233 ++++++------
 lib/hindex.c                 |   13 -
 lib/hindex.h                 |   13 +-
 lib/match.c                  |   37 +-
 lib/match.h                  |    4 -
 lib/ofp-actions.h            |    2 +-
 lib/ofp-parse.c              |    2 +-
 lib/ofp-util.h               |    8 +-
 lib/ovs-rcu.c                |    4 +-
 lib/util.h                   |   14 +
 ofproto/connmgr.c            |    2 +-
 ofproto/ofproto-dpif-xlate.c |    4 +-
 ofproto/ofproto-dpif.c       |   53 +--
 ofproto/ofproto-dpif.h       |   55 ++-
 ofproto/ofproto-provider.h   |   74 ++--
 ofproto/ofproto.c            |   63 ++--
 tests/ofproto-macros.at      |    1 +
 tests/test-classifier.c      |   33 +-
 utilities/ovs-ofctl.c        |    8 +-
 24 files changed, 1144 insertions(+), 812 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list