rdma_post_sendv

Posts a work request to send a message.

Syntax

#include <rdma/rdma_cma.h>
int rdma_post_sendv (struct rdma_cm_id *id, void *context, struct ibv_sge *slg, int nsge, 
int flags);           

Description

Posts a work request to the send queue of the queue pair that is associated with the rdma_cm_id identified. The contents of the posted buffer are sent to the remote peer of a connection.

Notes: You must make sure that the remote peer posts a receive request before processing the send operations. If the send request is using inline data, the message buffer must be registered before being posted with themr parameter by specifying the registration. The buffer must remain registered until the send operation is completed. The send operation cannot be posted to an rdma_cm_id identifier or the corresponding queue pair until the send operation is connected. The user-defined context that is associated with the send request is returned to the user by using the work completionwr_id identifier, the work request identifier, and the work request identifier field.

Parameters

Item Description
context Specifies the user-defined context that is associated with the request.
flags Specifies the optional flags that are used to control the send operation.
id Specifies a reference to a communication identifier where the message buffer is posted.
nsge Specifies the number of scatter-gather entries in the slg array.
slg Specifies a scatter-gather list of memory buffers that is posted as a single request.

Return Values

Returns 0 on success, or -1 on error. If an error occurs, the errno is set to indicate the reason for failure.