• Home
  • Raw
  • Download

Lines Matching full:rid

689 	struct efx_tc_recirc_id *rid, *old;  in efx_tc_get_recirc_id()  local
692 rid = kzalloc(sizeof(*rid), GFP_USER); in efx_tc_get_recirc_id()
693 if (!rid) in efx_tc_get_recirc_id()
695 rid->chain_index = chain_index; in efx_tc_get_recirc_id()
700 rid->net_dev = net_dev; in efx_tc_get_recirc_id()
702 &rid->linkage, in efx_tc_get_recirc_id()
706 kfree(rid); in efx_tc_get_recirc_id()
712 rid = old; in efx_tc_get_recirc_id()
717 &rid->linkage, in efx_tc_get_recirc_id()
719 kfree(rid); in efx_tc_get_recirc_id()
722 rid->fw_id = rc; in efx_tc_get_recirc_id()
723 refcount_set(&rid->ref, 1); in efx_tc_get_recirc_id()
725 return rid; in efx_tc_get_recirc_id()
728 static void efx_tc_put_recirc_id(struct efx_nic *efx, struct efx_tc_recirc_id *rid) in efx_tc_put_recirc_id() argument
730 if (!refcount_dec_and_test(&rid->ref)) in efx_tc_put_recirc_id()
732 rhashtable_remove_fast(&efx->tc->recirc_ht, &rid->linkage, in efx_tc_put_recirc_id()
734 ida_free(&efx->tc->recirc_ida, rid->fw_id); in efx_tc_put_recirc_id()
735 kfree(rid); in efx_tc_put_recirc_id()
744 if (rule->match.rid) in efx_tc_delete_rule()
745 efx_tc_put_recirc_id(efx, rule->match.rid); in efx_tc_delete_rule()
890 struct efx_tc_recirc_id *rid; in efx_tc_flower_handle_lhs_actions() local
903 rid = efx_tc_get_recirc_id(efx, fa->chain_index, in efx_tc_flower_handle_lhs_actions()
905 if (IS_ERR(rid)) { in efx_tc_flower_handle_lhs_actions()
907 return PTR_ERR(rid); in efx_tc_flower_handle_lhs_actions()
909 act->rid = rid; in efx_tc_flower_handle_lhs_actions()
980 if (act->rid) in efx_tc_flower_release_lhs_actions()
981 efx_tc_put_recirc_id(efx, act->rid); in efx_tc_flower_release_lhs_actions()
1391 struct efx_tc_recirc_id *rid; in efx_tc_flower_replace_foreign() local
1393 rid = efx_tc_get_recirc_id(efx, tc->common.chain_index, net_dev); in efx_tc_flower_replace_foreign()
1394 if (IS_ERR(rid)) { in efx_tc_flower_replace_foreign()
1398 return PTR_ERR(rid); in efx_tc_flower_replace_foreign()
1400 match.rid = rid; in efx_tc_flower_replace_foreign()
1401 match.value.recirc_id = rid->fw_id; in efx_tc_flower_replace_foreign()
1657 if (match.rid) in efx_tc_flower_replace_foreign()
1658 efx_tc_put_recirc_id(efx, match.rid); in efx_tc_flower_replace_foreign()
1810 * Conveniently, match.rid == NULL and match.value.recirc_id == 0 owing in efx_tc_flower_replace()
1814 struct efx_tc_recirc_id *rid; in efx_tc_flower_replace() local
1826 rid = efx_tc_get_recirc_id(efx, tc->common.chain_index, in efx_tc_flower_replace()
1828 if (IS_ERR(rid)) { in efx_tc_flower_replace()
1832 return PTR_ERR(rid); in efx_tc_flower_replace()
1834 match.rid = rid; in efx_tc_flower_replace()
1835 match.value.recirc_id = rid->fw_id; in efx_tc_flower_replace()
2212 if (match.rid) in efx_tc_flower_replace()
2213 efx_tc_put_recirc_id(efx, match.rid); in efx_tc_flower_replace()
2610 struct efx_tc_recirc_id *rid = ptr; in efx_tc_recirc_free() local
2613 WARN_ON(refcount_read(&rid->ref)); in efx_tc_recirc_free()
2614 ida_free(&efx->tc->recirc_ida, rid->fw_id); in efx_tc_recirc_free()
2615 kfree(rid); in efx_tc_recirc_free()