mirror of
https://github.com/openvswitch/ovs
synced 2025-09-04 16:25:17 +00:00
classifier: Remove OF1.0 special case from classifier_find_rule_exactly().
This special case should never have actually triggered in practice, because OpenFlow 1.0 cannot set up an exact-match rule as defined by flow_wildcards_is_exact(). (OpenFlow 1.0 will always, for example, wildcard all NXM registers.) OVS implements this OF1.0 special case differently, by changing flow priority to 65535 in cls_rule_from_match() if the flow is an exact match as defined by OpenFlow 1.0.
This commit is contained in:
@@ -760,10 +760,7 @@ classifier_lookup(const struct classifier *cls, const struct flow *flow)
|
|||||||
|
|
||||||
/* Finds and returns a rule in 'cls' with exactly the same priority and
|
/* Finds and returns a rule in 'cls' with exactly the same priority and
|
||||||
* matching criteria as 'target'. Returns a null pointer if 'cls' doesn't
|
* matching criteria as 'target'. Returns a null pointer if 'cls' doesn't
|
||||||
* contain an exact match.
|
* contain an exact match. */
|
||||||
*
|
|
||||||
* Priority is ignored for exact-match rules (because OpenFlow 1.0 always
|
|
||||||
* treats exact-match rules as highest priority). */
|
|
||||||
struct cls_rule *
|
struct cls_rule *
|
||||||
classifier_find_rule_exactly(const struct classifier *cls,
|
classifier_find_rule_exactly(const struct classifier *cls,
|
||||||
const struct cls_rule *target)
|
const struct cls_rule *target)
|
||||||
@@ -777,9 +774,6 @@ classifier_find_rule_exactly(const struct classifier *cls,
|
|||||||
}
|
}
|
||||||
|
|
||||||
head = find_equal(table, &target->flow, flow_hash(&target->flow, 0));
|
head = find_equal(table, &target->flow, flow_hash(&target->flow, 0));
|
||||||
if (flow_wildcards_is_exact(&target->wc)) {
|
|
||||||
return head;
|
|
||||||
}
|
|
||||||
FOR_EACH_RULE_IN_LIST (rule, head) {
|
FOR_EACH_RULE_IN_LIST (rule, head) {
|
||||||
if (target->priority >= rule->priority) {
|
if (target->priority >= rule->priority) {
|
||||||
return target->priority == rule->priority ? rule : NULL;
|
return target->priority == rule->priority ? rule : NULL;
|
||||||
|
Reference in New Issue
Block a user