rdma_post_read
Posts a work request for RDMA read operation.
Syntax
Description
Posts a work request to the
send queue of the queue pair that is associated with the rdma_cm_id
identifier.
The contents of the remote memory region are read into the local data
buffer.
Notes: The remote and local data buffers must
be registered before running the read operation, and the buffers must
be registered until the read operation is completed. The read operation
does not post the work request to an rdma_cm_id
identifier
or to the corresponding queue pair until it is connected. The user-defined
context that is associated with the read request is returned by using
the work completion wr_id
identifier and the work
request identifier field.
Parameters
Item | Description |
---|---|
addr | Specifies the address of the local destination of the read request. |
context | Specifies the user-defined context that is associated with the request. |
flags | Specifies the optional flags that are used to control the read operation. |
id | Specifies a reference to a communication identifier where the request is posted. |
rkey | Specifies the registered memory key that is associated with the remote address. |
length | Specifies the length of the read operation. |
mr | Specifies the registered memory region that is associated with the local buffer. |
remote_addr | Specifies the address of the remote registered memory to read the address. |
Return Values
Returns 0 on success, or -1 on error. If an error occurs, the errno is set to indicate the reason for failure.