Lines Matching refs:sw_buf

150 	struct ice_aqc_alloc_free_res_elem *sw_buf;  in ice_alloc_rss_global_lut()  local
154 buf_len = ice_struct_size(sw_buf, elem, 1); in ice_alloc_rss_global_lut()
155 sw_buf = (struct ice_aqc_alloc_free_res_elem *)ice_malloc(hw, buf_len); in ice_alloc_rss_global_lut()
156 if (!sw_buf) in ice_alloc_rss_global_lut()
159 sw_buf->num_elems = CPU_TO_LE16(1); in ice_alloc_rss_global_lut()
160 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_GLOBAL_RSS_HASH | in ice_alloc_rss_global_lut()
164 status = ice_aq_alloc_free_res(hw, 1, sw_buf, buf_len, ice_aqc_opc_alloc_res, NULL); in ice_alloc_rss_global_lut()
171 *global_lut_id = LE16_TO_CPU(sw_buf->elem[0].e.sw_resp); in ice_alloc_rss_global_lut()
174 ice_free(hw, sw_buf); in ice_alloc_rss_global_lut()
185 struct ice_aqc_alloc_free_res_elem *sw_buf; in ice_free_rss_global_lut() local
189 buf_len = ice_struct_size(sw_buf, elem, num_elems); in ice_free_rss_global_lut()
190 sw_buf = (struct ice_aqc_alloc_free_res_elem *)ice_malloc(hw, buf_len); in ice_free_rss_global_lut()
191 if (!sw_buf) in ice_free_rss_global_lut()
194 sw_buf->num_elems = CPU_TO_LE16(num_elems); in ice_free_rss_global_lut()
195 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_GLOBAL_RSS_HASH); in ice_free_rss_global_lut()
196 sw_buf->elem[0].e.sw_resp = CPU_TO_LE16(global_lut_id); in ice_free_rss_global_lut()
198 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()
203 ice_free(hw, sw_buf); in ice_free_rss_global_lut()
221 struct ice_aqc_alloc_free_res_elem *sw_buf; in ice_alloc_sw() local
226 buf_len = ice_struct_size(sw_buf, elem, 1); in ice_alloc_sw()
227 sw_buf = (struct ice_aqc_alloc_free_res_elem *)ice_malloc(hw, buf_len); in ice_alloc_sw()
228 if (!sw_buf) in ice_alloc_sw()
236 sw_buf->num_elems = CPU_TO_LE16(1); in ice_alloc_sw()
237 sw_buf->res_type = in ice_alloc_sw()
242 status = ice_aq_alloc_free_res(hw, 1, sw_buf, buf_len, in ice_alloc_sw()
248 sw_ele = &sw_buf->elem[0]; in ice_alloc_sw()
285 ice_free(hw, sw_buf); in ice_alloc_sw()
303 struct ice_aqc_alloc_free_res_elem *sw_buf, *counter_buf; in ice_free_sw() local
307 buf_len = ice_struct_size(sw_buf, elem, 1); in ice_free_sw()
308 sw_buf = (struct ice_aqc_alloc_free_res_elem *)ice_malloc(hw, buf_len); in ice_free_sw()
309 if (!sw_buf) in ice_free_sw()
317 sw_buf->num_elems = CPU_TO_LE16(1); in ice_free_sw()
318 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_SWID); in ice_free_sw()
319 sw_buf->elem[0].e.sw_resp = CPU_TO_LE16(sw_id); in ice_free_sw()
321 ret_status = ice_aq_alloc_free_res(hw, 1, sw_buf, buf_len, in ice_free_sw()
331 ice_free(hw, sw_buf); in ice_free_sw()
351 ice_free(hw, sw_buf); in ice_free_sw()
843 struct ice_aqc_alloc_free_res_elem *sw_buf; in ice_aq_alloc_free_vsi_list() local
848 buf_len = ice_struct_size(sw_buf, elem, 1); in ice_aq_alloc_free_vsi_list()
849 sw_buf = (struct ice_aqc_alloc_free_res_elem *)ice_malloc(hw, buf_len); in ice_aq_alloc_free_vsi_list()
850 if (!sw_buf) in ice_aq_alloc_free_vsi_list()
852 sw_buf->num_elems = CPU_TO_LE16(1); in ice_aq_alloc_free_vsi_list()
861 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_VSI_LIST_REP); in ice_aq_alloc_free_vsi_list()
863 sw_buf->res_type = in ice_aq_alloc_free_vsi_list()
871 sw_buf->elem[0].e.sw_resp = CPU_TO_LE16(*vsi_list_id); in ice_aq_alloc_free_vsi_list()
873 status = ice_aq_alloc_free_res(hw, 1, sw_buf, buf_len, opc, NULL); in ice_aq_alloc_free_vsi_list()
878 vsi_ele = &sw_buf->elem[0]; in ice_aq_alloc_free_vsi_list()
883 ice_free(hw, sw_buf); in ice_aq_alloc_free_vsi_list()
3754 struct ice_aqc_alloc_free_res_elem *sw_buf; in ice_alloc_res_lg_act() local
3762 buf_len = ice_struct_size(sw_buf, elem, 1); in ice_alloc_res_lg_act()
3763 sw_buf = (struct ice_aqc_alloc_free_res_elem *)ice_malloc(hw, buf_len); in ice_alloc_res_lg_act()
3764 if (!sw_buf) in ice_alloc_res_lg_act()
3767 sw_buf->num_elems = CPU_TO_LE16(1); in ice_alloc_res_lg_act()
3777 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_WIDE_TABLE_1); in ice_alloc_res_lg_act()
3779 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_WIDE_TABLE_2); in ice_alloc_res_lg_act()
3781 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_WIDE_TABLE_4); in ice_alloc_res_lg_act()
3783 status = ice_aq_alloc_free_res(hw, 1, sw_buf, buf_len, in ice_alloc_res_lg_act()
3786 *l_id = LE16_TO_CPU(sw_buf->elem[0].e.sw_resp); in ice_alloc_res_lg_act()
3788 ice_free(hw, sw_buf); in ice_alloc_res_lg_act()