classifier: Speed up lookup when metadata partitions the flow table.
authorBen Pfaff <blp@nicira.com>
Wed, 25 Sep 2013 22:07:21 +0000 (15:07 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 26 Sep 2013 19:40:49 +0000 (12:40 -0700)
commitc906cedf2ec50baf1cb78a0c3b7f7eb016418ed2
tree41b367f7b211472806c8a471d4adf1437b985624
parentb63e3bbc18c459073a4b83a26b17c53f34f3dcf2
classifier: Speed up lookup when metadata partitions the flow table.

We have a controller that puts many rules with different metadata values
into the flow table, where metadata is used (by "resubmit"s) to distinguish
stages in a pipeline.  Thus, any given flow only needs to be hashed into
classifier "cls_table"s that contain a match for the flow's metadata value.
This commit optimizes the classifier lookup by (probabilistically) skipping
the "cls_table"s that can't possibly match.

(The "metadata" referred to here is the OpenFlow 1.1+ "metadata" field,
which is a 64-bit field similar in purpose to the "registers" defined by
Open vSwitch.)

Previous versions of this patch, with earlier versions of the controller in
question, improved flow setup performance by about 19%.

Bug #14282.
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/classifier.c
lib/classifier.h
lib/flow.h
manpages.mk