Lines Matching refs:sw_buf
154 struct ice_aqc_alloc_free_res_elem *sw_buf; in ice_alloc_rss_global_lut() local
158 buf_len = ice_struct_size(sw_buf, elem, 1); in ice_alloc_rss_global_lut()
159 sw_buf = (struct ice_aqc_alloc_free_res_elem *)ice_malloc(hw, buf_len); in ice_alloc_rss_global_lut()
160 if (!sw_buf) in ice_alloc_rss_global_lut()
163 sw_buf->num_elems = CPU_TO_LE16(1); in ice_alloc_rss_global_lut()
164 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_GLOBAL_RSS_HASH | in ice_alloc_rss_global_lut()
168 status = ice_aq_alloc_free_res(hw, 1, sw_buf, buf_len, ice_aqc_opc_alloc_res, NULL); in ice_alloc_rss_global_lut()
175 *global_lut_id = LE16_TO_CPU(sw_buf->elem[0].e.sw_resp); in ice_alloc_rss_global_lut()
178 ice_free(hw, sw_buf); in ice_alloc_rss_global_lut()
189 struct ice_aqc_alloc_free_res_elem *sw_buf; in ice_free_rss_global_lut() local
193 buf_len = ice_struct_size(sw_buf, elem, num_elems); in ice_free_rss_global_lut()
194 sw_buf = (struct ice_aqc_alloc_free_res_elem *)ice_malloc(hw, buf_len); in ice_free_rss_global_lut()
195 if (!sw_buf) in ice_free_rss_global_lut()
198 sw_buf->num_elems = CPU_TO_LE16(num_elems); in ice_free_rss_global_lut()
199 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_GLOBAL_RSS_HASH); in ice_free_rss_global_lut()
200 sw_buf->elem[0].e.sw_resp = CPU_TO_LE16(global_lut_id); in ice_free_rss_global_lut()
202 status = ice_aq_alloc_free_res(hw, num_elems, sw_buf, buf_len, ice_aqc_opc_free_res, NULL); in ice_free_rss_global_lut()
207 ice_free(hw, sw_buf); in ice_free_rss_global_lut()
225 struct ice_aqc_alloc_free_res_elem *sw_buf; in ice_alloc_sw() local
230 buf_len = ice_struct_size(sw_buf, elem, 1); in ice_alloc_sw()
231 sw_buf = (struct ice_aqc_alloc_free_res_elem *)ice_malloc(hw, buf_len); in ice_alloc_sw()
232 if (!sw_buf) in ice_alloc_sw()
240 sw_buf->num_elems = CPU_TO_LE16(1); in ice_alloc_sw()
241 sw_buf->res_type = in ice_alloc_sw()
246 status = ice_aq_alloc_free_res(hw, 1, sw_buf, buf_len, in ice_alloc_sw()
252 sw_ele = &sw_buf->elem[0]; in ice_alloc_sw()
289 ice_free(hw, sw_buf); in ice_alloc_sw()
307 struct ice_aqc_alloc_free_res_elem *sw_buf, *counter_buf; in ice_free_sw() local
311 buf_len = ice_struct_size(sw_buf, elem, 1); in ice_free_sw()
312 sw_buf = (struct ice_aqc_alloc_free_res_elem *)ice_malloc(hw, buf_len); in ice_free_sw()
313 if (!sw_buf) in ice_free_sw()
321 sw_buf->num_elems = CPU_TO_LE16(1); in ice_free_sw()
322 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_SWID); in ice_free_sw()
323 sw_buf->elem[0].e.sw_resp = CPU_TO_LE16(sw_id); in ice_free_sw()
325 ret_status = ice_aq_alloc_free_res(hw, 1, sw_buf, buf_len, in ice_free_sw()
335 ice_free(hw, sw_buf); in ice_free_sw()
355 ice_free(hw, sw_buf); in ice_free_sw()
894 struct ice_aqc_alloc_free_res_elem *sw_buf; in ice_aq_alloc_free_vsi_list() local
899 buf_len = ice_struct_size(sw_buf, elem, 1); in ice_aq_alloc_free_vsi_list()
900 sw_buf = (struct ice_aqc_alloc_free_res_elem *)ice_malloc(hw, buf_len); in ice_aq_alloc_free_vsi_list()
901 if (!sw_buf) in ice_aq_alloc_free_vsi_list()
903 sw_buf->num_elems = CPU_TO_LE16(1); in ice_aq_alloc_free_vsi_list()
913 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_VSI_LIST_REP); in ice_aq_alloc_free_vsi_list()
915 sw_buf->res_type = in ice_aq_alloc_free_vsi_list()
923 sw_buf->elem[0].e.sw_resp = CPU_TO_LE16(*vsi_list_id); in ice_aq_alloc_free_vsi_list()
925 status = ice_aq_alloc_free_res(hw, 1, sw_buf, buf_len, opc, NULL); in ice_aq_alloc_free_vsi_list()
930 vsi_ele = &sw_buf->elem[0]; in ice_aq_alloc_free_vsi_list()
935 ice_free(hw, sw_buf); in ice_aq_alloc_free_vsi_list()
2861 struct ice_aqc_alloc_free_res_elem *sw_buf; in ice_alloc_res_lg_act() local
2873 buf_len = ice_struct_size(sw_buf, elem, 1); in ice_alloc_res_lg_act()
2874 sw_buf = (struct ice_aqc_alloc_free_res_elem *)ice_malloc(hw, buf_len); in ice_alloc_res_lg_act()
2875 if (!sw_buf) in ice_alloc_res_lg_act()
2878 sw_buf->res_type = CPU_TO_LE16(res_type); in ice_alloc_res_lg_act()
2879 sw_buf->num_elems = CPU_TO_LE16(1); in ice_alloc_res_lg_act()
2881 status = ice_aq_alloc_free_res(hw, 1, sw_buf, buf_len, in ice_alloc_res_lg_act()
2884 *l_id = LE16_TO_CPU(sw_buf->elem[0].e.sw_resp); in ice_alloc_res_lg_act()
2886 ice_free(hw, sw_buf); in ice_alloc_res_lg_act()