8354 sync regcomp(3C) with upstream (fix make catalog)
[unleashed/tickless.git] / usr / src / man / man3dat / dat_ep_post_rdma_write.3dat
blob2b059ba6e39578e91d6c7eb03dd58b1771cc5c5d
1 '\" te
2 .\" This manual page is derived from the DAT/uDAPL 1.2 specification.
3 .\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH DAT_EP_POST_RDMA_WRITE 3DAT "Jul 16, 2004"
8 .SH NAME
9 dat_ep_post_rdma_write \- write all data to the remote data buffer
10 .SH SYNOPSIS
11 .LP
12 .nf
13 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-ldat\fR [ \fIlibrary\fR\&.\|.\|. ]
14 #include <\fBdat/udat.h\fR>
16 DAT_RETURN
17     dat_ep_post_rdma_read (
18     IN    DAT_EP_HANDLE        ep_handle,
19     IN    DAT_COUNT            num_segments,
20     IN    DAT_LMR_TRIPLET      *local_iov,
21     IN    DAT_DTO_COOKIE       user_cookie,
22     IN    DAT_RMR_TRIPLET      *remote_buffer,
23     IN    DAT_COMPLETION_FLAGS completion_flags
24     )
25 .fi
27 .SH PARAMETERS
28 .sp
29 .ne 2
30 .na
31 \fB\fIep_handle\fR\fR
32 .ad
33 .RS 20n
34 Handle for an instance of the Endpoint.
35 .RE
37 .sp
38 .ne 2
39 .na
40 \fB\fInum_segments\fR\fR
41 .ad
42 .RS 20n
43 Number of \fIlmr_triplets\fR in \fIlocal_iov\fR.
44 .RE
46 .sp
47 .ne 2
48 .na
49 \fB\fIlocal_iov\fR\fR
50 .ad
51 .RS 20n
52 I/O Vector that specifies the local buffer from which the data is transferred.
53 .RE
55 .sp
56 .ne 2
57 .na
58 \fB\fIuser_cookie\fR\fR
59 .ad
60 .RS 20n
61 User-provided cookie that is returned to the Consumer at the completion of the
62 RDMA Write.
63 .RE
65 .sp
66 .ne 2
67 .na
68 \fB\fIremote_buffer\fR\fR
69 .ad
70 .RS 20n
71 A pointer to an RMR Triplet that specifies the remote buffer from which the
72 data is read.
73 .RE
75 .sp
76 .ne 2
77 .na
78 \fB\fIcompletion_flags\fR\fR
79 .ad
80 .RS 20n
81 Flags for posted RDMA read. The default \fBDAT_COMPLETION_DEFAULT_FLAG\fR is
82 0x00. Other values are as follows:
83 .sp
84 .ne 2
85 .na
86 \fBCompletion Suppression\fR
87 .ad
88 .RS 30n
89 \fBDAT_COMPLETION_SUPPRESS_FLAG\fR
90 .sp
91 .ne 2
92 .na
93 \fB0x01\fR
94 .ad
95 .RS 8n
96 Suppress successful Completion.
97 .RE
99 .RE
102 .ne 2
104 \fBNotification of Completion\fR
106 .RS 30n
107 \fB\fR\fBDAT_COMPLETION_UNSIGNALLED_FLAG\fR
109 .ne 2
111 \fB0x04\fR
113 .RS 8n
114 Non-notification completion. Local Endpoint must be configured for Notification
115 Suppression.
121 .ne 2
123 \fBBarrier Fence\fR
125 .RS 30n
126 \fB\fR\fBDAT_COMPLETION_BARRIER_FENCE_FLAG\fR
128 .ne 2
130 \fB0x08\fR
132 .RS 8n
133 Request for Barrier Fence.
140 .SH DESCRIPTION
143 The \fBdat_ep_post_rdma_write()\fR function requests the transfer of all the
144 data specified by the \fIlocal_iov\fR over the connection of the
145 \fIep_handle\fR Endpoint into the \fIremote_buffer\fR.
148 The \fInum_segments\fR parameter specifies the number of segments in the
149 \fIlocal_iov\fR. The \fIlocal_iov\fR segments are traversed in the I/O Vector
150 order until all the data is transferred.
153 A Consumer must not modify the \fIlocal_iov\fR or its content until the DTO is
154 completed. When a Consumer does not adhere to this rule, the behavior of the
155 Provider and the underlying Transport is not defined. Providers that allow
156 Consumers to get ownership of the \fIlocal_iov\fR but not the memory it
157 specifies back after the \fBdat_ep_post_rdma_write()\fR returns should document
158 this behavior and also specify its support in Provider attributes. This
159 behavior allows Consumers full control of the \fIlocal_iov\fR after
160 \fBdat_ep_post_rdma_write()\fR returns. Because this behavior is not guaranteed
161 by all Providers, portable Consumers should not rely on this behavior.
162 Consumers should not rely on the Provider copying \fIlocal_iov\fR information.
165 The \fBDAT_SUCCESS\fR return of the \fBdat_ep_post_rdma_write()\fR is at least
166 the equivalent of posting an RDMA Write operation directly by native Transport.
167 Providers should avoid resource allocation as part of
168 \fBdat_ep_post_rdma_write()\fR to ensure that this operation is nonblocking and
169 thread safe for an UpCall.
172 The completion of the posted RDMA Write is reported to the Consumer
173 asynchronously through a DTO Completion event based on the specified
174 \fIcompletion_flags\fR value. The value of
175 \fBDAT_COMPLETION_UNSIGNALLED_FLAG\fR is only valid if the Endpoint Request
176 Completion Flags \fBDAT_COMPLETION_UNSIGNALLED_FLAG\fR. Otherwise,
177 \fBDAT_INVALID_PARAMETER\fR is returned.
180 The \fIuser_cookie\fR allows Consumers to have unique identifiers for each DTO.
181 These identifiers are completely under user control and are opaque to the
182 Provider. There is no requirement on the Consumer that the value
183 \fIuser_cookie\fR should be unique for each DTO. The \fIuser_cookie\fR is
184 returned to the Consumer in the Completion event for the posted RDMA Write.
187 The operation is valid for the Endpoint in the \fBDAT_EP_STATE_CONNECTED\fR and
188 \fBDAT_EP_STATE_DISCONNECTED\fR states. If the operation returns successfully
189 for the Endpoint in the \fBDAT_EP_STATE_DISCONNECTED\fR state, the posted RDMA
190 Write is immediately flushed to \fIrequest_evd_handle\fR.
191 .SH RETURN VALUES
193 .ne 2
195 \fB\fBDAT_SUCCESS\fR\fR
197 .RS 30n
198 The operation was successful.
202 .ne 2
204 \fB\fBDAT_INSUFFICIENT_RESOURCES\fR\fR
206 .RS 30n
207 The operation failed due to resource limitations.
211 .ne 2
213 \fB\fBDAT_INVALID_PARAMETER\fR\fR
215 .RS 30n
216 Invalid parameter. For example, one of the IOV segments pointed to a memory
217 outside its LMR.
221 .ne 2
223 \fB\fBDAT_INVALID_HANDLE\fR\fR
225 .RS 30n
226 The \fIep_handle\fR parameter is invalid.
230 .ne 2
232 \fB\fBDAT_INVALID_STATE\fR\fR
234 .RS 30n
235 A parameter is in an invalid state. Endpoint was not in the
236 \fBDAT_EP_STATE_CONNECTED\fR or \fBDAT_EP_STATE_DISCONNECTED\fR state.
240 .ne 2
242 \fB\fBDAT_LENGTH_ERROR\fR\fR
244 .RS 30n
245 The size of the receiving buffer is too small for sending buffer data. The size
246 of the remote buffer is too small for the data of the local buffer.
250 .ne 2
252 \fB\fBDAT_PROTECTION_VIOLATION\fR\fR
254 .RS 30n
255 Protection violation for local or remote memory access. Protection Zone
256 mismatch between either an LMR of one of the \fIlocal_iov\fR segments and the
257 local Endpoint or the \fIrmr_context\fR and the remote Endpoint.
261 .ne 2
263 \fB\fBDAT_PRIVILEGES_VIOLATION\fR\fR
265 .RS 30n
266 Privileges violation for local or remote memory access. Either one of the LMRs
267 used in \fIlocal_iov\fR is invalid or does not have the local read privileges,
268 or \fIrmr_context\fR does not have the remote write privileges.
271 .SH USAGE
274 For best RDMA Write operation performance, the Consumer should align each
275 buffer segment of \fIlocal_iov\fR to the Optimal Buffer Alignment attribute of
276 the Provider. For portable applications, the Consumer should align each buffer
277 segment of \fIlocal_iov\fR to the \fBDAT_OPTIMAL_ALIGNMENT\fR.
278 .SH ATTRIBUTES
281 See \fBattributes\fR(5) for descriptions of the following attributes:
286 box;
287 c | c
288 l | l .
289 ATTRIBUTE TYPE  ATTRIBUTE VALUE
291 Interface Stability     Standard: uDAPL, 1.1, 1.2
293 MT-Level        Unsafe
296 .SH SEE ALSO
299 \fBlibdat\fR(3LIB), \fBattributes\fR(5)