static ssize_t gnix_ep_writev(struct fid_ep *ep, const struct iovec *iov, void **desc, size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context) { struct gnix_fid_ep *gnix_ep; if (!ep || !iov || !desc || count != 1) { return -FI_EINVAL; } gnix_ep = container_of(ep, struct gnix_fid_ep, ep_fid); assert((gnix_ep->type == FI_EP_RDM) || (gnix_ep->type == FI_EP_MSG)); return _gnix_rma(gnix_ep, GNIX_FAB_RQ_RDMA_WRITE, (uint64_t)iov[0].iov_base, iov[0].iov_len, desc[0], dest_addr, addr, key, context, gnix_ep->op_flags, 0); }
static ssize_t gnix_ep_write(struct fid_ep *ep, const void *buf, size_t len, void *desc, fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context) { struct gnix_fid_ep *gnix_ep; if (!ep) { return -FI_EINVAL; } gnix_ep = container_of(ep, struct gnix_fid_ep, ep_fid); assert((gnix_ep->type == FI_EP_RDM) || (gnix_ep->type == FI_EP_MSG)); return _gnix_rma(gnix_ep, GNIX_FAB_RQ_RDMA_WRITE, (uint64_t)buf, len, desc, dest_addr, addr, key, context, gnix_ep->op_flags, 0); }
static ssize_t gnix_ep_writemsg(struct fid_ep *ep, const struct fi_msg_rma *msg, uint64_t flags) { struct gnix_fid_ep *gnix_ep; if (!ep || !msg || !msg->msg_iov || !msg->rma_iov || !msg->desc || msg->iov_count != 1 || msg->rma_iov_count != 1 || msg->rma_iov[0].len > msg->msg_iov[0].iov_len) { return -FI_EINVAL; } gnix_ep = container_of(ep, struct gnix_fid_ep, ep_fid); assert((gnix_ep->type == FI_EP_RDM) || (gnix_ep->type == FI_EP_MSG)); return _gnix_rma(gnix_ep, GNIX_FAB_RQ_RDMA_WRITE, (uint64_t)msg->msg_iov[0].iov_base, msg->msg_iov[0].iov_len, msg->desc[0], msg->addr, msg->rma_iov[0].addr, msg->rma_iov[0].key, msg->context, flags, msg->data); }
static ssize_t gnix_ep_rma_inject(struct fid_ep *ep, const void *buf, size_t len, fi_addr_t dest_addr, uint64_t addr, uint64_t key) { struct gnix_fid_ep *gnix_ep; uint64_t flags; if (!ep) { return -FI_EINVAL; } gnix_ep = container_of(ep, struct gnix_fid_ep, ep_fid); assert((gnix_ep->type == FI_EP_RDM) || (gnix_ep->type == FI_EP_MSG)); flags = gnix_ep->op_flags | FI_INJECT | GNIX_SUPPRESS_COMPLETION; return _gnix_rma(gnix_ep, GNIX_FAB_RQ_RDMA_WRITE, (uint64_t)buf, len, NULL, dest_addr, addr, key, NULL, flags, 0); }
static ssize_t gnix_ep_readv(struct fid_ep *ep, const struct iovec *iov, void **desc, size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context) { struct gnix_fid_ep *gnix_ep; uint64_t flags; if (!ep || !iov || !desc || count != 1) { return -FI_EINVAL; } gnix_ep = container_of(ep, struct gnix_fid_ep, ep_fid); assert((gnix_ep->type == FI_EP_RDM) || (gnix_ep->type == FI_EP_MSG)); flags = gnix_ep->op_flags | GNIX_RMA_READ_FLAGS_DEF; return _gnix_rma(gnix_ep, GNIX_FAB_RQ_RDMA_READ, (uint64_t)iov[0].iov_base, iov[0].iov_len, desc[0], src_addr, addr, key, context, flags, 0); }
static ssize_t gnix_ep_read(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context) { struct gnix_fid_ep *gnix_ep; uint64_t flags; if (!ep) { return -FI_EINVAL; } gnix_ep = container_of(ep, struct gnix_fid_ep, ep_fid); assert((gnix_ep->type == FI_EP_RDM) || (gnix_ep->type == FI_EP_MSG)); flags = gnix_ep->op_flags | GNIX_RMA_READ_FLAGS_DEF; return _gnix_rma(gnix_ep, GNIX_FAB_RQ_RDMA_READ, (uint64_t)buf, len, desc, src_addr, addr, key, context, flags, 0); }
static ssize_t gnix_ep_writedata(struct fid_ep *ep, const void *buf, size_t len, void *desc, uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context) { struct gnix_fid_ep *gnix_ep; uint64_t flags; if (!ep) { return -FI_EINVAL; } gnix_ep = container_of(ep, struct gnix_fid_ep, ep_fid); assert((gnix_ep->type == FI_EP_RDM) || (gnix_ep->type == FI_EP_MSG)); flags = gnix_ep->op_flags | FI_REMOTE_CQ_DATA | GNIX_RMA_WRITE_FLAGS_DEF; return _gnix_rma(gnix_ep, GNIX_FAB_RQ_RDMA_WRITE, (uint64_t)buf, len, desc, dest_addr, addr, key, context, flags, data); }