summaryrefslogtreecommitdiff
path: root/usr/src/man/man3dat/dat_ep_post_rdma_write.3dat
blob: a088bb789f6dabaef55ac9dfe89284cea34f2c86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
'\" te
.\" This manual page is derived from the DAT/uDAPL 1.2 specification.
.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH DAT_EP_POST_RDMA_WRITE 3DAT "Jul 16, 2004"
.SH NAME
dat_ep_post_rdma_write \- write all data to the remote data buffer
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-ldat\fR [ \fIlibrary\fR\&.\|.\|. ]
#include <\fBdat/udat.h\fR>

DAT_RETURN
    dat_ep_post_rdma_read (
    IN    DAT_EP_HANDLE        ep_handle,
    IN    DAT_COUNT            num_segments,
    IN    DAT_LMR_TRIPLET      *local_iov,
    IN    DAT_DTO_COOKIE       user_cookie,
    IN    DAT_RMR_TRIPLET      *remote_buffer,
    IN    DAT_COMPLETION_FLAGS completion_flags
    )
.fi

.SH PARAMETERS
.sp
.ne 2
.na
\fB\fIep_handle\fR\fR
.ad
.RS 20n
Handle for an instance of the Endpoint.
.RE

.sp
.ne 2
.na
\fB\fInum_segments\fR\fR
.ad
.RS 20n
Number of \fIlmr_triplets\fR in \fIlocal_iov\fR.
.RE

.sp
.ne 2
.na
\fB\fIlocal_iov\fR\fR
.ad
.RS 20n
I/O Vector that specifies the local buffer from which the data is transferred.
.RE

.sp
.ne 2
.na
\fB\fIuser_cookie\fR\fR
.ad
.RS 20n
User-provided cookie that is returned to the Consumer at the completion of the
RDMA Write.
.RE

.sp
.ne 2
.na
\fB\fIremote_buffer\fR\fR
.ad
.RS 20n
A pointer to an RMR Triplet that specifies the remote buffer from which the
data is read.
.RE

.sp
.ne 2
.na
\fB\fIcompletion_flags\fR\fR
.ad
.RS 20n
Flags for posted RDMA read. The default \fBDAT_COMPLETION_DEFAULT_FLAG\fR is
0x00. Other values are as follows:
.sp
.ne 2
.na
\fBCompletion Suppression\fR
.ad
.RS 30n
\fBDAT_COMPLETION_SUPPRESS_FLAG\fR
.sp
.ne 2
.na
\fB0x01\fR
.ad
.RS 8n
Suppress successful Completion.
.RE

.RE

.sp
.ne 2
.na
\fBNotification of Completion\fR
.ad
.RS 30n
\fB\fR\fBDAT_COMPLETION_UNSIGNALLED_FLAG\fR
.sp
.ne 2
.na
\fB0x04\fR
.ad
.RS 8n
Non-notification completion. Local Endpoint must be configured for Notification
Suppression.
.RE

.RE

.sp
.ne 2
.na
\fBBarrier Fence\fR
.ad
.RS 30n
\fB\fR\fBDAT_COMPLETION_BARRIER_FENCE_FLAG\fR
.sp
.ne 2
.na
\fB0x08\fR
.ad
.RS 8n
Request for Barrier Fence.
.RE

.RE

.RE

