Lines Matching refs:entry
3387 struct flow_action_entry *entry; in tc_cleanup_flow_action() local
3390 flow_action_for_each(i, entry, flow_action) in tc_cleanup_flow_action()
3391 if (entry->destructor) in tc_cleanup_flow_action()
3392 entry->destructor(entry->destructor_priv); in tc_cleanup_flow_action()
3396 static void tcf_mirred_get_dev(struct flow_action_entry *entry, in tcf_mirred_get_dev() argument
3400 entry->dev = act->ops->get_dev(act, &entry->destructor); in tcf_mirred_get_dev()
3401 if (!entry->dev) in tcf_mirred_get_dev()
3403 entry->destructor_priv = entry->dev; in tcf_mirred_get_dev()
3414 static int tcf_tunnel_encap_get_tunnel(struct flow_action_entry *entry, in tcf_tunnel_encap_get_tunnel() argument
3417 entry->tunnel = tcf_tunnel_info_copy(act); in tcf_tunnel_encap_get_tunnel()
3418 if (!entry->tunnel) in tcf_tunnel_encap_get_tunnel()
3420 entry->destructor = tcf_tunnel_encap_put_tunnel; in tcf_tunnel_encap_get_tunnel()
3421 entry->destructor_priv = entry->tunnel; in tcf_tunnel_encap_get_tunnel()
3425 static void tcf_sample_get_group(struct flow_action_entry *entry, in tcf_sample_get_group() argument
3429 entry->sample.psample_group = in tcf_sample_get_group()
3430 act->ops->get_psample_group(act, &entry->destructor); in tcf_sample_get_group()
3431 entry->destructor_priv = entry->sample.psample_group; in tcf_sample_get_group()
3449 struct flow_action_entry *entry; in tc_setup_flow_action() local
3451 entry = &flow_action->entries[j]; in tc_setup_flow_action()
3453 entry->id = FLOW_ACTION_ACCEPT; in tc_setup_flow_action()
3455 entry->id = FLOW_ACTION_DROP; in tc_setup_flow_action()
3457 entry->id = FLOW_ACTION_TRAP; in tc_setup_flow_action()
3459 entry->id = FLOW_ACTION_GOTO; in tc_setup_flow_action()
3460 entry->chain_index = tcf_gact_goto_chain_index(act); in tc_setup_flow_action()
3462 entry->id = FLOW_ACTION_REDIRECT; in tc_setup_flow_action()
3463 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3465 entry->id = FLOW_ACTION_MIRRED; in tc_setup_flow_action()
3466 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3468 entry->id = FLOW_ACTION_REDIRECT_INGRESS; in tc_setup_flow_action()
3469 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3471 entry->id = FLOW_ACTION_MIRRED_INGRESS; in tc_setup_flow_action()
3472 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3476 entry->id = FLOW_ACTION_VLAN_PUSH; in tc_setup_flow_action()
3477 entry->vlan.vid = tcf_vlan_push_vid(act); in tc_setup_flow_action()
3478 entry->vlan.proto = tcf_vlan_push_proto(act); in tc_setup_flow_action()
3479 entry->vlan.prio = tcf_vlan_push_prio(act); in tc_setup_flow_action()
3482 entry->id = FLOW_ACTION_VLAN_POP; in tc_setup_flow_action()
3485 entry->id = FLOW_ACTION_VLAN_MANGLE; in tc_setup_flow_action()
3486 entry->vlan.vid = tcf_vlan_push_vid(act); in tc_setup_flow_action()
3487 entry->vlan.proto = tcf_vlan_push_proto(act); in tc_setup_flow_action()
3488 entry->vlan.prio = tcf_vlan_push_prio(act); in tc_setup_flow_action()
3495 entry->id = FLOW_ACTION_TUNNEL_ENCAP; in tc_setup_flow_action()
3496 err = tcf_tunnel_encap_get_tunnel(entry, act); in tc_setup_flow_action()
3500 entry->id = FLOW_ACTION_TUNNEL_DECAP; in tc_setup_flow_action()
3505 entry->id = FLOW_ACTION_MANGLE; in tc_setup_flow_action()
3508 entry->id = FLOW_ACTION_ADD; in tc_setup_flow_action()
3514 entry->mangle.htype = tcf_pedit_htype(act, k); in tc_setup_flow_action()
3515 entry->mangle.mask = tcf_pedit_mask(act, k); in tc_setup_flow_action()
3516 entry->mangle.val = tcf_pedit_val(act, k); in tc_setup_flow_action()
3517 entry->mangle.offset = tcf_pedit_offset(act, k); in tc_setup_flow_action()
3518 entry = &flow_action->entries[++j]; in tc_setup_flow_action()
3521 entry->id = FLOW_ACTION_CSUM; in tc_setup_flow_action()
3522 entry->csum_flags = tcf_csum_update_flags(act); in tc_setup_flow_action()
3524 entry->id = FLOW_ACTION_MARK; in tc_setup_flow_action()
3525 entry->mark = tcf_skbedit_mark(act); in tc_setup_flow_action()
3527 entry->id = FLOW_ACTION_SAMPLE; in tc_setup_flow_action()
3528 entry->sample.trunc_size = tcf_sample_trunc_size(act); in tc_setup_flow_action()
3529 entry->sample.truncate = tcf_sample_truncate(act); in tc_setup_flow_action()
3530 entry->sample.rate = tcf_sample_rate(act); in tc_setup_flow_action()
3531 tcf_sample_get_group(entry, act); in tc_setup_flow_action()
3533 entry->id = FLOW_ACTION_POLICE; in tc_setup_flow_action()
3534 entry->police.burst = tcf_police_tcfp_burst(act); in tc_setup_flow_action()
3535 entry->police.rate_bytes_ps = in tc_setup_flow_action()
3538 entry->id = FLOW_ACTION_CT; in tc_setup_flow_action()
3539 entry->ct.action = tcf_ct_action(act); in tc_setup_flow_action()
3540 entry->ct.zone = tcf_ct_zone(act); in tc_setup_flow_action()
3544 entry->id = FLOW_ACTION_MPLS_PUSH; in tc_setup_flow_action()
3545 entry->mpls_push.proto = tcf_mpls_proto(act); in tc_setup_flow_action()
3546 entry->mpls_push.label = tcf_mpls_label(act); in tc_setup_flow_action()
3547 entry->mpls_push.tc = tcf_mpls_tc(act); in tc_setup_flow_action()
3548 entry->mpls_push.bos = tcf_mpls_bos(act); in tc_setup_flow_action()
3549 entry->mpls_push.ttl = tcf_mpls_ttl(act); in tc_setup_flow_action()
3552 entry->id = FLOW_ACTION_MPLS_POP; in tc_setup_flow_action()
3553 entry->mpls_pop.proto = tcf_mpls_proto(act); in tc_setup_flow_action()
3556 entry->id = FLOW_ACTION_MPLS_MANGLE; in tc_setup_flow_action()
3557 entry->mpls_mangle.label = tcf_mpls_label(act); in tc_setup_flow_action()
3558 entry->mpls_mangle.tc = tcf_mpls_tc(act); in tc_setup_flow_action()
3559 entry->mpls_mangle.bos = tcf_mpls_bos(act); in tc_setup_flow_action()
3560 entry->mpls_mangle.ttl = tcf_mpls_ttl(act); in tc_setup_flow_action()
3566 entry->id = FLOW_ACTION_PTYPE; in tc_setup_flow_action()
3567 entry->ptype = tcf_skbedit_ptype(act); in tc_setup_flow_action()