/* Work queue is used to submit elements (tx, rx, cmd) to hw. * Driver is the producer that advances prod_idx. cons_idx is advanced when * HW reports completions of previously submitted elements.
*/ struct hinic3_wq { struct hinic3_queue_pages qpages; /* Unmasked producer/consumer indices that are advanced to natural * integer overflow regardless of queue depth.
*/
u16 cons_idx;
u16 prod_idx;
u32 q_depth;
u16 idx_mask;
/* Work Queue (logical WQEBB array) is mapped to hw via Chip Logical * Address (CLA) using 1 of 2 levels: * level 0 - direct mapping of single wq page * level 1 - indirect mapping of multiple pages via additional page * table. * When wq uses level 1, wq_block will hold the allocated indirection * table.
*/
dma_addr_t wq_block_paddr;
__be64 *wq_block_vaddr;
} ____cacheline_aligned;
/* Get number of elements in work queue that are in-use. */ staticinline u16 hinic3_wq_get_used(conststruct hinic3_wq *wq)
{ return READ_ONCE(wq->prod_idx) - READ_ONCE(wq->cons_idx);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.