.SH DESCRIPTION
.sp
.LP
The \fBdat_ep_post_rdma_write()\fR function requests the transfer of all the
data specified by the \fIlocal_iov\fR over the connection of the
\fIep_handle\fR Endpoint into the \fIremote_buffer\fR.
.sp
.LP
The \fInum_segments\fR parameter specifies the number of segments in the
\fIlocal_iov\fR. The \fIlocal_iov\fR segments are traversed in the I/O Vector
order until all the data is transferred.
.sp
.LP
A Consumer must not modify the \fIlocal_iov\fR or its content until the DTO is
completed. When a Consumer does not adhere to this rule, the behavior of the
Provider and the underlying Transport is not defined. Providers that allow
Consumers to get ownership of the \fIlocal_iov\fR but not the memory it
specifies back after the \fBdat_ep_post_rdma_write()\fR returns should document
this behavior and also specify its support in Provider attributes. This
behavior allows Consumers full control of the \fIlocal_iov\fR after
\fBdat_ep_post_rdma_write()\fR returns. Because this behavior is not guaranteed
by all Providers, portable Consumers should not rely on this behavior.
Consumers should not rely on the Provider copying \fIlocal_iov\fR information.
.sp
.LP
The \fBDAT_SUCCESS\fR return of the \fBdat_ep_post_rdma_write()\fR is at least
the equivalent of posting an RDMA Write operation directly by native Transport.
Providers should avoid resource allocation as part of
\fBdat_ep_post_rdma_write()\fR to ensure that this operation is nonblocking and
thread safe for an UpCall.
.sp
.LP
The completion of the posted RDMA Write is reported to the Consumer
asynchronously through a DTO Completion event based on the specified
\fIcompletion_flags\fR value. The value of
\fBDAT_COMPLETION_UNSIGNALLED_FLAG\fR is only valid if the Endpoint Request
Completion Flags \fBDAT_COMPLETION_UNSIGNALLED_FLAG\fR. Otherwise,
\fBDAT_INVALID_PARAMETER\fR is returned.
.sp
.LP
The \fIuser_cookie\fR allows Consumers to have unique identifiers for each DTO.
These identifiers are completely under user control and are opaque to the
Provider. There is no requirement on the Consumer that the value
\fIuser_cookie\fR should be unique for each DTO. The \fIuser_cookie\fR is
returned to the Consumer in the Completion event for the posted RDMA Write.
.sp
.LP
The operation is valid for the Endpoint in the \fBDAT_EP_STATE_CONNECTED\fR and
\fBDAT_EP_STATE_DISCONNECTED\fR states. If the operation returns successfully
for the Endpoint in the \fBDAT_EP_STATE_DISCONNECTED\fR state, the posted RDMA
Write is immediately flushed to \fIrequest_evd_handle\fR.
.SH RETURN VALUES
.sp
.ne 2
.na
\fB\fBDAT_SUCCESS\fR\fR
.ad
.RS 30n
The operation was successful.
.RE

.sp
.ne 2
.na
\fB\fBDAT_INSUFFICIENT_RESOURCES\fR\fR
.ad
.RS 30n
The operation failed due to resource limitations.
.RE

.sp
.ne 2
.na
\fB\fBDAT_INVALID_PARAMETER\fR\fR
.ad
.RS 30n
Invalid parameter. For example, one of the IOV segments pointed to a memory
outside its LMR.
.RE

.sp
.ne 2
.na
\fB\fBDAT_INVALID_HANDLE\fR\fR
.ad
.RS 30n
The \fIep_handle\fR parameter is invalid.
.RE

.sp
.ne 2
.na
\fB\fBDAT_INVALID_STATE\fR\fR
.ad
.RS 30n
A parameter is in an invalid state. Endpoint was not in the
\fBDAT_EP_STATE_CONNECTED\fR or \fBDAT_EP_STATE_DISCONNECTED\fR state.
.RE

.sp
.ne 2
.na
\fB\fBDAT_LENGTH_ERROR\fR\fR
.ad
.RS 30n
The size of the receiving buffer is too small for sending buffer data. The size
of the remote buffer is too small for the data of the local buffer.
.RE

.sp
.ne 2
.na
\fB\fBDAT_PROTECTION_VIOLATION\fR\fR
.ad
.RS 30n
Protection violation for local or remote memory access. Protection Zone
mismatch between either an LMR of one of the \fIlocal_iov\fR segments and the
local Endpoint or the \fIrmr_context\fR and the remote Endpoint.
.RE

.sp
.ne 2
.na
\fB\fBDAT_PRIVILEGES_VIOLATION\fR\fR
.ad
.RS 30n
Privileges violation for local or remote memory access. Either one of the LMRs
used in \fIlocal_iov\fR is invalid or does not have the local read privileges,
or \fIrmr_context\fR does not have the remote write privileges.
.RE

.SH USAGE
.sp
.LP
For best RDMA Write operation performance, the Consumer should align each
buffer segment of \fIlocal_iov\fR to the Optimal Buffer Alignment attribute of
the Provider. For portable applications, the Consumer should align each buffer
segment of \fIlocal_iov\fR to the \fBDAT_OPTIMAL_ALIGNMENT\fR.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Standard: uDAPL, 1.1, 1.2
_
MT-Level	Unsafe
.TE

.SH SEE ALSO
.sp
.LP
.BR libdat (3LIB),
.BR attributes (7)