Lines Matching refs:f
114 struct tc_cls_flower_offload *f) in mlxsw_sp_flower_parse_ipv4() argument
117 skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse_ipv4()
119 f->key); in mlxsw_sp_flower_parse_ipv4()
121 skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse_ipv4()
123 f->mask); in mlxsw_sp_flower_parse_ipv4()
134 struct tc_cls_flower_offload *f) in mlxsw_sp_flower_parse_ipv6() argument
137 skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse_ipv6()
139 f->key); in mlxsw_sp_flower_parse_ipv6()
141 skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse_ipv6()
143 f->mask); in mlxsw_sp_flower_parse_ipv6()
173 struct tc_cls_flower_offload *f, in mlxsw_sp_flower_parse_ports() argument
178 if (!dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_PORTS)) in mlxsw_sp_flower_parse_ports()
182 NL_SET_ERR_MSG_MOD(f->common.extack, "Only UDP and TCP keys are supported"); in mlxsw_sp_flower_parse_ports()
187 key = skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse_ports()
189 f->key); in mlxsw_sp_flower_parse_ports()
190 mask = skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse_ports()
192 f->mask); in mlxsw_sp_flower_parse_ports()
202 struct tc_cls_flower_offload *f, in mlxsw_sp_flower_parse_tcp() argument
207 if (!dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_TCP)) in mlxsw_sp_flower_parse_tcp()
211 NL_SET_ERR_MSG_MOD(f->common.extack, "TCP keys supported only for TCP"); in mlxsw_sp_flower_parse_tcp()
216 key = skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse_tcp()
218 f->key); in mlxsw_sp_flower_parse_tcp()
219 mask = skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse_tcp()
221 f->mask); in mlxsw_sp_flower_parse_tcp()
229 struct tc_cls_flower_offload *f, in mlxsw_sp_flower_parse_ip() argument
234 if (!dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_IP)) in mlxsw_sp_flower_parse_ip()
238 NL_SET_ERR_MSG_MOD(f->common.extack, "IP keys supported only for IPv4/6"); in mlxsw_sp_flower_parse_ip()
243 key = skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse_ip()
245 f->key); in mlxsw_sp_flower_parse_ip()
246 mask = skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse_ip()
248 f->mask); in mlxsw_sp_flower_parse_ip()
264 struct tc_cls_flower_offload *f) in mlxsw_sp_flower_parse() argument
272 if (f->dissector->used_keys & in mlxsw_sp_flower_parse()
283 NL_SET_ERR_MSG_MOD(f->common.extack, "Unsupported key"); in mlxsw_sp_flower_parse()
287 mlxsw_sp_acl_rulei_priority(rulei, f->common.prio); in mlxsw_sp_flower_parse()
289 if (dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_CONTROL)) { in mlxsw_sp_flower_parse()
291 skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse()
293 f->key); in mlxsw_sp_flower_parse()
297 if (dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_BASIC)) { in mlxsw_sp_flower_parse()
299 skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse()
301 f->key); in mlxsw_sp_flower_parse()
303 skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse()
305 f->mask); in mlxsw_sp_flower_parse()
323 if (dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_ETH_ADDRS)) { in mlxsw_sp_flower_parse()
325 skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse()
327 f->key); in mlxsw_sp_flower_parse()
329 skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse()
331 f->mask); in mlxsw_sp_flower_parse()
347 if (dissector_uses_key(f->dissector, FLOW_DISSECTOR_KEY_VLAN)) { in mlxsw_sp_flower_parse()
349 skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse()
351 f->key); in mlxsw_sp_flower_parse()
353 skb_flow_dissector_target(f->dissector, in mlxsw_sp_flower_parse()
355 f->mask); in mlxsw_sp_flower_parse()
358 NL_SET_ERR_MSG_MOD(f->common.extack, "vlan_id key is not supported on egress"); in mlxsw_sp_flower_parse()
374 mlxsw_sp_flower_parse_ipv4(rulei, f); in mlxsw_sp_flower_parse()
377 mlxsw_sp_flower_parse_ipv6(rulei, f); in mlxsw_sp_flower_parse()
379 err = mlxsw_sp_flower_parse_ports(mlxsw_sp, rulei, f, ip_proto); in mlxsw_sp_flower_parse()
382 err = mlxsw_sp_flower_parse_tcp(mlxsw_sp, rulei, f, ip_proto); in mlxsw_sp_flower_parse()
386 err = mlxsw_sp_flower_parse_ip(mlxsw_sp, rulei, f, n_proto_key & n_proto_mask); in mlxsw_sp_flower_parse()
390 return mlxsw_sp_flower_parse_actions(mlxsw_sp, block, rulei, f->exts, in mlxsw_sp_flower_parse()
391 f->common.extack); in mlxsw_sp_flower_parse()
396 struct tc_cls_flower_offload *f) in mlxsw_sp_flower_replace() argument
404 f->common.chain_index, in mlxsw_sp_flower_replace()
409 rule = mlxsw_sp_acl_rule_create(mlxsw_sp, ruleset, f->cookie, in mlxsw_sp_flower_replace()
410 f->common.extack); in mlxsw_sp_flower_replace()
417 err = mlxsw_sp_flower_parse(mlxsw_sp, block, rulei, f); in mlxsw_sp_flower_replace()
443 struct tc_cls_flower_offload *f) in mlxsw_sp_flower_destroy() argument
449 f->common.chain_index, in mlxsw_sp_flower_destroy()
454 rule = mlxsw_sp_acl_rule_lookup(mlxsw_sp, ruleset, f->cookie); in mlxsw_sp_flower_destroy()
465 struct tc_cls_flower_offload *f) in mlxsw_sp_flower_stats() argument
475 f->common.chain_index, in mlxsw_sp_flower_stats()
480 rule = mlxsw_sp_acl_rule_lookup(mlxsw_sp, ruleset, f->cookie); in mlxsw_sp_flower_stats()
489 tcf_exts_stats_update(f->exts, bytes, packets, lastuse); in mlxsw_sp_flower_stats()
501 struct tc_cls_flower_offload *f) in mlxsw_sp_flower_tmplt_create() argument
508 err = mlxsw_sp_flower_parse(mlxsw_sp, block, &rulei, f); in mlxsw_sp_flower_tmplt_create()
512 f->common.chain_index, in mlxsw_sp_flower_tmplt_create()
522 struct tc_cls_flower_offload *f) in mlxsw_sp_flower_tmplt_destroy() argument
527 f->common.chain_index, in mlxsw_sp_flower_tmplt_destroy()