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

Function ionic_cq_init

dpdk/drivers/net/ionic/ionic_dev.c:301–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301int
302ionic_cq_init(struct ionic_cq *cq, uint16_t num_descs)
303{
304 if (!rte_is_power_of_2(num_descs) ||
305 num_descs < IONIC_MIN_RING_DESC ||
306 num_descs > IONIC_MAX_RING_DESC) {
307 IONIC_PRINT(ERR, "%u descriptors (min: %u max: %u)",
308 num_descs, IONIC_MIN_RING_DESC, IONIC_MAX_RING_DESC);
309 return -EINVAL;
310 }
311
312 cq->num_descs = num_descs;
313 cq->size_mask = num_descs - 1;
314 cq->tail_idx = 0;
315 cq->done_color = 1;
316
317 return 0;
318}
319
320void
321ionic_cq_reset(struct ionic_cq *cq)

Callers 1

ionic_qcq_allocFunction · 0.85

Calls 1

rte_is_power_of_2Function · 0.50

Tested by

no test coverage detected