hwc_cq
struct hwc_cq *hwc_cq = ctx;
WARN_ON_ONCE(hwc_cq->gdma_cq != q_self);
completions = hwc_cq->comp_buf;
comp_read = mana_gd_poll_cq(q_self, completions, hwc_cq->queue_depth);
WARN_ON_ONCE(comp_read <= 0 || comp_read > hwc_cq->queue_depth);
hwc_cq->tx_event_handler(hwc_cq->tx_event_ctx,
hwc_cq->rx_event_handler(hwc_cq->rx_event_ctx,
static void mana_hwc_destroy_cq(struct gdma_context *gc, struct hwc_cq *hwc_cq)
kfree(hwc_cq->comp_buf);
if (hwc_cq->gdma_cq)
mana_gd_destroy_queue(gc, hwc_cq->gdma_cq);
if (hwc_cq->gdma_eq)
mana_gd_destroy_queue(gc, hwc_cq->gdma_eq);
kfree(hwc_cq);
void *tx_ev_ctx, struct hwc_cq **hwc_cq_ptr)
struct hwc_cq *hwc_cq;
hwc_cq = kzalloc_obj(*hwc_cq);
if (!hwc_cq)
hwc_cq->gdma_eq = eq;
err = mana_hwc_create_gdma_cq(hwc, cq_size, hwc_cq, mana_hwc_comp_event,
hwc_cq->gdma_cq = cq;
hwc_cq->hwc = hwc;
hwc_cq->comp_buf = comp_buf;
hwc_cq->queue_depth = q_depth;
hwc_cq->rx_event_handler = rx_ev_hdlr;
hwc_cq->rx_event_ctx = rx_ev_ctx;
hwc_cq->tx_event_handler = tx_ev_hdlr;
hwc_cq->tx_event_ctx = tx_ev_ctx;
*hwc_cq_ptr = hwc_cq;
mana_hwc_destroy_cq(hwc->gdma_dev->gdma_context, hwc_cq);
u32 max_msg_size, struct hwc_cq *hwc_cq,
hwc_wq->hwc_cq = hwc_cq;
tx_oob->vscq_id = hwc_txq->hwc_cq->gdma_cq->id;
struct hwc_cq *hwc_cq;
struct hwc_cq *cq;