Lines Matching refs:act

67 				   struct efx_tc_action_set *act, bool in_hw)  in efx_tc_free_action_set()  argument
74 efx_mae_free_action_set(efx, act->fw_id); in efx_tc_free_action_set()
78 list_del(&act->list); in efx_tc_free_action_set()
80 if (act->count) in efx_tc_free_action_set()
81 efx_tc_flower_put_counter_index(efx, act->count); in efx_tc_free_action_set()
82 kfree(act); in efx_tc_free_action_set()
89 struct efx_tc_action_set *act, *next; in efx_tc_free_action_set_list() local
98 list_for_each_entry_safe(act, next, &acts->list, list) in efx_tc_free_action_set_list()
99 efx_tc_free_action_set(efx, act, true); in efx_tc_free_action_set_list()
293 static bool efx_tc_flower_action_order_ok(const struct efx_tc_action_set *act, in efx_tc_flower_action_order_ok() argument
298 if (act->count) in efx_tc_flower_action_order_ok()
302 return !act->deliver; in efx_tc_flower_action_order_ok()
318 struct efx_tc_action_set *act = NULL; in efx_tc_flower_replace() local
388 act = kzalloc(sizeof(*act), GFP_USER); in efx_tc_flower_replace()
389 if (!act) { in efx_tc_flower_replace()
397 if (!act) { in efx_tc_flower_replace()
417 if (!efx_tc_flower_action_order_ok(act, EFX_TC_AO_COUNT)) { in efx_tc_flower_replace()
442 act->count = ctr; in efx_tc_flower_replace()
447 rc = efx_mae_alloc_action_set(efx, act); in efx_tc_flower_replace()
452 list_add_tail(&act->list, &rule->acts.list); in efx_tc_flower_replace()
453 act = NULL; /* end of the line */ in efx_tc_flower_replace()
457 save = *act; in efx_tc_flower_replace()
459 if (!efx_tc_flower_action_order_ok(act, EFX_TC_AO_DELIVER)) { in efx_tc_flower_replace()
477 act->dest_mport = rc; in efx_tc_flower_replace()
478 act->deliver = 1; in efx_tc_flower_replace()
479 rc = efx_mae_alloc_action_set(efx, act); in efx_tc_flower_replace()
484 list_add_tail(&act->list, &rule->acts.list); in efx_tc_flower_replace()
485 act = NULL; in efx_tc_flower_replace()
490 act = kzalloc(sizeof(*act), GFP_USER); in efx_tc_flower_replace()
491 if (!act) { in efx_tc_flower_replace()
495 *act = save; in efx_tc_flower_replace()
505 if (act) { in efx_tc_flower_replace()
511 efx_mae_mport_uplink(efx, &act->dest_mport); in efx_tc_flower_replace()
518 &act->dest_mport); in efx_tc_flower_replace()
519 act->deliver = 1; in efx_tc_flower_replace()
520 rc = efx_mae_alloc_action_set(efx, act); in efx_tc_flower_replace()
525 list_add_tail(&act->list, &rule->acts.list); in efx_tc_flower_replace()
526 act = NULL; /* Prevent double-free in error path */ in efx_tc_flower_replace()
554 if (act) in efx_tc_flower_replace()
555 efx_tc_free_action_set(efx, act, false); in efx_tc_flower_replace()
666 struct efx_tc_action_set *act; in efx_tc_configure_default_rule() local
671 act = kzalloc(sizeof(*act), GFP_KERNEL); in efx_tc_configure_default_rule()
672 if (!act) in efx_tc_configure_default_rule()
674 act->deliver = 1; in efx_tc_configure_default_rule()
675 act->dest_mport = eg_port; in efx_tc_configure_default_rule()
676 rc = efx_mae_alloc_action_set(efx, act); in efx_tc_configure_default_rule()
680 list_add_tail(&act->list, &acts->list); in efx_tc_configure_default_rule()
692 list_del(&act->list); in efx_tc_configure_default_rule()
693 efx_mae_free_action_set(efx, act->fw_id); in efx_tc_configure_default_rule()
695 kfree(act); in efx_tc_configure_default_rule()