Direct Access Transport Library Functions
datlmrsyncrdmawrite(3DAT)
NAME
datlmrsyncrdmawrite - synchronize local memory with RDMA
write on non-coherent memory
SYNOPSIS
cc [ flag... ] file... -ldat [ library... ]
#include
DATRETURN
datlmrsyncrdmawrite (
IN DATIAHANDLE iahandle,
IN const DATLMRTRIPLET *localsegments,
IN DATVLEN numsegments
)
PARAMETERS
iahandle A handle for an open instance of the IA.
localsegments An array of buffer segments.
numsegments The number of segments in the
localsegments argument.
DESCRIPTION
The datlmrsyncrdmawrite() function makes effects of an
incoming RDMA Write operation visible to the Consumer. This
operation guarantees consistency by locally invalidating the
non-coherent cache whose buffer has been populated by remote
peer RDMA write operations.
The datlmrsyncrdmawrite() function is needed if and only
if the Provider attribute specifies that this operation is
needed after an incoming RDMA Write operation. The Consumer
must call datlmrsyncrdmawrite() before reading data from
a memory range in this region that was the target of an
incoming RDMA Write operation. The datlmrsyncrdmawrite()
function must be called after the RDMA Write operation com-
pletes, and the memory range that was modified by the RDMA
Write must be supplied by the caller in the local segments
array. After this call returns, the Consumer may safely see
the modified contents of the memory range. It is permissible
to batch synchronizations of multiple RDMA Write operations
in a single call by passing a localsegments array that
includes all modified memory ranges. The localsegments
entries need not contain the same LMR and need not be in the
same Protection Zone.
SunOS 5.11 Last change: 16 Jul 2004 1
Direct Access Transport Library Functions
datlmrsyncrdmawrite(3DAT)
The Consumer must also use datlmrsyncrdmawrite() when
performing local writes to a memory range that was or will
be the target of incoming RDMA writes. After performing the
local write, the Consumer must call
datlmrsyncrdmawrite() before the RDMA Write is ini-
tiated. Conversely, after an RDMA Write completes, the Con-
sumer must call datlmrsyncrdmawrite() before performing
a local write to the same range.
If the Provider attribute specifies that this operation is
needed and the Consumer attempts to read from a memory range
in an LMR without properly synchronizing using
datlmrsyncrdmawrite(), the returned contents are unde-
fined. If the Consumer attempts to write to a memory range
without properly synchronizing, the contents of the memory
range become undefined.
RETURN VALUES
DATSUCES The operation was successful.
DATINVALIDHANDLE The DAT handle is invalid.
DATINVALIDPARAMETER One of the parameters is invalid.
For example, the address range for
a local segment fell outside the
boundaries of the corresponding
Local Memory Region or the LMR han-
dle was invalid.
USAGE
Determining when an RDMA Write completes and determining
which memory range was modified is the Consumer's responsi-
bility. One possibility is for the RDMA Write initiator to
post a Send DTO message after each RDMA Write that identi-
fies the range in the body of the Send. The Consumer at the
target of the RDMA Write can receive the message and know
when and how to call datlmrsyncrdmawrite().
This call ensures that the Provider receives a coherent view
of the buffer contents after a subsequent remote RDMA Write
operation. After the call completes, the Consumer can be
assured that all platform-specific buffer and cache updates
have been performed, and that the LMR range has consistency
with the Provider hardware. Any subsequent read by the Con-
sumer can void this consistency. The Provider is not
required to detect such access.
SunOS 5.11 Last change: 16 Jul 2004 2
Direct Access Transport Library Functions
datlmrsyncrdmawrite(3DAT)
The action performed on the cache before the RDMA Write
depends on the cache type:
o I/O noncoherent cache will be flushed.
o CPU noncoherent cache will be invalidated.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Standard: uDAPL, 1.2
MT-Level Unsafe
SEE ALSO
datlmrsyncrdmaread(3DAT), libdat(3LIB), attributes(5)
SunOS 5.11 Last change: 16 Jul 2004 3
Direct Access Transport Library Functions
datlmrsyncrdmawrite(3DAT)
SunOS 5.11 Last change: 16 Jul 2004 4
|