Lines Matching full:rule
12 * ksz9477_flower_parse_key_l2 - Parse Layer 2 key from flow rule and configure
17 * @rule: Pointer to the flow_rule.
21 * This function parses the Layer 2 key from the flow rule and configures
29 struct flow_rule *rule, in ksz9477_flower_parse_key_l2() argument
40 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_BASIC)) { in ksz9477_flower_parse_key_l2()
43 flow_rule_match_basic(rule, &match); in ksz9477_flower_parse_key_l2()
56 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ETH_ADDRS)) { in ksz9477_flower_parse_key_l2()
57 flow_rule_match_eth_addrs(rule, &ematch); in ksz9477_flower_parse_key_l2()
95 * ksz9477_flower_parse_key - Parse flow rule keys for a specified port on a
98 * @port: The port number to parse the flow rule keys for.
100 * @rule: The flow_rule to parse.
104 * This function checks if the used keys in the flow rule are supported by
112 struct flow_rule *rule, in ksz9477_flower_parse_key() argument
115 struct flow_dissector *dissector = rule->match.dissector; in ksz9477_flower_parse_key()
127 if (flow_rule_match_has_control_flags(rule, extack)) in ksz9477_flower_parse_key()
130 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_BASIC) || in ksz9477_flower_parse_key()
131 flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ETH_ADDRS)) { in ksz9477_flower_parse_key()
132 ret = ksz9477_flower_parse_key_l2(dev, port, extack, rule, in ksz9477_flower_parse_key()
142 * ksz9477_flower_parse_action - Parse flow rule actions for a specified port
145 * @port: The port number to parse the flow rule actions for.
147 * @cls: The flow_cls_offload instance containing the flow rule.
150 * This function checks if the actions in the flow rule are supported by
162 struct flow_rule *rule = flow_cls_offload_flow_rule(cls); in ksz9477_flower_parse_action() local
175 flow_action_for_each(i, act, &rule->action) { in ksz9477_flower_parse_action()
201 * ksz9477_cls_flower_add - Add a flow classification rule for a specified port
204 * @port: The port number to add the flow classification rule to.
205 * @cls: The flow_cls_offload instance containing the flow rule.
206 * @ingress: A flag indicating if the rule is applied on the ingress path.
208 * This function adds a flow classification rule for a specified port on a
211 * are unprocessed entries, it parses the action for the rule.
218 struct flow_rule *rule = flow_cls_offload_flow_rule(cls); in ksz9477_cls_flower_add() local
232 /* A complex rule set can take multiple entries. Use first entry in ksz9477_cls_flower_add()
237 ret = ksz9477_flower_parse_key(dev, port, extack, rule, cls->cookie, in ksz9477_cls_flower_add()
255 * ksz9477_cls_flower_del - Remove a flow classification rule for a specified
258 * @port: The port number to remove the flow classification rule from.
259 * @cls: The flow_cls_offload instance containing the flow rule.
260 * @ingress: A flag indicating if the rule is applied on the ingress path.
262 * This function removes a flow classification rule for a specified port on a