Lines Matching refs:fco

77 		NL_SET_ERR_MSG_MOD(st->fco->common.extack,  in sparx5_tc_flower_es0_tpid()
155 NL_SET_ERR_MSG_MOD(st->fco->common.extack, "ip_proto parse error"); in sparx5_tc_flower_handler_basic_usage()
162 struct netlink_ext_ack *extack = st->fco->common.extack; in sparx5_tc_flower_handler_control_usage()
214 NL_SET_ERR_MSG_MOD(st->fco->common.extack, in sparx5_tc_flower_handler_cvlan_usage()
275 NL_SET_ERR_MSG_MOD(st->fco->common.extack, in sparx5_tc_use_dissectors()
285 struct flow_cls_offload *fco, in sparx5_tc_flower_action_check() argument
288 struct flow_rule *rule = flow_cls_offload_flow_rule(fco); in sparx5_tc_flower_action_check()
295 NL_SET_ERR_MSG_MOD(fco->common.extack, "No actions"); in sparx5_tc_flower_action_check()
299 if (!flow_action_basic_hw_stats_check(act, fco->common.extack)) in sparx5_tc_flower_action_check()
304 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_flower_action_check()
317 if (!vcap_is_next_lookup(vctrl, fco->common.chain_index, in sparx5_tc_flower_action_check()
319 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_flower_action_check()
323 } else if (!vcap_is_last_chain(vctrl, fco->common.chain_index, in sparx5_tc_flower_action_check()
325 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_flower_action_check()
333 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_flower_action_check()
340 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_flower_action_check()
347 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_flower_action_check()
354 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_flower_action_check()
490 struct flow_cls_offload *fco, in sparx5_tc_add_rule_copy() argument
538 vcap_set_tc_exterr(fco, vrule); in sparx5_tc_add_rule_copy()
553 struct flow_cls_offload *fco, in sparx5_tc_add_remaining_rules() argument
564 err = sparx5_tc_add_rule_copy(vctrl, fco, erule, admin, in sparx5_tc_add_remaining_rules()
837 struct flow_cls_offload *fco) in sparx5_tc_action_trap() argument
871 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_action_trap()
881 struct flow_cls_offload *fco, in sparx5_tc_action_vlan_pop() argument
890 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_action_vlan_pop()
903 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_action_vlan_pop()
912 struct flow_cls_offload *fco, in sparx5_tc_action_vlan_modify() argument
927 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_action_vlan_modify()
944 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_action_vlan_modify()
982 struct flow_cls_offload *fco, in sparx5_tc_action_vlan_push() argument
993 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_action_vlan_push()
999 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_action_vlan_push()
1004 err = sparx5_tc_action_vlan_modify(admin, vrule, fco, act, act_tpid); in sparx5_tc_action_vlan_push()
1023 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_action_vlan_push()
1042 struct flow_cls_offload *fco, in sparx5_tc_action_mirred() argument
1049 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_action_mirred()
1066 struct flow_cls_offload *fco, in sparx5_tc_action_redirect() argument
1073 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_action_redirect()
1137 struct flow_cls_offload *fco, in sparx5_tc_flower_use_template() argument
1145 if (ftp->cid != fco->common.chain_index) in sparx5_tc_flower_use_template()
1156 struct flow_cls_offload *fco, in sparx5_tc_flower_replace() argument
1161 struct netlink_ext_ack *extack = fco->common.extack; in sparx5_tc_flower_replace()
1164 .fco = fco, in sparx5_tc_flower_replace()
1180 err = sparx5_tc_flower_action_check(vctrl, ndev, fco, ingress); in sparx5_tc_flower_replace()
1184 vrule = vcap_alloc_rule(vctrl, ndev, fco->common.chain_index, VCAP_USER_TC, in sparx5_tc_flower_replace()
1185 fco->common.prio, 0); in sparx5_tc_flower_replace()
1189 vrule->cookie = fco->cookie; in sparx5_tc_flower_replace()
1192 state.frule = flow_cls_offload_flow_rule(fco); in sparx5_tc_flower_replace()
1202 fco->common.chain_index); in sparx5_tc_flower_replace()
1206 frule = flow_cls_offload_flow_rule(fco); in sparx5_tc_flower_replace()
1230 err = sparx5_tc_action_trap(admin, vrule, fco); in sparx5_tc_flower_replace()
1235 err = sparx5_tc_action_mirred(admin, vrule, fco, act); in sparx5_tc_flower_replace()
1240 err = sparx5_tc_action_redirect(admin, vrule, fco, act); in sparx5_tc_flower_replace()
1254 fco->common.chain_index, in sparx5_tc_flower_replace()
1258 err = sparx5_tc_action_vlan_pop(admin, vrule, fco, in sparx5_tc_flower_replace()
1264 err = sparx5_tc_action_vlan_push(admin, vrule, fco, in sparx5_tc_flower_replace()
1270 err = sparx5_tc_action_vlan_modify(admin, vrule, fco, in sparx5_tc_flower_replace()
1276 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_flower_replace()
1291 if (!sparx5_tc_flower_use_template(ndev, fco, admin, vrule)) { in sparx5_tc_flower_replace()
1295 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_flower_replace()
1304 vcap_set_tc_exterr(fco, vrule); in sparx5_tc_flower_replace()
1309 NL_SET_ERR_MSG_MOD(fco->common.extack, in sparx5_tc_flower_replace()
1313 err = sparx5_tc_add_remaining_rules(vctrl, fco, vrule, admin, in sparx5_tc_flower_replace()
1378 struct flow_cls_offload *fco, in sparx5_tc_flower_destroy() argument
1387 rule_id = vcap_lookup_rule_by_cookie(vctrl, fco->cookie); in sparx5_tc_flower_destroy()
1412 struct flow_cls_offload *fco, in sparx5_tc_flower_stats() argument
1422 err = vcap_get_rule_count_by_cookie(vctrl, &ctr, fco->cookie); in sparx5_tc_flower_stats()
1425 flow_stats_update(&fco->stats, 0x0, ctr.value, 0, lastused, in sparx5_tc_flower_stats()
1431 struct flow_cls_offload *fco, in sparx5_tc_flower_template_create() argument
1436 .fco = fco, in sparx5_tc_flower_template_create()
1453 count = vcap_admin_rule_count(admin, fco->common.chain_index); in sparx5_tc_flower_template_create()
1464 ftp->cid = fco->common.chain_index; in sparx5_tc_flower_template_create()
1469 vrule = vcap_alloc_rule(vctrl, ndev, fco->common.chain_index, in sparx5_tc_flower_template_create()
1470 VCAP_USER_TC, fco->common.prio, 0); in sparx5_tc_flower_template_create()
1477 state.frule = flow_cls_offload_flow_rule(fco); in sparx5_tc_flower_template_create()
1500 sparx5_vcap_set_port_keyset(ndev, admin, fco->common.chain_index, in sparx5_tc_flower_template_create()
1521 struct flow_cls_offload *fco, in sparx5_tc_flower_template_destroy() argument
1530 if (ftp->cid != fco->common.chain_index) in sparx5_tc_flower_template_destroy()
1534 fco->common.chain_index, in sparx5_tc_flower_template_destroy()
1544 int sparx5_tc_flower(struct net_device *ndev, struct flow_cls_offload *fco, in sparx5_tc_flower() argument
1554 admin = vcap_find_admin(vctrl, fco->common.chain_index); in sparx5_tc_flower()
1556 NL_SET_ERR_MSG_MOD(fco->common.extack, "Invalid chain"); in sparx5_tc_flower()
1560 switch (fco->command) { in sparx5_tc_flower()
1562 return sparx5_tc_flower_replace(ndev, fco, admin, ingress); in sparx5_tc_flower()
1564 return sparx5_tc_flower_destroy(ndev, fco, admin); in sparx5_tc_flower()
1566 return sparx5_tc_flower_stats(ndev, fco, admin); in sparx5_tc_flower()
1568 return sparx5_tc_flower_template_create(ndev, fco, admin); in sparx5_tc_flower()
1570 return sparx5_tc_flower_template_destroy(ndev, fco, admin); in sparx5_tc_flower()