static UCS_F_ALWAYS_INLINE void uct_ud_mlx5_post_send(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, struct mlx5_wqe_ctrl_seg *ctrl, unsigned wqe_size) { uct_ib_mlx5_set_ctrl_seg(ctrl, iface->tx.wq.sw_pi, MLX5_OPCODE_SEND, 0, iface->super.qp->qp_num, uct_ud_mlx5_tx_moderation(iface), wqe_size); uct_ib_mlx5_set_dgram_seg((struct mlx5_wqe_datagram_seg *)(ctrl+1), &ep->av, 0); uct_ib_mlx5_log_tx(&iface->super.super, IBV_QPT_UD, ctrl, iface->tx.wq.qstart, iface->tx.wq.qend, NULL); iface->super.tx.available -= uct_ib_mlx5_post_send(&iface->tx.wq, ctrl, wqe_size); ucs_assert((int16_t)iface->tx.wq.bb_max >= iface->super.tx.available); }
static UCS_F_ALWAYS_INLINE void uct_rc_mlx5_post_send(uct_rc_mlx5_ep_t *ep, struct mlx5_wqe_ctrl_seg *ctrl, uint8_t opcode, uint8_t opmod, unsigned sig_flag, unsigned wqe_size) { uint16_t posted; uct_ib_mlx5_set_ctrl_seg(ctrl, ep->tx.wq.sw_pi, opcode, opmod, ep->qp_num, sig_flag, wqe_size); uct_ib_mlx5_log_tx(ucs_derived_of(ep->super.super.super.iface, uct_ib_iface_t), IBV_QPT_RC, ctrl, ep->tx.wq.qstart, ep->tx.wq.qend, (opcode == MLX5_OPCODE_SEND) ? uct_rc_ep_am_packet_dump : NULL); posted = uct_ib_mlx5_post_send(&ep->tx.wq, ctrl, wqe_size); ep->super.available -= posted; uct_rc_ep_tx_posted(&ep->super, sig_flag & MLX5_WQE_CTRL_CQ_UPDATE); }