Lines Matching refs:wc

77 static inline void smc_wr_tx_process_cqe(struct ib_wc *wc)  in smc_wr_tx_process_cqe()  argument
83 link = wc->qp->qp_context; in smc_wr_tx_process_cqe()
85 if (wc->opcode == IB_WC_REG_MR) { in smc_wr_tx_process_cqe()
86 if (wc->status) in smc_wr_tx_process_cqe()
94 pnd_snd_idx = smc_wr_tx_find_pending_index(link, wc->wr_id); in smc_wr_tx_process_cqe()
97 link->wr_tx_v2_pend->wr_id != wc->wr_id) in smc_wr_tx_process_cqe()
99 link->wr_tx_v2_pend->wc_status = wc->status; in smc_wr_tx_process_cqe()
107 link->wr_tx_pends[pnd_snd_idx].wc_status = wc->status; in smc_wr_tx_process_cqe()
121 if (wc->status) { in smc_wr_tx_process_cqe()
132 pnd_snd.handler(&pnd_snd.priv, link, wc->status); in smc_wr_tx_process_cqe()
139 struct ib_wc wc[SMC_WR_MAX_POLL_CQE]; in smc_wr_tx_tasklet_fn() local
146 memset(&wc, 0, sizeof(wc)); in smc_wr_tx_tasklet_fn()
147 rc = ib_poll_cq(dev->roce_cq_send, SMC_WR_MAX_POLL_CQE, wc); in smc_wr_tx_tasklet_fn()
156 smc_wr_tx_process_cqe(&wc[i]); in smc_wr_tx_tasklet_fn()
431 static inline void smc_wr_rx_demultiplex(struct ib_wc *wc) in smc_wr_rx_demultiplex() argument
433 struct smc_link *link = (struct smc_link *)wc->qp->qp_context; in smc_wr_rx_demultiplex()
439 if (wc->byte_len < sizeof(*wr_rx)) in smc_wr_rx_demultiplex()
441 temp_wr_id = wc->wr_id; in smc_wr_rx_demultiplex()
446 handler->handler(wc, wr_rx); in smc_wr_rx_demultiplex()
450 static inline void smc_wr_rx_process_cqes(struct ib_wc wc[], int num) in smc_wr_rx_process_cqes() argument
456 link = wc[i].qp->qp_context; in smc_wr_rx_process_cqes()
457 link->wr_rx_id_compl = wc[i].wr_id; in smc_wr_rx_process_cqes()
458 if (wc[i].status == IB_WC_SUCCESS) { in smc_wr_rx_process_cqes()
460 smc_wr_rx_demultiplex(&wc[i]); in smc_wr_rx_process_cqes()
464 switch (wc[i].status) { in smc_wr_rx_process_cqes()
483 struct ib_wc wc[SMC_WR_MAX_POLL_CQE]; in smc_wr_rx_tasklet_fn() local
490 memset(&wc, 0, sizeof(wc)); in smc_wr_rx_tasklet_fn()
491 rc = ib_poll_cq(dev->roce_cq_recv, SMC_WR_MAX_POLL_CQE, wc); in smc_wr_rx_tasklet_fn()
499 smc_wr_rx_process_cqes(&wc[0], rc); in smc_wr_rx_tasklet_fn()