INDEndpoint::Read Method

Initiates an RDMA Read request.

Syntax

HRESULT Read(
  [in]       ND_RESULT *pResult,
  [in, out]  ND_SGE *pSgl,
  [in]       SIZE_T nSge,
  [in]       const ND_MW_DESCRIPTOR *pRemoteMwDescriptor,
  [in]       ULONGLONG Offset,
  [in]       DWORD Flags
);

Parameters

  • pResult [in]
    An ND_RESULT structure which will receive the status of the request. The status is set to one of the following status codes:

    ND_SUCCESS

    ND_LOCAL_LENGTH

    ND_ACCESS_VIOLATION

    ND_CANCELED

    ND_INVALID_REQUEST

    ND_FAILURE

    ND_TIMEOUT

    ND_REMOTE_ERROR

pSgl [in, out]

A list of ND_SGE structures that will receive the data that is read from the memory window. The length of all the scatter/gather entry buffers in the list determines how much data is read from the memory window. The length of all the buffers has to be less than or equal to the size of the memory window minus the Offset value.

May be NULL if nSge is zero. You can use a zero byte RDMA read to detect if the target hardware is working.

nSge [in]

The number of entries in the scatter/gather list. May be zero.

pRemoteMwDescriptor [in]

An ND_MW_DESCRIPTOR structure that describes the memory window on the remote peer from which to read.

Offset [in]

Zero-based offset into the memory window at which the read operation begins.

Flags [in]

The following flags control the behavior of the Read request. You can specify one or both of the following flags:

Value Meaning
ND_OP_FLAG_SILENT_SUCCESS 0x00000001

The successful completion of the request does not generate a completion in the outbound completion queue. However, requests that fail will generate a completion in the completion queue.

ND_OP_FLAG_READ_FENCE 0x00000002

All prior Read requests must be complete before the hardware begins processing this request.

 

Return Value

When you implement this method, you should return the following return values. If you return others, try to use well-known values to aid in debugging issues.

Return code Description
ND_SUCCESS

The operation succeeded. Completion status will be returned through the outbound completion queue associated with this endpoint.

ND_CONNECTION_INVALID

The endpoint is not connected.

ND_BUFFER_OVERFLOW

The request referenced more data than is supported by the underlying hardware.

ND_NO_MORE_ENTRIES

The request would have exceeded the number of outbound requests allowed on this endpoint. The nOutboundEntries parameter of the INDConnector::CreateEndpoint method specifies the limit.

ND_DATA_OVERRUN

The number of scatter/gather entries in the scatter/gather list exceeded the number allowed on this endpoint. The nOutboundSge parameter of the INDConnector::CreateEndpoint method specifies the limit.

ND_REMOTE_ERROR

The request tried to read beyond the size of the memory window.

 

Remarks

You can read the data into a single scatter/gather entry, however, you could read the data into multiple entries. For example, you could use multiple entries to read message headers into one entry and the payload into the other.

Requirements

Product

Microsoft Message Passing Interface (MS-MPI)

Header

Ndspi.h

See Also

INDEndpoint

 

 

Send comments about this topic to Microsoft

Build date: 7/2/2010