static int sock_cq_report_context(struct sock_cq *cq, fi_addr_t addr, struct sock_pe_entry *pe_entry) { struct fi_cq_entry cq_entry; cq_entry.op_context = (void *) (uintptr_t) pe_entry->context; return _sock_cq_write(cq, addr, &cq_entry, sizeof(cq_entry)); }
static int sock_cq_report_msg(struct sock_cq *cq, fi_addr_t addr, struct sock_pe_entry *pe_entry) { struct fi_cq_msg_entry cq_entry; cq_entry.op_context = (void *) (uintptr_t) pe_entry->context; cq_entry.flags = pe_entry->flags; cq_entry.len = pe_entry->data_len; return _sock_cq_write(cq, addr, &cq_entry, sizeof(cq_entry)); }
ssize_t sock_cq_write(struct fid_cq *cq, const void *buf, size_t len) { struct sock_cq *sock_cq; sock_cq = container_of(cq, struct sock_cq, cq_fid); if(!(sock_cq->attr.flags & FI_WRITE)) return -FI_EINVAL; return _sock_cq_write(sock_cq, FI_ADDR_UNSPEC, buf, len); }
static int sock_cq_report_data(struct sock_cq *cq, fi_addr_t addr, struct sock_pe_entry *pe_entry) { struct fi_cq_data_entry cq_entry; cq_entry.op_context = (void *) (uintptr_t) pe_entry->context; cq_entry.flags = sock_cq_sanitize_flags(pe_entry->flags); cq_entry.len = pe_entry->data_len; cq_entry.buf = (void *) (uintptr_t) pe_entry->buf; cq_entry.data = pe_entry->data; return _sock_cq_write(cq, addr, &cq_entry, sizeof(cq_entry)); }
static int sock_cq_report_data(struct sock_cq *cq, fi_addr_t addr, struct sock_pe_entry *pe_entry) { struct fi_cq_data_entry cq_entry; cq_entry.op_context = (void*)pe_entry->context; cq_entry.flags = pe_entry->flags; cq_entry.len = pe_entry->done_len; cq_entry.buf = (void*)pe_entry->rx.rx_iov[0].iov.addr; cq_entry.data = pe_entry->data; return _sock_cq_write(cq, addr, &cq_entry, sizeof(cq_entry)); }
static int sock_cq_report_tagged(struct sock_cq *cq, fi_addr_t addr, struct sock_pe_entry *pe_entry) { struct fi_cq_tagged_entry cq_entry; cq_entry.op_context = (void *) (uintptr_t) pe_entry->context; cq_entry.flags = pe_entry->flags; cq_entry.len = pe_entry->data_len; cq_entry.buf = (void *) (uintptr_t) pe_entry->buf; cq_entry.data = pe_entry->data; cq_entry.tag = pe_entry->tag; return _sock_cq_write(cq, addr, &cq_entry, sizeof(cq_entry)); }