Lines Matching full:rid

2076 	rcp_list->recipe_indx = params->rid;  in ice_update_recipe_lkup_idx()
2077 status = ice_aq_get_recipe(hw, rcp_list, &num_recps, params->rid, NULL); in ice_update_recipe_lkup_idx()
2080 params->rid, status); in ice_update_recipe_lkup_idx()
2099 params->rid, params->lkup_idx, params->fv_idx, in ice_update_recipe_lkup_idx()
2176 * @rid: recipe ID returned as response to AQ call
2178 int ice_alloc_recipe(struct ice_hw *hw, u16 *rid) in ice_alloc_recipe() argument
2195 *rid = le16_to_cpu(sw_buf->elem[0].e.sw_resp); in ice_alloc_recipe()
2205 * @rid: recipe ID to free
2209 static int ice_free_recipe_res(struct ice_hw *hw, u16 rid) in ice_free_recipe_res() argument
2213 status = ice_free_hw_res(hw, ICE_AQC_RES_TYPE_RECIPE, 1, &rid); in ice_free_recipe_res()
2233 u32 rid, prof; in ice_release_recipe_res() local
2236 for_each_set_bit(rid, recp->r_bitmap, ICE_MAX_NUM_RECIPES) { in ice_release_recipe_res()
2237 for_each_set_bit(prof, recipe_to_profile[rid], in ice_release_recipe_res()
2254 clear_bit(rid, profile_to_recipe[prof]); in ice_release_recipe_res()
2255 clear_bit(prof, recipe_to_profile[rid]); in ice_release_recipe_res()
2258 status = ice_free_recipe_res(hw, rid); in ice_release_recipe_res()
2262 sw->recp_list[rid].recp_created = false; in ice_release_recipe_res()
2263 sw->recp_list[rid].adv_rule = false; in ice_release_recipe_res()
2264 memset(&sw->recp_list[rid].lkup_exts, 0, in ice_release_recipe_res()
2265 sizeof(sw->recp_list[rid].lkup_exts)); in ice_release_recipe_res()
2266 clear_bit(rid, recp->r_bitmap); in ice_release_recipe_res()
2305 * @rid: recipe ID that we are populating
2314 ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid, in ice_get_recp_frm_fw() argument
2332 tmp[0].recipe_indx = rid; in ice_get_recp_frm_fw()
2333 status = ice_aq_get_recipe(hw, tmp, &num_recps, rid, NULL); in ice_get_recp_frm_fw()
2351 /* Start populating all the entries for recps[rid] based on lkups from in ice_get_recp_frm_fw()
2355 lkup_exts = &recps[rid].lkup_exts; in ice_get_recp_frm_fw()
2364 is_root = root_bufs.content.rid & ICE_AQ_RECIPE_ID_IS_ROOT; in ice_get_recp_frm_fw()
2371 /* get the first profile that is associated with rid */ in ice_get_recp_frm_fw()
2423 recps[idx].root_rid = root_bufs.content.rid & in ice_get_recp_frm_fw()
2432 bitmap_copy(recps[rid].res_idxs, result_bm, ICE_MAX_FV_WORDS); in ice_get_recp_frm_fw()
2434 recps[rid].recp_created = true; in ice_get_recp_frm_fw()
5018 static void fill_recipe_template(struct ice_aqc_recipe_data_elem *recp, u16 rid, in fill_recipe_template() argument
5023 recp->recipe_indx = rid; in fill_recipe_template()
5031 set_bit(rid, (unsigned long *)recp->recipe_bitmap); in fill_recipe_template()
5072 u16 free_res_idx, rid; in ice_add_sw_recipe() local
5111 status = ice_alloc_recipe(hw, &rid); in ice_add_sw_recipe()
5115 fill_recipe_template(&buf[i], rid, rm); in ice_add_sw_recipe()
5133 set_bit(rid, rm->r_bitmap); in ice_add_sw_recipe()
5145 recipe = &hw->switch_info->recp_list[rid]; in ice_add_sw_recipe()
5151 status = ice_alloc_recipe(hw, &rid); in ice_add_sw_recipe()
5155 recipe = &hw->switch_info->recp_list[rid]; in ice_add_sw_recipe()
5157 fill_recipe_template(root, rid, rm); in ice_add_sw_recipe()
5159 /* Set recipe association, use previously set bitmap and own rid */ in ice_add_sw_recipe()
5160 set_bit(rid, rm->r_bitmap); in ice_add_sw_recipe()
5163 /* For non-root recipes rid should be 0, for root it should be correct in ice_add_sw_recipe()
5164 * rid value ored with 0x80 (is root bit). in ice_add_sw_recipe()
5166 root->content.rid = rid | ICE_AQ_RECIPE_ID_IS_ROOT; in ice_add_sw_recipe()
5195 rm->root_rid = rid; in ice_add_sw_recipe()
5196 bookkeep_recipe(&hw->switch_info->recp_list[rid], root, rm); in ice_add_sw_recipe()
5259 * @rid: recipe ID to subscribe to
5263 static int ice_subscribe_recipe(struct ice_hw *hw, u16 rid) in ice_subscribe_recipe() argument
5277 sw_buf->elem[0].e.sw_resp = cpu_to_le16(rid); in ice_subscribe_recipe()
5288 * @rid: recipe ID to subscribe to
5290 static void ice_subscribable_recp_shared(struct ice_hw *hw, u16 rid) in ice_subscribable_recp_shared() argument
5295 for_each_set_bit(sub_rid, recps[rid].r_bitmap, ICE_MAX_NUM_RECIPES) in ice_subscribable_recp_shared()
5306 * @rid: return the recipe ID of the recipe created
5310 u16 lkups_cnt, struct ice_adv_rule_info *rinfo, u16 *rid) in ice_add_adv_recipe() argument
5394 *rid = ice_find_recp(hw, lkup_exts, rinfo, true); in ice_add_adv_recipe()
5395 if (*rid < ICE_MAX_NUM_RECIPES) { in ice_add_adv_recipe()
5398 ice_subscribable_recp_shared(hw, *rid); in ice_add_adv_recipe()
5446 *rid = rm->root_rid; in ice_add_adv_recipe()
5447 memcpy(&hw->switch_info->recp_list[*rid].lkup_exts, lkup_exts, in ice_add_adv_recipe()
6053 u16 rid = 0, i, rule_buf_sz, vsi_handle; in ice_add_adv_rule() local
6119 status = ice_add_adv_recipe(hw, lkups, lkups_cnt, rinfo, &rid); in ice_add_adv_rule()
6122 m_entry = ice_find_adv_rule_entry(hw, lkups, lkups_cnt, rid, rinfo); in ice_add_adv_rule()
6136 added_entry->rid = rid; in ice_add_adv_rule()
6213 s_rule->recipe_id = cpu_to_le16(rid); in ice_add_adv_rule()
6255 sw->recp_list[rid].adv_rule = true; in ice_add_adv_rule()
6256 rule_head = &sw->recp_list[rid].filt_rules; in ice_add_adv_rule()
6264 added_entry->rid = rid; in ice_add_adv_rule()
6455 u16 i, rid, vsi_handle; in ice_rem_adv_rule() local
6470 rid = ice_find_recp(hw, &lkup_exts, rinfo, false); in ice_rem_adv_rule()
6472 if (rid == ICE_MAX_NUM_RECIPES) in ice_rem_adv_rule()
6475 rule_lock = &hw->switch_info->recp_list[rid].filt_rule_lock; in ice_rem_adv_rule()
6476 list_elem = ice_find_adv_rule_entry(hw, lkups, lkups_cnt, rid, rinfo); in ice_rem_adv_rule()
6521 if (list_empty(&r_list[rid].filt_rules)) { in ice_rem_adv_rule()
6522 r_list[rid].adv_rule = false; in ice_rem_adv_rule()
6527 &r_list[rid]); in ice_rem_adv_rule()
6554 if (!sw->recp_list[remove_entry->rid].recp_created) in ice_rem_adv_rule_by_id()
6556 list_head = &sw->recp_list[remove_entry->rid].filt_rules; in ice_rem_adv_rule_by_id()