Posts a list of work requests (WRs) to a send queue.
Syntax
#include <rdma/verbs.h>
int ibv_post_send(struct ibv_qp *qp, struct ibv_send_wr *wr, struct ibv_send_wr **bad_wr)
Description
The ibv_post_recv() routine
posts the linked list of work requests (WRs) starting with wr to
the receive queue of the queue pair qp. The routine stops processing
WRs from the list at the first failure that can be detected immediately
while requests are being posted, and returns the failing WR through bad_wr.
The
argument wr is an ibv_send_wr struct, as defined in <rdma/verbs.h>.
RC
Transport Service Type supports following opcodes:
OPCODE |
IBV_QPT_RC |
IBV_WR_SEND |
Supported |
IBV_WR_SEND_WITH_IMM |
Supported |
IBV_WR_RDMA_WRITE |
Supported |
IBV_WR_RDMA_WRITE_WITH_IMM |
Supported |
IBV_WR_RDMA_READ |
Supported |
IBV_WR_ATOMIC_CMP_AND_SWP |
Not supported |
IBV_WR_ATOMIC_FETCH_AND_ADD |
Not supported |
The attribute send_flags describes the properties of
the WR . It is either 0 or the bitwise OR of one or more of the following
flags:
- IBV_SEND_FENCE
- Sets the fence indicator. The IBV_SEND_FENCE flag is valid only
for QPs with Transport Service Type IBV_QPT_RC.
- IBV_SEND_SIGNALED
- Sets the completion notification indicator. The IBV_SEND_SIGNALED
flag is relevant only if QP was created with sq_sig_all=0.
- IBV_SEND_SOLICITED
- Sets the solicited event indicator. The IBV_SEND_SOLICITED flag
is valid only for Send and RDMA Write with immediate.
- IBV_SEND_INLINE
- Sends data in given gather list as inline data in a send WQE.
The IBV_SEND_INLINE flag is valid only for Send and RDMA Write. The
L_Key is not checked.
Note: The buffers used by a WR can only be safely
reused after the request is complete and a work completion is retrieved
from the corresponding completion queue (CQ).
Input Parameters
qp |
Specifies the struct ibv_qp from ibv_create_qp. |
wr |
Specifies the first work request (WR). |
Output Parameter
bad_wr |
Specifies the pointer to first rejected WR. |
Return Values
0 |
On success. |
EINVAL |
Error, if qp, qp->context, wr, or wr->sg_list
is NULL. |
ENOTSUP |
Error, if wr->opcode is not one of :IBV_WR_SEND,
IBV_WR_RDMA_WRITE, or IBV_WR_RDMA_READ. |