Lines Matching +full:function +full:- +full:mask
3 Copyright (c) 2013-2018, Intel Corporation
44 * i40e_align_l2obj_base - aligns base object pointer to 512 bytes
47 * Aligns the layer 2 function private memory so it's 512-byte aligned.
54 aligned_offset += (I40E_HMC_L2OBJ_BASE_ALIGNMENT - in i40e_align_l2obj_base()
61 * i40e_calculate_l2fpm_size - calculates layer 2 FPM memory size
67 * Calculates the maximum amount of memory for the function required, based
91 * i40e_init_lan_hmc - initialize i40e_hmc_info struct
98 * This function will be called once per physical function initialization.
104 * - HMC Resource Profile has been selected before calling this function.
115 hw->hmc.signature = I40E_HMC_INFO_SIGNATURE; in i40e_init_lan_hmc()
116 hw->hmc.hmc_fn_id = hw->pf_id; in i40e_init_lan_hmc()
119 ret_code = i40e_allocate_virt_mem(hw, &hw->hmc.hmc_obj_virt_mem, in i40e_init_lan_hmc()
123 hw->hmc.hmc_obj = (struct i40e_hmc_obj_info *) in i40e_init_lan_hmc()
124 hw->hmc.hmc_obj_virt_mem.va; in i40e_init_lan_hmc()
127 full_obj = &hw->hmc.hmc_obj[I40E_HMC_LAN_FULL]; in i40e_init_lan_hmc()
128 full_obj->max_cnt = 0; in i40e_init_lan_hmc()
129 full_obj->cnt = 0; in i40e_init_lan_hmc()
130 full_obj->base = 0; in i40e_init_lan_hmc()
131 full_obj->size = 0; in i40e_init_lan_hmc()
134 obj = &hw->hmc.hmc_obj[I40E_HMC_LAN_TX]; in i40e_init_lan_hmc()
135 obj->max_cnt = rd32(hw, I40E_GLHMC_LANQMAX); in i40e_init_lan_hmc()
136 obj->cnt = txq_num; in i40e_init_lan_hmc()
137 obj->base = 0; in i40e_init_lan_hmc()
139 obj->size = BIT_ULL(size_exp); in i40e_init_lan_hmc()
142 if (txq_num > obj->max_cnt) { in i40e_init_lan_hmc()
145 txq_num, obj->max_cnt, ret_code); in i40e_init_lan_hmc()
150 full_obj->max_cnt += obj->max_cnt; in i40e_init_lan_hmc()
151 full_obj->cnt += obj->cnt; in i40e_init_lan_hmc()
154 obj = &hw->hmc.hmc_obj[I40E_HMC_LAN_RX]; in i40e_init_lan_hmc()
155 obj->max_cnt = rd32(hw, I40E_GLHMC_LANQMAX); in i40e_init_lan_hmc()
156 obj->cnt = rxq_num; in i40e_init_lan_hmc()
157 obj->base = hw->hmc.hmc_obj[I40E_HMC_LAN_TX].base + in i40e_init_lan_hmc()
158 (hw->hmc.hmc_obj[I40E_HMC_LAN_TX].cnt * in i40e_init_lan_hmc()
159 hw->hmc.hmc_obj[I40E_HMC_LAN_TX].size); in i40e_init_lan_hmc()
160 obj->base = i40e_align_l2obj_base(obj->base); in i40e_init_lan_hmc()
162 obj->size = BIT_ULL(size_exp); in i40e_init_lan_hmc()
165 if (rxq_num > obj->max_cnt) { in i40e_init_lan_hmc()
168 rxq_num, obj->max_cnt, ret_code); in i40e_init_lan_hmc()
173 full_obj->max_cnt += obj->max_cnt; in i40e_init_lan_hmc()
174 full_obj->cnt += obj->cnt; in i40e_init_lan_hmc()
177 obj = &hw->hmc.hmc_obj[I40E_HMC_FCOE_CTX]; in i40e_init_lan_hmc()
178 obj->max_cnt = rd32(hw, I40E_GLHMC_FCOEMAX); in i40e_init_lan_hmc()
179 obj->cnt = fcoe_cntx_num; in i40e_init_lan_hmc()
180 obj->base = hw->hmc.hmc_obj[I40E_HMC_LAN_RX].base + in i40e_init_lan_hmc()
181 (hw->hmc.hmc_obj[I40E_HMC_LAN_RX].cnt * in i40e_init_lan_hmc()
182 hw->hmc.hmc_obj[I40E_HMC_LAN_RX].size); in i40e_init_lan_hmc()
183 obj->base = i40e_align_l2obj_base(obj->base); in i40e_init_lan_hmc()
185 obj->size = BIT_ULL(size_exp); in i40e_init_lan_hmc()
188 if (fcoe_cntx_num > obj->max_cnt) { in i40e_init_lan_hmc()
191 fcoe_cntx_num, obj->max_cnt, ret_code); in i40e_init_lan_hmc()
196 full_obj->max_cnt += obj->max_cnt; in i40e_init_lan_hmc()
197 full_obj->cnt += obj->cnt; in i40e_init_lan_hmc()
200 obj = &hw->hmc.hmc_obj[I40E_HMC_FCOE_FILT]; in i40e_init_lan_hmc()
201 obj->max_cnt = rd32(hw, I40E_GLHMC_FCOEFMAX); in i40e_init_lan_hmc()
202 obj->cnt = fcoe_filt_num; in i40e_init_lan_hmc()
203 obj->base = hw->hmc.hmc_obj[I40E_HMC_FCOE_CTX].base + in i40e_init_lan_hmc()
204 (hw->hmc.hmc_obj[I40E_HMC_FCOE_CTX].cnt * in i40e_init_lan_hmc()
205 hw->hmc.hmc_obj[I40E_HMC_FCOE_CTX].size); in i40e_init_lan_hmc()
206 obj->base = i40e_align_l2obj_base(obj->base); in i40e_init_lan_hmc()
208 obj->size = BIT_ULL(size_exp); in i40e_init_lan_hmc()
211 if (fcoe_filt_num > obj->max_cnt) { in i40e_init_lan_hmc()
214 fcoe_filt_num, obj->max_cnt, ret_code); in i40e_init_lan_hmc()
219 full_obj->max_cnt += obj->max_cnt; in i40e_init_lan_hmc()
220 full_obj->cnt += obj->cnt; in i40e_init_lan_hmc()
222 hw->hmc.first_sd_index = 0; in i40e_init_lan_hmc()
223 hw->hmc.sd_table.ref_cnt = 0; in i40e_init_lan_hmc()
226 if (NULL == hw->hmc.sd_table.sd_entry) { in i40e_init_lan_hmc()
227 hw->hmc.sd_table.sd_cnt = (u32) in i40e_init_lan_hmc()
228 (l2fpm_size + I40E_HMC_DIRECT_BP_SIZE - 1) / in i40e_init_lan_hmc()
232 ret_code = i40e_allocate_virt_mem(hw, &hw->hmc.sd_table.addr, in i40e_init_lan_hmc()
234 hw->hmc.sd_table.sd_cnt)); in i40e_init_lan_hmc()
237 hw->hmc.sd_table.sd_entry = in i40e_init_lan_hmc()
238 (struct i40e_hmc_sd_entry *)hw->hmc.sd_table.addr.va; in i40e_init_lan_hmc()
241 full_obj->size = l2fpm_size; in i40e_init_lan_hmc()
246 if (hw->hmc.hmc_obj_virt_mem.va) in i40e_init_lan_hmc()
247 i40e_free_virt_mem(hw, &hw->hmc.hmc_obj_virt_mem); in i40e_init_lan_hmc()
253 * i40e_remove_pd_page - Remove a page from the page descriptor table
258 * This function:
263 * 1. caller can deallocate the memory used by pd after this function
279 * i40e_remove_sd_bp - remove a backing page from a segment descriptor
284 * This function:
291 * function returns.
306 * i40e_create_lan_hmc_object - allocate backing store for hmc objects
330 if (NULL == info->hmc_info) { in i40e_create_lan_hmc_object()
335 if (I40E_HMC_INFO_SIGNATURE != info->hmc_info->signature) { in i40e_create_lan_hmc_object()
341 if (info->start_idx >= info->hmc_info->hmc_obj[info->rsrc_type].cnt) { in i40e_create_lan_hmc_object()
347 if ((info->start_idx + info->count) > in i40e_create_lan_hmc_object()
348 info->hmc_info->hmc_obj[info->rsrc_type].cnt) { in i40e_create_lan_hmc_object()
356 I40E_FIND_SD_INDEX_LIMIT(info->hmc_info, info->rsrc_type, in i40e_create_lan_hmc_object()
357 info->start_idx, info->count, in i40e_create_lan_hmc_object()
359 if (sd_idx >= info->hmc_info->sd_table.sd_cnt || in i40e_create_lan_hmc_object()
360 sd_lmt > info->hmc_info->sd_table.sd_cnt) { in i40e_create_lan_hmc_object()
365 I40E_FIND_PD_INDEX_LIMIT(info->hmc_info, info->rsrc_type, in i40e_create_lan_hmc_object()
366 info->start_idx, info->count, &pd_idx, in i40e_create_lan_hmc_object()
371 * size, the function will default the SD size to be 2M. in i40e_create_lan_hmc_object()
373 if (info->direct_mode_sz == 0) in i40e_create_lan_hmc_object()
376 sd_size = info->direct_mode_sz; in i40e_create_lan_hmc_object()
383 ret_code = i40e_add_sd_table_entry(hw, info->hmc_info, j, in i40e_create_lan_hmc_object()
384 info->entry_type, in i40e_create_lan_hmc_object()
388 sd_entry = &info->hmc_info->sd_table.sd_entry[j]; in i40e_create_lan_hmc_object()
389 if (I40E_SD_TYPE_PAGED == sd_entry->entry_type) { in i40e_create_lan_hmc_object()
401 info->hmc_info, in i40e_create_lan_hmc_object()
411 i40e_remove_pd_bp(hw, info->hmc_info, in i40e_create_lan_hmc_object()
412 (i - 1)); in i40e_create_lan_hmc_object()
413 i--; in i40e_create_lan_hmc_object()
417 if (!sd_entry->valid) { in i40e_create_lan_hmc_object()
418 sd_entry->valid = TRUE; in i40e_create_lan_hmc_object()
419 switch (sd_entry->entry_type) { in i40e_create_lan_hmc_object()
422 sd_entry->u.pd_table.pd_page_addr.pa, in i40e_create_lan_hmc_object()
423 j, sd_entry->entry_type); in i40e_create_lan_hmc_object()
426 I40E_SET_PF_SD_ENTRY(hw, sd_entry->u.bp.addr.pa, in i40e_create_lan_hmc_object()
427 j, sd_entry->entry_type); in i40e_create_lan_hmc_object()
440 sd_entry = &info->hmc_info->sd_table.sd_entry[j - 1]; in i40e_create_lan_hmc_object()
441 switch (sd_entry->entry_type) { in i40e_create_lan_hmc_object()
444 ((j - 1) * I40E_HMC_MAX_BP_COUNT)); in i40e_create_lan_hmc_object()
447 i40e_remove_pd_bp(hw, info->hmc_info, i); in i40e_create_lan_hmc_object()
448 i40e_remove_pd_page(hw, info->hmc_info, (j - 1)); in i40e_create_lan_hmc_object()
451 i40e_remove_sd_bp(hw, info->hmc_info, (j - 1)); in i40e_create_lan_hmc_object()
457 j--; in i40e_create_lan_hmc_object()
464 * i40e_configure_lan_hmc - prepare the HMC backing store
468 * - This function will be called once per physical function initialization.
469 * - This function will be called after i40e_init_lan_hmc() and before
476 u8 hmc_fn_id = hw->hmc.hmc_fn_id; in i40e_configure_lan_hmc()
481 info.hmc_info = &hw->hmc; in i40e_configure_lan_hmc()
484 info.direct_mode_sz = hw->hmc.hmc_obj[I40E_HMC_LAN_FULL].size; in i40e_configure_lan_hmc()
520 obj = &hw->hmc.hmc_obj[I40E_HMC_LAN_TX]; in i40e_configure_lan_hmc()
522 (u32)((obj->base & I40E_GLHMC_LANTXBASE_FPMLANTXBASE_MASK) / 512)); in i40e_configure_lan_hmc()
523 wr32(hw, I40E_GLHMC_LANTXCNT(hmc_fn_id), obj->cnt); in i40e_configure_lan_hmc()
526 obj = &hw->hmc.hmc_obj[I40E_HMC_LAN_RX]; in i40e_configure_lan_hmc()
528 (u32)((obj->base & I40E_GLHMC_LANRXBASE_FPMLANRXBASE_MASK) / 512)); in i40e_configure_lan_hmc()
529 wr32(hw, I40E_GLHMC_LANRXCNT(hmc_fn_id), obj->cnt); in i40e_configure_lan_hmc()
532 obj = &hw->hmc.hmc_obj[I40E_HMC_FCOE_CTX]; in i40e_configure_lan_hmc()
534 (u32)((obj->base & I40E_GLHMC_FCOEDDPBASE_FPMFCOEDDPBASE_MASK) / 512)); in i40e_configure_lan_hmc()
535 wr32(hw, I40E_GLHMC_FCOEDDPCNT(hmc_fn_id), obj->cnt); in i40e_configure_lan_hmc()
538 obj = &hw->hmc.hmc_obj[I40E_HMC_FCOE_FILT]; in i40e_configure_lan_hmc()
540 (u32)((obj->base & I40E_GLHMC_FCOEFBASE_FPMFCOEFBASE_MASK) / 512)); in i40e_configure_lan_hmc()
541 wr32(hw, I40E_GLHMC_FCOEFCNT(hmc_fn_id), obj->cnt); in i40e_configure_lan_hmc()
548 * i40e_delete_lan_hmc_object - remove hmc objects
552 * This will de-populate the SDs and PDs. It frees
553 * the memory for PDS and backing storage. After this function is returned,
555 * book-keeping information about PDs and backing storage.
571 if (NULL == info->hmc_info) { in i40e_delete_lan_hmc_object()
573 DEBUGOUT("i40e_delete_hmc_object: bad info->hmc_info ptr\n"); in i40e_delete_lan_hmc_object()
576 if (I40E_HMC_INFO_SIGNATURE != info->hmc_info->signature) { in i40e_delete_lan_hmc_object()
578 DEBUGOUT("i40e_delete_hmc_object: bad hmc_info->signature\n"); in i40e_delete_lan_hmc_object()
582 if (NULL == info->hmc_info->sd_table.sd_entry) { in i40e_delete_lan_hmc_object()
588 if (NULL == info->hmc_info->hmc_obj) { in i40e_delete_lan_hmc_object()
590 DEBUGOUT("i40e_delete_hmc_object: bad hmc_info->hmc_obj\n"); in i40e_delete_lan_hmc_object()
593 if (info->start_idx >= info->hmc_info->hmc_obj[info->rsrc_type].cnt) { in i40e_delete_lan_hmc_object()
600 if ((info->start_idx + info->count) > in i40e_delete_lan_hmc_object()
601 info->hmc_info->hmc_obj[info->rsrc_type].cnt) { in i40e_delete_lan_hmc_object()
608 I40E_FIND_PD_INDEX_LIMIT(info->hmc_info, info->rsrc_type, in i40e_delete_lan_hmc_object()
609 info->start_idx, info->count, &pd_idx, in i40e_delete_lan_hmc_object()
616 info->hmc_info->sd_table.sd_entry[sd_idx].entry_type) in i40e_delete_lan_hmc_object()
622 &info->hmc_info->sd_table.sd_entry[sd_idx].u.pd_table; in i40e_delete_lan_hmc_object()
623 if (pd_table->pd_entry[rel_pd_idx].valid) { in i40e_delete_lan_hmc_object()
624 ret_code = i40e_remove_pd_bp(hw, info->hmc_info, j); in i40e_delete_lan_hmc_object()
631 I40E_FIND_SD_INDEX_LIMIT(info->hmc_info, info->rsrc_type, in i40e_delete_lan_hmc_object()
632 info->start_idx, info->count, in i40e_delete_lan_hmc_object()
634 if (sd_idx >= info->hmc_info->sd_table.sd_cnt || in i40e_delete_lan_hmc_object()
635 sd_lmt > info->hmc_info->sd_table.sd_cnt) { in i40e_delete_lan_hmc_object()
641 if (!info->hmc_info->sd_table.sd_entry[i].valid) in i40e_delete_lan_hmc_object()
643 switch (info->hmc_info->sd_table.sd_entry[i].entry_type) { in i40e_delete_lan_hmc_object()
645 ret_code = i40e_remove_sd_bp(hw, info->hmc_info, i); in i40e_delete_lan_hmc_object()
650 ret_code = i40e_remove_pd_page(hw, info->hmc_info, i); in i40e_delete_lan_hmc_object()
663 * i40e_shutdown_lan_hmc - Remove HMC backing store, free allocated memory
674 info.hmc_info = &hw->hmc; in i40e_shutdown_lan_hmc()
683 i40e_free_virt_mem(hw, &hw->hmc.sd_table.addr); in i40e_shutdown_lan_hmc()
684 hw->hmc.sd_table.sd_cnt = 0; in i40e_shutdown_lan_hmc()
685 hw->hmc.sd_table.sd_entry = NULL; in i40e_shutdown_lan_hmc()
688 i40e_free_virt_mem(hw, &hw->hmc.hmc_obj_virt_mem); in i40e_shutdown_lan_hmc()
689 hw->hmc.hmc_obj = NULL; in i40e_shutdown_lan_hmc()
759 * i40e_write_byte - replace HMC context byte
768 u8 src_byte, dest_byte, mask; in i40e_write_byte() local
773 from = src + ce_info->offset; in i40e_write_byte()
775 /* prepare the bits and mask */ in i40e_write_byte()
776 shift_width = ce_info->lsb % 8; in i40e_write_byte()
777 mask = (u8)(BIT(ce_info->width) - 1); in i40e_write_byte()
780 src_byte &= mask; in i40e_write_byte()
783 mask <<= shift_width; in i40e_write_byte()
787 dest = hmc_bits + (ce_info->lsb / 8); in i40e_write_byte()
791 dest_byte &= ~mask; /* get the bits not changing */ in i40e_write_byte()
799 * i40e_write_word - replace HMC context word
808 u16 src_word, mask; in i40e_write_word() local
814 from = src + ce_info->offset; in i40e_write_word()
816 /* prepare the bits and mask */ in i40e_write_word()
817 shift_width = ce_info->lsb % 8; in i40e_write_word()
818 mask = BIT(ce_info->width) - 1; in i40e_write_word()
820 /* don't swizzle the bits until after the mask because the mask bits in i40e_write_word()
824 src_word &= mask; in i40e_write_word()
827 mask <<= shift_width; in i40e_write_word()
831 dest = hmc_bits + (ce_info->lsb / 8); in i40e_write_word()
835 dest_word &= ~(CPU_TO_LE16(mask)); /* get the bits not changing */ in i40e_write_word()
843 * i40e_write_dword - replace HMC context dword
852 u32 src_dword, mask; in i40e_write_dword() local
858 from = src + ce_info->offset; in i40e_write_dword()
860 /* prepare the bits and mask */ in i40e_write_dword()
861 shift_width = ce_info->lsb % 8; in i40e_write_dword()
867 if (ce_info->width < 32) in i40e_write_dword()
868 mask = BIT(ce_info->width) - 1; in i40e_write_dword()
870 mask = ~(u32)0; in i40e_write_dword()
872 /* don't swizzle the bits until after the mask because the mask bits in i40e_write_dword()
876 src_dword &= mask; in i40e_write_dword()
879 mask <<= shift_width; in i40e_write_dword()
883 dest = hmc_bits + (ce_info->lsb / 8); in i40e_write_dword()
887 dest_dword &= ~(CPU_TO_LE32(mask)); /* get the bits not changing */ in i40e_write_dword()
895 * i40e_write_qword - replace HMC context qword
904 u64 src_qword, mask; in i40e_write_qword() local
910 from = src + ce_info->offset; in i40e_write_qword()
912 /* prepare the bits and mask */ in i40e_write_qword()
913 shift_width = ce_info->lsb % 8; in i40e_write_qword()
919 if (ce_info->width < 64) in i40e_write_qword()
920 mask = BIT_ULL(ce_info->width) - 1; in i40e_write_qword()
922 mask = ~(u64)0; in i40e_write_qword()
924 /* don't swizzle the bits until after the mask because the mask bits in i40e_write_qword()
928 src_qword &= mask; in i40e_write_qword()
931 mask <<= shift_width; in i40e_write_qword()
935 dest = hmc_bits + (ce_info->lsb / 8); in i40e_write_qword()
939 dest_qword &= ~(CPU_TO_LE64(mask)); /* get the bits not changing */ in i40e_write_qword()
947 * i40e_read_byte - read HMC context byte into struct
956 u8 dest_byte, mask; in i40e_read_byte() local
960 /* prepare the bits and mask */ in i40e_read_byte()
961 shift_width = ce_info->lsb % 8; in i40e_read_byte()
962 mask = (u8)(BIT(ce_info->width) - 1); in i40e_read_byte()
965 mask <<= shift_width; in i40e_read_byte()
968 src = hmc_bits + (ce_info->lsb / 8); in i40e_read_byte()
972 dest_byte &= ~(mask); in i40e_read_byte()
977 target = dest + ce_info->offset; in i40e_read_byte()
984 * i40e_read_word - read HMC context word into struct
993 u16 dest_word, mask; in i40e_read_word() local
998 /* prepare the bits and mask */ in i40e_read_word()
999 shift_width = ce_info->lsb % 8; in i40e_read_word()
1000 mask = BIT(ce_info->width) - 1; in i40e_read_word()
1003 mask <<= shift_width; in i40e_read_word()
1006 src = hmc_bits + (ce_info->lsb / 8); in i40e_read_word()
1010 /* the data in the memory is stored as little endian so mask it in i40e_read_word()
1013 src_word &= ~(CPU_TO_LE16(mask)); in i40e_read_word()
1021 target = dest + ce_info->offset; in i40e_read_word()
1028 * i40e_read_dword - read HMC context dword into struct
1037 u32 dest_dword, mask; in i40e_read_dword() local
1042 /* prepare the bits and mask */ in i40e_read_dword()
1043 shift_width = ce_info->lsb % 8; in i40e_read_dword()
1049 if (ce_info->width < 32) in i40e_read_dword()
1050 mask = BIT(ce_info->width) - 1; in i40e_read_dword()
1052 mask = ~(u32)0; in i40e_read_dword()
1055 mask <<= shift_width; in i40e_read_dword()
1058 src = hmc_bits + (ce_info->lsb / 8); in i40e_read_dword()
1062 /* the data in the memory is stored as little endian so mask it in i40e_read_dword()
1065 src_dword &= ~(CPU_TO_LE32(mask)); in i40e_read_dword()
1073 target = dest + ce_info->offset; in i40e_read_dword()
1081 * i40e_read_qword - read HMC context qword into struct
1090 u64 dest_qword, mask; in i40e_read_qword() local
1095 /* prepare the bits and mask */ in i40e_read_qword()
1096 shift_width = ce_info->lsb % 8; in i40e_read_qword()
1102 if (ce_info->width < 64) in i40e_read_qword()
1103 mask = BIT_ULL(ce_info->width) - 1; in i40e_read_qword()
1105 mask = ~(u64)0; in i40e_read_qword()
1108 mask <<= shift_width; in i40e_read_qword()
1111 src = hmc_bits + (ce_info->lsb / 8); in i40e_read_qword()
1115 /* the data in the memory is stored as little endian so mask it in i40e_read_qword()
1118 src_qword &= ~(CPU_TO_LE64(mask)); in i40e_read_qword()
1126 target = dest + ce_info->offset; in i40e_read_qword()
1134 * i40e_get_hmc_context - extract HMC context bits
1169 * i40e_clear_hmc_context - zero out the HMC context bits
1179 i40e_memset(context_bytes, 0, (u32)hw->hmc.hmc_obj[hmc_type].size, in i40e_clear_hmc_context()
1186 * i40e_set_hmc_context - replace HMC context bits
1223 * i40e_hmc_get_object_va - retrieves an object's virtual address
1229 * This function retrieves the object's virtual address from the object
1230 * base pointer. This function is used for LAN Queue contexts.
1239 struct i40e_hmc_info *hmc_info = &hw->hmc; in i40e_hmc_get_object_va()
1247 if (NULL == hmc_info->hmc_obj) { in i40e_hmc_get_object_va()
1249 DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info->hmc_obj ptr\n"); in i40e_hmc_get_object_va()
1257 if (I40E_HMC_INFO_SIGNATURE != hmc_info->signature) { in i40e_hmc_get_object_va()
1259 DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info->signature\n"); in i40e_hmc_get_object_va()
1262 if (obj_idx >= hmc_info->hmc_obj[rsrc_type].cnt) { in i40e_hmc_get_object_va()
1272 sd_entry = &hmc_info->sd_table.sd_entry[sd_idx]; in i40e_hmc_get_object_va()
1273 obj_offset_in_fpm = hmc_info->hmc_obj[rsrc_type].base + in i40e_hmc_get_object_va()
1274 hmc_info->hmc_obj[rsrc_type].size * obj_idx; in i40e_hmc_get_object_va()
1276 if (I40E_SD_TYPE_PAGED == sd_entry->entry_type) { in i40e_hmc_get_object_va()
1280 pd_entry = &sd_entry->u.pd_table.pd_entry[rel_pd_idx]; in i40e_hmc_get_object_va()
1283 *object_base = (u8 *)pd_entry->bp.addr.va + obj_offset_in_pd; in i40e_hmc_get_object_va()
1287 *object_base = (u8 *)sd_entry->u.bp.addr.va + obj_offset_in_sd; in i40e_hmc_get_object_va()
1294 * i40e_get_lan_tx_queue_context - return the HMC context for the queue
1315 * i40e_clear_lan_tx_queue_context - clear the HMC context for the queue
1333 * i40e_set_lan_tx_queue_context - set the HMC context for the queue
1354 * i40e_get_lan_rx_queue_context - return the HMC context for the queue
1375 * i40e_clear_lan_rx_queue_context - clear the HMC context for the queue
1393 * i40e_set_lan_rx_queue_context - set the HMC context for the queue