ucs_status_ptr_t uct_rc_verbs_ep_tag_rndv_zcopy(uct_ep_h tl_ep, uct_tag_t tag, const void *header, unsigned header_length, const uct_iov_t *iov, size_t iovcnt, uct_completion_t *comp) { uct_rc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_verbs_ep_t); uct_rc_verbs_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_verbs_iface_t); void *hdr = ucs_alloca(iface->tm.rndv_hdr_size); uct_ib_device_t *dev = uct_ib_iface_device(&iface->super.super); uint32_t op_index; UCT_CHECK_PARAM_PTR(iovcnt <= 1ul, "Wrong iovcnt in uct_rc_verbs_ep_tag_rndv_zcopy %lu", iovcnt); UCT_CHECK_PARAM_PTR(header_length <= IBV_DEVICE_TM_CAPS(dev, max_rndv_priv_size), "Invalid hdr len in uct_rc_verbs_ep_tag_rndv_zcopy %u", header_length); UCT_CHECK_PARAM_PTR((header_length + iface->tm.rndv_hdr_size) <= iface->verbs_common.config.max_inline, "Invalid RTS len in uct_rc_verbs_ep_tag_rndv_zcopy %u", header_length + iface->tm.rndv_hdr_size); op_index = uct_rc_verbs_iface_tag_get_op_id(iface, comp); uct_rc_verbs_iface_fill_inl_rndv_sge(iface, hdr, tag, op_index, ((uct_ib_mem_t*)iov->memh)->mr->rkey, iov->buffer, uct_iov_get_length(iov), header, header_length); uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_am_wr, IBV_SEND_INLINE); return (ucs_status_ptr_t)((uint64_t)op_index); }
static UCS_F_ALWAYS_INLINE ucs_status_t uct_rocm_copy_ep_zcopy(uct_ep_h tl_ep, uint64_t remote_addr, const uct_iov_t *iov, int is_put) { size_t size = uct_iov_get_length(iov); if (!size) { return UCS_OK; } if (is_put) memcpy((void *)remote_addr, iov->buffer, size); else memcpy(iov->buffer, (void *)remote_addr, size); return UCS_OK; }