Skip to content

Commit 486619b

Browse files
committed
classifier: Remove leftover bits of classifier partitioning.
Partitioning was replaced with a more generic staged lookup, but the comment and the hash map still remain in the code. Let's remove them. Fixes: a14502a ("classifier: Retire partitions.") Acked-by: Eelco Chaudron <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
1 parent eeb6ccc commit 486619b

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

lib/classifier.h

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -172,43 +172,6 @@
172172
* flow table. Currently this limit is 4.
173173
*
174174
*
175-
* Partitioning (Lookup Time and Wildcard Optimization)
176-
* ----------------------------------------------------
177-
*
178-
* Suppose that a given classifier is being used to handle multiple stages in a
179-
* pipeline using "resubmit", with metadata (that is, the OpenFlow 1.1+ field
180-
* named "metadata") distinguishing between the different stages. For example,
181-
* metadata value 1 might identify ingress rules, metadata value 2 might
182-
* identify ACLs, and metadata value 3 might identify egress rules. Such a
183-
* classifier is essentially partitioned into multiple sub-classifiers on the
184-
* basis of the metadata value.
185-
*
186-
* The classifier has a special optimization to speed up matching in this
187-
* scenario:
188-
*
189-
* - Each cls_subtable that matches on metadata gets a tag derived from the
190-
* subtable's mask, so that it is likely that each subtable has a unique
191-
* tag. (Duplicate tags have a performance cost but do not affect
192-
* correctness.)
193-
*
194-
* - For each metadata value matched by any cls_rule, the classifier
195-
* constructs a "struct cls_partition" indexed by the metadata value.
196-
* The cls_partition has a 'tags' member whose value is the bitwise-OR of
197-
* the tags of each cls_subtable that contains any rule that matches on
198-
* the cls_partition's metadata value. In other words, struct
199-
* cls_partition associates metadata values with subtables that need to
200-
* be checked with flows with that specific metadata value.
201-
*
202-
* Thus, a flow lookup can start by looking up the partition associated with
203-
* the flow's metadata, and then skip over any cls_subtable whose 'tag' does
204-
* not intersect the partition's 'tags'. (The flow must also be looked up in
205-
* any cls_subtable that doesn't match on metadata. We handle that by giving
206-
* any such cls_subtable TAG_ALL as its 'tags' so that it matches any tag.)
207-
*
208-
* Partitioning saves lookup time by reducing the number of subtable lookups.
209-
* Each eliminated subtable lookup also reduces the amount of un-wildcarding.
210-
*
211-
*
212175
* Classifier Versioning
213176
* =====================
214177
*
@@ -336,7 +299,6 @@ struct classifier {
336299
* for staged lookup. */
337300
struct cmap subtables_map; /* Contains "struct cls_subtable"s. */
338301
struct pvector subtables;
339-
struct cmap partitions; /* Contains "struct cls_partition"s. */
340302
struct cls_trie tries[CLS_MAX_TRIES]; /* Prefix tries. */
341303
atomic_uint32_t n_tries; /* Number of tries. Also serves as a
342304
* memory synchronization point for trie

0 commit comments

Comments
 (0)