mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
ofproto: Change ofproto_add_flow(), ofproto_delete_flow() to take cls_rule.
This is a small cleanup that will make later changes to wildcards easier.
This commit is contained in:
@@ -134,6 +134,16 @@ cls_rule_from_match(const struct ofp_match *match, unsigned int priority,
|
||||
rule->priority = rule->wc.wildcards ? priority : UINT16_MAX;
|
||||
}
|
||||
|
||||
/* Initializes 'rule' as a "catch-all" rule that matches every packet, with
|
||||
* priority 'priority'. */
|
||||
void
|
||||
cls_rule_init_catchall(struct cls_rule *rule, unsigned int priority)
|
||||
{
|
||||
memset(&rule->flow, 0, sizeof rule->flow);
|
||||
flow_wildcards_init(&rule->wc, OVSFW_ALL);
|
||||
rule->priority = priority;
|
||||
}
|
||||
|
||||
/* For each bit or field wildcarded in 'rule', sets the corresponding bit or
|
||||
* field in 'flow' to all-0-bits. It is important to maintain this invariant
|
||||
* in a clr_rule that might be inserted into a classifier.
|
||||
|
Reference in New Issue
Block a user