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
|
'\" te
.\" Copyright (c) 2006, 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 SDP 7D "Nov 13, 2006"
.SH NAME
sdp \- Sockets Direct Protocol driver
.SH SYNOPSIS
.LP
.nf
#include <socket.h>
.fi
.LP
.nf
#include <netinet/in.h>
.fi
.LP
.nf
\fBs = socket(AF_INET, SOCK_STREAM, PROTO_SDP);\fR
.fi
.LP
.nf
\fBs = socket(AF_INET6, SOCK_STREAM, PROTO_SDP);\fR
.fi
.SH DESCRIPTION
.sp
.LP
The Sockets Direct Protocol (\fBSDP\fR) is a transport protocol layered over
the \fIInfiniband Transport Framework\fR (\fBIBTF\fR). \fBSDP\fR is a standard
implementation based on Annex 4 of the \fIInfiniband Architecture Specification
Vol 1\fR and provides reliable byte-stream, flow controlled two-way data
transmission that closely mimics the Transmission Control Protocol (\fBTCP\fR).
.sp
.LP
\fBSDP\fR supports a sockets-based SOCK_STREAM interface to application
programs. It also supports graceful close (including half-closed sockets), IP
addressing (IPv4 or IPv6), the connecting/accepting connect model, out-of-band
(OOB) data and common socket options. The \fBSDP\fR protocol also supports
kernel bypass data transfers and data transfers from send-upper-layer-protocol
(ULP) buffers to receive ULP buffers. A \fBSDP\fR message includes a BSDH
header followed by data. (A BSDH header advertises the amount of available
buffers on the local side).
.sp
.LP
\fBSDP\fR networking functionality is broken into the \fBsdp\fR driver and a
function call-based sockfs implementation. A new protocol family of PROTO_SDP
is introduced to use the \fBSDP\fR transport provided by the driver.
.sp
.LP
Sockets utilizing \fBSDP\fR are either active or passive. Active sockets
initiate connections to passive sockets. Both active and passive sockets must
have their local IP or IPv6 address and \fBSDP\fR port number bound with the
\fBbind\fR(3SOCKET) system call after the socket is created. By default,
\fBSDP\fR sockets are active. A passive socket is created by calling the
\fBlisten\fR(3SOCKET) system call after binding the socket with bind(). This
process establishes a queueing parameter for the passive socket. Connections to
the passive socket can be received with the \fBaccept\fR(3SOCKET) system call.
Active sockets use the \fBconnect\fR(3SOCKET) call after binding to initiate
connections.
.sp
.LP
In most cases, \fBSDP\fR sends data when it is presented. When outstanding
data is not yet acknowledged, \fBSDP\fR gathers small amounts of output to be
sent in a single packet once an acknowledgement is received. For a small
number of clients this packetization may cause significant delays. To
circumvent this problem, \fBSDP\fR provided by the driver supplies
SDP_NODELAY, a socket-level boolean option. Note that this behavior is similar
to the TCP_NODELAY option.
.sp
.LP
\fBSDP\fR provides an urgent data mechanism that can be invoked using the
out-of-band provisions of \fBsend\fR(3SOCKET). The out-of-band delivery
behavior is identical to TCP. The caller may mark one byte as "urgent" with the
MSG_OOB flag to \fBsend\fR(3SOCKET). This sets an "urgent pointer" pointing to
the byte in the \fBSDP\fR stream. The receiver of the stream is notified of the
urgent data by a \fBSIGURG\fR signal. The SIOCATMARK \fBioctl\fR(2) request
returns a value indicating whether the stream is at the urgent mark. Because
the system never returns data across the urgent mark in a single \fBread\fR(2)
call, it is possible to advance to the urgent data in a simple loop which reads
data, testing the socket with the \fBSIOCATMARK\fR ioctl() request until it
reaches the mark.
.SH ADDRESS FORMATS
.sp
.LP
\fBSDP\fR uses IP/IPv6 addresses to refer to local and remote devices and
opens a reliable connected IB connection between two end points. The \fBsdp\fR
driver supports a point-to-point connection, however broadcasting and
multicasting are not supported.
.SH SOCKET OPTIONS
.sp
.LP
\fBSDP\fR supports setsockopt and getsockopt to set and read socket options.
Very few socket options affect \fBSDP\fR protocol operations. Other common
socket options are processed but do not affect SDP protocol operation. All
socket options are checked for validity. A getsockopt returns the values set or
toggled by setsockopt. Socket options that affect protocol operations are
SO_LINGER, SO_DEBUG, SO_REUSEADDR and SO_OOBINLINE.
.SH ERRORS
.sp
.ne 2
.na
\fB\fBEISCONN\fR\fR
.ad
.RS 28n
A connect() operation was attempted on a socket on which a connect() operation
had already been performed.
.RE
.sp
.ne 2
.na
\fB\fBECONNRESET\fR\fR
.ad
.RS 28n
The remote peer forced the connection to be closed. This usually occurs when
the remote machine loses state information about the connection due to a crash.
.RE
.sp
.ne 2
.na
\fB\fBECONNREFUSED\fR\fR
.ad
.RS 28n
The remote peer actively refused connection establishment. This usually occurs
because no process is listening to the port.
.RE
.sp
.ne 2
.na
\fB\fBEADDRINUSE\fR\fR
.ad
.RS 28n
A bind() operation was attempted on a socket with a network address/port pair
that has already been bound to another socket.
.RE
.sp
.ne 2
.na
\fB\fBEADDRNOTAVAIL\fR\fR
.ad
.RS 28n
A bind() operation was attempted on a socket with a network address for which
no network interface exists.
.RE
.sp
.ne 2
.na
\fB\fBEACCES\fR\fR
.ad
.RS 28n
A bind() operation was attempted with a reserved port number and the effective
user ID of the process was not the privileged user.
.RE
.sp
.ne 2
.na
\fB\fBENOBUFS\fR\fR
.ad
.RS 28n
The system ran out of memory for internal data structures.
.RE
.SH FILES
.sp
.ne 2
.na
\fB\fB/kernel/drv/sdp\fR\fR
.ad
.sp .6
.RS 4n
32-bit \fBELF\fR kernel module (x86).
.RE
.sp
.ne 2
.na
\fB\fB/kernel/drv/amd64/sdp\fR\fR
.ad
.sp .6
.RS 4n
64-bit \fBELF\fR kernel module (x86).
.RE
.sp
.ne 2
.na
\fB\fB/kernel/drv/sparcv9/sdp\fR\fR
.ad
.sp .6
.RS 4n
64-bit \fBELF\fR kernel module (SPARC).
.RE
.sp
.ne 2
.na
\fB\fB/kernel/drv/sdpib\fR\fR
.ad
.sp .6
.RS 4n
32-bit \fBELF\fR kernel module (x86).
.RE
.sp
.ne 2
.na
\fB\fB/kernel/drv/amd64/sdpib\fR\fR
.ad
.sp .6
.RS 4n
64-bit \fBELF\fR kernel module (x86).
.RE
.sp
.ne 2
.na
\fB\fB/kernel/drv/sparcv9/sdpib\fR\fR
.ad
.sp .6
.RS 4n
64-bit \fBELF\fR kernel module (SPARC).
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attribute:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Architecture x86, SPARC
.TE
.SH SEE ALSO
.sp
.LP
\fBread\fR(2), \fBgetsockopt\fR(3XNET), \fBsocket.h\fR(3HEAD),
\fBaccept\fR(3SOCKET), \fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET),
\fBsend\fR(3SOCKET), \fBattributes\fR(5), \fBstandards\fR(5)
.sp
.LP
\fIInfiniband Architecture Specification Vol 1- Annex 4\fR \(em November, 2002
|