MCPcopy Create free account
hub / github.com/F-Stack/f-stack / idpf_ctlq_init

Function idpf_ctlq_init

dpdk/drivers/common/idpf/base/idpf_controlq.c:235–260  ·  view source on GitHub ↗

* idpf_ctlq_init - main initialization routine for all control queues * @hw: pointer to hardware struct * @num_q: number of queues to initialize * @q_info: array of structs containing info for each queue to be initialized * * This initializes any number and any type of control queues. This is an all * or nothing routine; if one fails, all previously allocated queues will be * destroyed. Thi

Source from the content-addressed store, hash-verified

233 * APIs.
234 */
235int idpf_ctlq_init(struct idpf_hw *hw, u8 num_q,
236 struct idpf_ctlq_create_info *q_info)
237{
238 struct idpf_ctlq_info *cq = NULL, *tmp = NULL;
239 int ret_code = 0;
240 int i = 0;
241
242 LIST_INIT(&hw->cq_list_head);
243
244 for (i = 0; i < num_q; i++) {
245 struct idpf_ctlq_create_info *qinfo = q_info + i;
246
247 ret_code = idpf_ctlq_add(hw, qinfo, &cq);
248 if (ret_code)
249 goto init_destroy_qs;
250 }
251
252 return ret_code;
253
254init_destroy_qs:
255 LIST_FOR_EACH_ENTRY_SAFE(cq, tmp, &hw->cq_list_head,
256 idpf_ctlq_info, cq_list)
257 idpf_ctlq_remove(hw, cq);
258
259 return ret_code;
260}
261
262/**
263 * idpf_ctlq_deinit - destroy all control queues

Callers 2

idpf_init_mbxFunction · 0.85
idpf_init_hwFunction · 0.85

Calls 2

idpf_ctlq_addFunction · 0.85
idpf_ctlq_removeFunction · 0.85

Tested by

no test coverage detected