static UCS_CLASS_INIT_FUNC(uct_rc_mlx5_ep_t, uct_iface_h tl_iface) { uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_iface, uct_rc_mlx5_iface_t); ucs_status_t status; UCS_CLASS_CALL_SUPER_INIT(uct_rc_ep_t, &iface->super); status = uct_ib_mlx5_txwq_init(iface->super.super.super.worker, &self->tx.wq, self->super.txqp.qp); if (status != UCS_OK) { ucs_error("Failed to get mlx5 QP information"); return status; } self->qp_num = self->super.txqp.qp->qp_num; self->tx.wq.bb_max = ucs_min(self->tx.wq.bb_max, iface->tx.bb_max); uct_rc_txqp_available_set(&self->super.txqp, self->tx.wq.bb_max); uct_worker_progress_register(iface->super.super.super.worker, uct_rc_mlx5_iface_progress, iface); return UCS_OK; }
static ucs_status_t uct_dc_mlx5_iface_init_dcis(uct_dc_mlx5_iface_t *iface) { ucs_status_t status; uint16_t bb_max; int i; bb_max = 0; for (i = 0; i < iface->super.tx.ndci; i++) { status = uct_ib_mlx5_txwq_init(iface->super.super.super.super.worker, &iface->dci_wqs[i], iface->super.tx.dcis[i].txqp.qp); if (status != UCS_OK) { return status; } bb_max = iface->dci_wqs[i].bb_max; uct_rc_txqp_available_set(&iface->super.tx.dcis[i].txqp, bb_max); } iface->super.super.config.tx_qp_len = bb_max; return UCS_OK; }