ibv_post_send

Posts a list of work requests (WR) 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() function posts the linked list of work requests (WR) starting with the wr parameter to the receive queue of the queue pair qp. The function stops processing the WRs from the list after detecting the first failure while requests are being posted, and returns the failing WR by using the bad_wr parameter.

The wr argument is an ibv_send_wr struct that is defined in the <rdma/verbs.h> file.

The transport service types for the operation codes that RC supports, follow:
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 the transport service type IBV_QPT_RC.
IBV_SEND_SIGNALED
Sets the completion notification indicator. The IBV_SEND_SIGNALED flag is relevant only if QP is created with the sq_sig_all parameter equal to 0.
IBV_SEND_SOLICITED
Sets the solicited event indicator. The IBV_SEND_SOLICITED flag is valid only for send and remote device memory access (RDMA) write functions with immediate effect.
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 functions. The L_Key parameter is not verified.
Note: The buffers used by a WR can be safely reused after the request is complete. A work completion is retrieved from the corresponding completion queue (CQ).

Input Parameters

Item Descriptor
qp Specifies the ibv_qp struct for the ibv_create_qp function.
wr Specifies the first work request (WR).

Output Parameter

Item Descriptor
bad_wr Specifies the pointer to the first rejected WR.

Return Values

Item Descriptor
0 On success.
errno On failure.