Lines Matching defs:rm

5077  * @rm: recipe management list entry
5081 ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm,
5105 free_res_idx, rm->n_grp_count);
5107 if (rm->n_grp_count > 1) {
5108 if (rm->n_grp_count > free_res_idx)
5111 rm->n_grp_count++;
5114 if (rm->n_grp_count > ICE_MAX_CHAIN_RECIPE)
5121 buf = devm_kcalloc(ice_hw_to_dev(hw), rm->n_grp_count, sizeof(*buf),
5128 bitmap_zero(rm->r_bitmap, ICE_MAX_NUM_RECIPES);
5139 list_for_each_entry(entry, &rm->rg_list, l_entry) {
5178 if (rm->n_grp_count > 1) {
5203 content->act_ctrl_fwd_priority = rm->priority;
5205 if (rm->need_pass_l2)
5208 if (rm->allow_pass_l2)
5213 if (rm->n_grp_count == 1) {
5214 rm->root_rid = buf[0].recipe_indx;
5215 set_bit(buf[0].recipe_indx, rm->r_bitmap);
5216 buf[0].content.rid = rm->root_rid | ICE_AQ_RECIPE_ID_IS_ROOT;
5217 if (sizeof(buf[0].recipe_bitmap) >= sizeof(rm->r_bitmap)) {
5218 memcpy(buf[0].recipe_bitmap, rm->r_bitmap,
5235 buf[0].content.act_ctrl_fwd_priority = rm->priority;
5274 set_bit(rid, rm->r_bitmap);
5279 list_for_each_entry(entry, &rm->rg_list, l_entry) {
5283 set_bit(entry->rid, rm->r_bitmap);
5285 list_add(&last_chain_entry->l_entry, &rm->rg_list);
5287 sizeof(rm->r_bitmap)) {
5288 memcpy(buf[recps].recipe_bitmap, rm->r_bitmap,
5294 content->act_ctrl_fwd_priority = rm->priority;
5297 rm->root_rid = (u8)rid;
5303 status = ice_aq_add_recipe(hw, buf, rm->n_grp_count, NULL);
5311 list_for_each_entry(entry, &rm->rg_list, l_entry) {
5318 for (idx = 0; idx < rm->n_grp_count; idx++)
5330 is_root = (rm->root_rid == entry->rid);
5334 recp->big_recp = (is_root && rm->n_grp_count > 1);
5352 &sw->recp_list[rm->root_rid]);
5357 recp->n_grp_count = rm->n_grp_count;
5358 recp->tun_type = rm->tun_type;
5359 recp->need_pass_l2 = rm->need_pass_l2;
5360 recp->allow_pass_l2 = rm->allow_pass_l2;
5363 rm->root_buf = buf;
5377 * @rm: recipe management list entry
5381 ice_create_recipe_group(struct ice_hw *hw, struct ice_sw_recipe *rm,
5387 rm->n_grp_count = 0;
5393 &rm->rg_list, &recp_count);
5395 rm->n_grp_count += recp_count;
5396 rm->n_ext_words = lkup_exts->n_val_words;
5397 memcpy(&rm->ext_words, lkup_exts->fv_words,
5398 sizeof(rm->ext_words));
5399 memcpy(rm->word_masks, lkup_exts->field_mask,
5400 sizeof(rm->word_masks));
5514 struct ice_sw_recipe *rm;
5544 rm = kzalloc(sizeof(*rm), GFP_KERNEL);
5545 if (!rm) {
5553 INIT_LIST_HEAD(&rm->fv_list);
5554 INIT_LIST_HEAD(&rm->rg_list);
5562 status = ice_get_sw_fv_list(hw, lkup_exts, fv_bitmap, &rm->fv_list);
5569 status = ice_create_recipe_group(hw, rm, lkup_exts);
5574 rm->priority = (u8)rinfo->priority;
5576 rm->need_pass_l2 = rinfo->need_pass_l2;
5577 rm->allow_pass_l2 = rinfo->allow_pass_l2;
5582 status = ice_fill_fv_word_index(hw, &rm->fv_list, &rm->rg_list);
5588 list_for_each_entry(fvit, &rm->fv_list, list_entry) {
5603 rm->tun_type = rinfo->tun_type;
5605 status = ice_add_sw_recipe(hw, rm, profiles);
5612 list_for_each_entry(fvit, &rm->fv_list, list_entry) {
5623 bitmap_or(r_bitmap, r_bitmap, rm->r_bitmap,
5642 for_each_set_bit(j, rm->r_bitmap, ICE_MAX_NUM_RECIPES)
5646 *rid = rm->root_rid;
5653 for_each_set_bit(rid_tmp, rm->r_bitmap, ICE_MAX_NUM_RECIPES) {
5655 clear_bit(rid_tmp, rm->r_bitmap);
5660 list_for_each_entry_safe(r_entry, r_tmp, &rm->rg_list, l_entry) {
5665 list_for_each_entry_safe(fvit, tmp, &rm->fv_list, list_entry) {
5670 devm_kfree(ice_hw_to_dev(hw), rm->root_buf);
5671 kfree(rm);