1- .\" af_smc.7
21.\"
3- .\"
4- .\" Copyright IBM Corp. 2016, 2017
2+ .\" Copyright IBM Corp. 2016, 2018
53.\" Author(s): Ursula Braun <ubraun@linux.vnet.ibm.com>
64.\" Thomas Richter <tmricht@linux.vnet.ibm.com>
75.\" ----------------------------------------------------------------------
108AF_SMC - Sockets for SMC communication
119.SH SYNOPSIS
1210.B #include <sys/socket.h>
13- .br
11+ .sp
1412.B "#define AF_SMC 43"
13+ .sp
14+ .B "#define SMCPROTO_SMC 0"
15+ .sp
16+ .B "#define SMCPROTO_SMC6 1"
1517.PP
16- .I "tcp_socket = socket(AF_SMC, SOCK_STREAM, 0);"
18+ .IB tcp_sockfd " = socket(" AF_SMC " , " SOCK_STREAM " , " SMCPROTO_SMC );
19+ .sp
20+ .IB tcp_sockfd " = socket(" AF_SMC " , " SOCK_STREAM " , " SMCPROTO_SMC6 );
1721.SH DESCRIPTION
1822.I Shared Memory Communication via RDMA
1923(SMC) is a socket over the RDMA
@@ -27,23 +31,45 @@ host-to-host direct memory access without traditional TCP/IP
2731processing overhead.
2832SMC offers preservation of existing IP topology and IP security, and
2933introduces minimal administrative and operational changes.
30- The exploitation of SMC is transparent to TCP sockets applications.
34+ The exploitation of SMC is transparent to TCP socket applications.
3135.PP
3236The new address family
3337.B AF_SMC
3438supports the SMC protocol on Linux.
35- It keeps the address format of AF_INET sockets and supports streaming
36- socket types only.
39+ It keeps the address format of
40+ .B AF_INET
41+ and
42+ .B AF_INET6
43+ sockets and supports streaming socket types only.
3744.SS Usage modes
3845Two usage modes are possible:
3946.IP " AF_SMC native usage"
40- exploits the socket domain AF_SMC instead of
41- AF_INET.
42- .IP " usage of AF_INET socket applications with SMC preload library"
43- converts AF_INET sockets to AF_SMC sockets.
47+ uses the socket domain
48+ .B AF_SMC
49+ instead of
50+ .B AF_INET
51+ and
52+ .BR AF_INET6 .
53+ Specify
54+ .B SMCPROTO_SMC
55+ for
56+ .B AF_INET
57+ compatible socket semantics, and
58+ .B SMC_PROTO_SMC6
59+ for
60+ .B AF_INET6
61+ respectively.
62+ .IP " Usage of AF_INET socket applications with SMC preload library"
63+ converts
64+ .B AF_INET
65+ and
66+ .B AF_INET6
67+ sockets to
68+ .B AF_SMC
69+ sockets.
4470The SMC preload library is part of the SMC tools package.
4571.PP
46- SMC capability of sockets is negotiated during connection setup. If
72+ SMC socket capabilities are negotiated at connection setup. If
4773one peer is not SMC capable, further socket processing falls
4874back to TCP usage automatically.
4975.SS Implementation details: Links and Link Groups
@@ -53,44 +79,47 @@ is established between
5379a local RoCE card and a remote RoCE card. To enhance availability, you can
5480configure alternate links with automatic fail over.
5581Primary and backup links to a certain peer are combined in a so-called
56- .I link group.
57- To guarantee untroubled RDMA traffic, the number of connections
58- per link group and the number of send requests in flight per link are limited.
59- .SS Enabling SMC
60- To enable SMC, smc-code must be active: If smc is not part of the
61- kernel image, load the separate smc module (use "modprobe smc").
82+ .I link
83+ .IR group .
6284.SS RoCE adapter mapping: Creation of a pnet table
6385The SMC protocol requires grouping of multiple physical networks -
6486standard Ethernet and RoCE networks. Such groups are called
6587.I Physical Networks
66- (PNets). For SMC, RoCE Adapter mapping is configured within a table called
88+ (PNets). For SMC, RoCE adapter mapping is configured within a table called
6789.BR " pnet table" .
6890Any available Ethernet interface can be combined with available
6991.I RDMA-capable network interface cards
7092(RNICs),
7193if they belong to the same Converged Ethernet fabric.
7294To configure RoCE Adapter mapping, you must create a pnet table.
7395Modify the table with the smc-tools command
74- .I smc_pnet.
96+ .IR smc_pnet .
7597.PP
76- For details call "man smc_pnet".
77- .SS Important sysctl settings
78- SMC-R supports IPv4 only. Use this sysctl setting:
79- .IR net.ipv6.bindv6only=1
98+ For details see
99+ .BR smc_pnet (8).
80100.SS Displaying SMC socket state information
81101SMC socket state information can be obtained with the smc-tools command
82- .I smcss.
83- For details call "man smcss".
84- .SS Starting a TCP application to work over SMC
85- To start an existing TCP application to work through SMC, use the SMC
102+ .IR smcss .
103+ For details see
104+ .BR smcss (8).
105+ .SS Starting a TCP application to work with SMC
106+ To use an existing TCP application to work with SMC, use the SMC
86107preload library.
87- The SMC Tools package provides a script called "smc_run"
88- to convert AF_INET socket calls to AF_SMC socket calls by means of the preload
89- technique.
108+ The SMC Tools package provides the command
109+ .I smc_run
110+ to convert
111+ .B AF_INET
112+ and
113+ .B AF_INET6
114+ socket calls to
115+ .B AF_SMC
116+ socket calls by means of the preload technique.
117+ For more information about the preload mechanism, see also
118+ .BR ld.so (8).
90119.PP
91120Example:
92121.IP
93- smc_run ftp
122+ . B smc_run ftp
94123.PP
95124This command-line example starts an FTP client over SMC.
96125.PP
@@ -102,7 +131,7 @@ the minimum MTU size of both peers.
102131
103132.SH "AUTHOR"
104133.nf
105- Copyright IBM Corp. 2016, 2017
134+ Copyright IBM Corp. 2016, 2018
106135
107136Published under the terms and conditions of the EPL
108137(Eclipse Public License).
@@ -112,13 +141,13 @@ Published under the terms and conditions of the EPL
112141.BR socket (2),
113142.BR ip (7),
114143.BR tcp (7),
115- .BR socket (7)
116- .BR smc_run (8)
117- .BR smcss (8)
144+ .BR socket (7),
145+ .BR smc_run (8),
146+ .BR smcss (8),
118147.BR smc_pnet (8)
119148.SH "HISTORY"
120149.TP
121- .B AF_SMC, version 1.0.1
150+ .B AF_SMC, version 1.0.0
122151.RS 4
123152.IP " \b u" 2
124153Initial version.
0 commit comments