Lines Matching refs:es

1589 		for (j = 0; j < hw->blk[ICE_BLK_SW].es.fvw; j++)  in ice_get_prof_index_max()
1845 for (i = 0; i < hw->blk[ICE_BLK_SW].es.fvw; i++) { in ice_get_sw_prof_type()
1948 for (j = 0; j < hw->blk[ICE_BLK_SW].es.fvw; j++) in ice_get_sw_fv_list()
1953 if (j >= hw->blk[ICE_BLK_SW].es.fvw) in ice_get_sw_fv_list()
2540 if (prof >= hw->blk[blk].es.count) in ice_find_prot_off()
2543 if (fv_idx >= hw->blk[blk].es.fvw) in ice_find_prot_off()
2546 fv_ext = hw->blk[blk].es.t + (prof * hw->blk[blk].es.fvw); in ice_find_prot_off()
2696 u16 es; /* # extraction sequence entries */ member
3081 if (hw->blk[blk].es.mask_ena[prof] & BIT(i)) in ice_prof_has_mask_idx()
3114 for (i = 0; i < hw->blk[blk].es.fvw; i++) in ice_prof_has_mask()
3133 struct ice_es *es = &hw->blk[blk].es; in ice_find_prof_id_with_mask() local
3142 for (i = 0; i < (u8)es->count; i++) { in ice_find_prof_id_with_mask()
3143 u16 off = i * es->fvw; in ice_find_prof_id_with_mask()
3145 if (memcmp(&es->t[off], fv, es->fvw * sizeof(*fv))) in ice_find_prof_id_with_mask()
3292 if (prof_id > hw->blk[blk].es.count) in ice_prof_inc_ref()
3295 hw->blk[blk].es.ref_count[prof_id]++; in ice_prof_inc_ref()
3529 mask_bm = hw->blk[blk].es.mask_ena[prof_id]; in ice_free_prof_masks()
3595 for (i = 0; i < hw->blk[blk].es.fvw; i++) in ice_update_prof_masking()
3619 hw->blk[blk].es.mask_ena[prof_id] = ena_mask; in ice_update_prof_masking()
3637 off = prof_id * hw->blk[blk].es.fvw; in ice_write_es()
3639 memset(&hw->blk[blk].es.t[off], 0, in ice_write_es()
3640 hw->blk[blk].es.fvw * sizeof(*fv)); in ice_write_es()
3641 hw->blk[blk].es.written[prof_id] = false; in ice_write_es()
3643 memcpy(&hw->blk[blk].es.t[off], fv, in ice_write_es()
3644 hw->blk[blk].es.fvw * sizeof(*fv)); in ice_write_es()
3657 if (prof_id > hw->blk[blk].es.count) in ice_prof_dec_ref()
3660 if (hw->blk[blk].es.ref_count[prof_id] > 0) { in ice_prof_dec_ref()
3661 if (!--hw->blk[blk].es.ref_count[prof_id]) { in ice_prof_dec_ref()
3791 struct ice_sw_fv_section *es; in ice_fill_tbl() local
3868 es = sect; in ice_fill_tbl()
3869 src = (u8 *)es->fv; in ice_fill_tbl()
3870 sect_len = (u32)(le16_to_cpu(es->count) * in ice_fill_tbl()
3871 hw->blk[block_id].es.fvw) * in ice_fill_tbl()
3872 sizeof(*hw->blk[block_id].es.t); in ice_fill_tbl()
3873 dst = (u8 *)hw->blk[block_id].es.t; in ice_fill_tbl()
3874 dst_len = (u32)(hw->blk[block_id].es.count * in ice_fill_tbl()
3875 hw->blk[block_id].es.fvw) * in ice_fill_tbl()
3876 sizeof(*hw->blk[block_id].es.t); in ice_fill_tbl()
3921 ice_fill_tbl(hw, blk_id, hw->blk[blk_id].es.sid); in ice_fill_blk_tbls()
3934 struct ice_es *es = &hw->blk[blk_idx].es; in ice_free_prof_map() local
3937 mutex_lock(&es->prof_map_lock); in ice_free_prof_map()
3938 list_for_each_entry_safe(del, tmp, &es->prof_map, list) { in ice_free_prof_map()
3942 INIT_LIST_HEAD(&es->prof_map); in ice_free_prof_map()
3943 mutex_unlock(&es->prof_map_lock); in ice_free_prof_map()
4004 struct ice_es *es = &hw->blk[i].es; in ice_free_hw_tbls() local
4007 mutex_destroy(&es->prof_map_lock); in ice_free_hw_tbls()
4023 devm_kfree(ice_hw_to_dev(hw), hw->blk[i].es.t); in ice_free_hw_tbls()
4024 devm_kfree(ice_hw_to_dev(hw), hw->blk[i].es.ref_count); in ice_free_hw_tbls()
4025 devm_kfree(ice_hw_to_dev(hw), hw->blk[i].es.written); in ice_free_hw_tbls()
4026 devm_kfree(ice_hw_to_dev(hw), hw->blk[i].es.mask_ena); in ice_free_hw_tbls()
4062 struct ice_es *es = &hw->blk[i].es; in ice_clear_hw_tbls() local
4085 memset(es->t, 0, es->count * sizeof(*es->t) * es->fvw); in ice_clear_hw_tbls()
4086 memset(es->ref_count, 0, es->count * sizeof(*es->ref_count)); in ice_clear_hw_tbls()
4087 memset(es->written, 0, es->count * sizeof(*es->written)); in ice_clear_hw_tbls()
4088 memset(es->mask_ena, 0, es->count * sizeof(*es->mask_ena)); in ice_clear_hw_tbls()
4108 struct ice_es *es = &hw->blk[i].es; in ice_init_hw_tbls() local
4115 mutex_init(&es->prof_map_lock); in ice_init_hw_tbls()
4116 INIT_LIST_HEAD(&es->prof_map); in ice_init_hw_tbls()
4120 es->reverse = blk_sizes[i].reverse; in ice_init_hw_tbls()
4186 es->sid = ice_blk_sids[i][ICE_SID_ES_OFF]; in ice_init_hw_tbls()
4187 es->count = blk_sizes[i].es; in ice_init_hw_tbls()
4188 es->fvw = blk_sizes[i].fvw; in ice_init_hw_tbls()
4189 es->t = devm_kcalloc(ice_hw_to_dev(hw), in ice_init_hw_tbls()
4190 (u32)(es->count * es->fvw), in ice_init_hw_tbls()
4191 sizeof(*es->t), GFP_KERNEL); in ice_init_hw_tbls()
4192 if (!es->t) in ice_init_hw_tbls()
4195 es->ref_count = devm_kcalloc(ice_hw_to_dev(hw), es->count, in ice_init_hw_tbls()
4196 sizeof(*es->ref_count), in ice_init_hw_tbls()
4198 if (!es->ref_count) in ice_init_hw_tbls()
4201 es->written = devm_kcalloc(ice_hw_to_dev(hw), es->count, in ice_init_hw_tbls()
4202 sizeof(*es->written), GFP_KERNEL); in ice_init_hw_tbls()
4203 if (!es->written) in ice_init_hw_tbls()
4206 es->mask_ena = devm_kcalloc(ice_hw_to_dev(hw), es->count, in ice_init_hw_tbls()
4207 sizeof(*es->mask_ena), GFP_KERNEL); in ice_init_hw_tbls()
4208 if (!es->mask_ena) in ice_init_hw_tbls()
4368 u16 vec_size = hw->blk[blk].es.fvw * sizeof(struct ice_fv_word); in ice_prof_bld_es()
4373 u16 off = tmp->prof_id * hw->blk[blk].es.fvw; in ice_prof_bld_es()
4379 struct_size(p, es, 1) + in ice_prof_bld_es()
4381 sizeof(p->es[0])); in ice_prof_bld_es()
4389 memcpy(p->es, &hw->blk[blk].es.t[off], vec_size); in ice_prof_bld_es()
4519 u16 es = 0; in ice_upd_prof_hw() local
4530 es++; in ice_upd_prof_hw()
4544 sects = xlt1 + xlt2 + tcam + es; in ice_upd_prof_hw()
4559 if (es) { in ice_upd_prof_hw()
4662 ice_update_fd_swap(struct ice_hw *hw, u16 prof_id, struct ice_fv_word *es) in ice_update_fd_swap() argument
4682 for (i = 0; i < hw->blk[ICE_BLK_FD].es.fvw; i++) { in ice_update_fd_swap()
4686 if (first_free == ICE_FD_FV_NOT_FOUND && es[i].prot_id != in ice_update_fd_swap()
4691 if (es[i].prot_id == ice_fd_pairs[j].prot_id && in ice_update_fd_swap()
4692 es[i].off == ice_fd_pairs[j].off) { in ice_update_fd_swap()
4720 es[first_free - k].prot_id = in ice_update_fd_swap()
4722 es[first_free - k].off = in ice_update_fd_swap()
4738 si = hw->blk[ICE_BLK_FD].es.fvw - 1; in ice_update_fd_swap()
4753 if (es[si].prot_id == ice_fd_pairs[j].prot_id && in ice_update_fd_swap()
4754 es[si].off == ice_fd_pairs[j].off) { in ice_update_fd_swap()
4775 for (j = 0; j < hw->blk[ICE_BLK_FD].es.fvw / 4; j++) { in ice_update_fd_swap()
4881 struct ice_fv_word *es, u16 *masks) in ice_add_prof() argument
4892 mutex_lock(&hw->blk[blk].es.prof_map_lock); in ice_add_prof()
4895 status = ice_find_prof_id_with_mask(hw, blk, es, masks, &prof_id); in ice_add_prof()
4909 status = ice_update_fd_swap(hw, prof_id, es); in ice_add_prof()
4918 ice_write_es(hw, blk, prof_id, es); in ice_add_prof()
4989 list_add(&prof->list, &hw->blk[blk].es.prof_map); in ice_add_prof()
4993 mutex_unlock(&hw->blk[blk].es.prof_map_lock); in ice_add_prof()
5012 list_for_each_entry(map, &hw->blk[blk].es.prof_map, list) in ice_search_prof_id()
5233 mutex_lock(&hw->blk[blk].es.prof_map_lock); in ice_rem_prof()
5253 mutex_unlock(&hw->blk[blk].es.prof_map_lock); in ice_rem_prof()
5273 mutex_lock(&hw->blk[blk].es.prof_map_lock); in ice_get_prof()
5282 if (!hw->blk[blk].es.written[map->prof_id]) { in ice_get_prof()
5299 hw->blk[blk].es.written[map->prof_id] = true; in ice_get_prof()
5305 mutex_unlock(&hw->blk[blk].es.prof_map_lock); in ice_get_prof()
5366 mutex_lock(&hw->blk[blk].es.prof_map_lock); in ice_add_prof_to_lst()
5392 mutex_unlock(&hw->blk[blk].es.prof_map_lock); in ice_add_prof_to_lst()
5631 mutex_lock(&hw->blk[blk].es.prof_map_lock); in ice_add_prof_id_vsig()
5702 mutex_unlock(&hw->blk[blk].es.prof_map_lock); in ice_add_prof_id_vsig()
5706 mutex_unlock(&hw->blk[blk].es.prof_map_lock); in ice_add_prof_id_vsig()