Add content. diagrams. ...
[obnox/slides/2015-09-sdc-multi-channel.git] / content.wiki
1 %
2 % colors:
3 %  _blue_text text_
4 %  _red_text text_
5 %
6
7
8 ==== SMB3 features in Samba ====
9
10 <[center]
11 <[columns]
12 [[[.65\textwidth]]]
13
14 # SMB 3.0 (Win8 / 2012):
15 #* new crypto (sign/encrypt) [4.0]
16 #* secure negotiation [4.0]
17 #* durable handles v2 [4.0]
18 #* persistent file handles [WIP/tracer]
19 #* '''_red_Multi-Channel_''' [WIP+]
20 #* SMB direct [designing/starting]
21 #* cluster features [designing]
22 #** witness [WIP+]
23 #* storage features [WIP]
24 # SMB 3.0.2 (Win8.1 / 2012R2): [master]
25 # SMB 3.1.1 (Win10 / 2014):
26 #* negotiate contexts, preauth: [master] 
27
28 [[[.35\textwidth]]]
29 %<<<durable-crop-colormod-1024,width=.9\textwidth>>>
30 <<<smb-auto-crop1,width=\textwidth>>>
31 [columns]>
32 [center]>
33
34
35 %%% ==== SMB 3.1 ====
36 %%% 
37 %%% <[block]{implemented}
38 %%% * 3.1.1 dialect
39 %%% * negotiate contexts
40 %%% * preauthentication integrity
41 %%% * encryption improvements (choose cipher) \\ %
42 %%% AES-128-CCM --> AES-128-GCM
43 %%% [block]>
44 %%% 
45 %%% <[block]{not implemented}
46 %%% * cluster dialect fencing
47 %%% * cluster client failover v2 (client)
48 %%% [block]>
49
50
51 [frame]>
52
53 <[sambabg]
54
55 ==== ====[plain]
56
57 <[center]
58 \Large
59 '''Multi-Channel'''
60 [center]>
61
62 [frame]>
63 [sambabg]>
64
65
66 ==== Multi-Channel - General ====
67
68 * bind multiple transport connections to one session
69 * increase throughput and fault tolerance
70
71 ==== Multi-Channel - Windows/Protocol ====
72
73 # establish initial session on TCP connection
74 # find interfaces with interface discovery: \\ %
75 @FSCTL\_QUERY\_NETWORK\_INTERFACE\_INFO@
76 # bind additional TCP (or RDMA) connection (channel) to established SMB3 session (session bind)
77 # windows: uses connections of same (and best quality)
78 # windows: binds only to a single node
79 # replay / retry mechanisms, epoch numbers
80
81 ==== Multi-Channel - Samba ====
82
83 <[block]{samba/smbd: multi-process}
84 * '''Currently:''' process $\Leftrightarrow$ TCP connection
85 * '''Idea:''' transfer new TPC connection to existing smbd
86 * '''How?''' ==> use fd-passing (sendmsg/recvmsg)
87 * '''When?'''
88 ** ''Natural choice'': at SessionSetup (Bind)
89 ** !Idea!: as early as possible, based on ClientGUID \\ %
90 ==> per ClientGUID single process model
91 [block]>
92
93 ==== Multi-Channel - Samba : daemons ====
94
95 <[center]
96 <<<smb3-mc-daemons-n1.png,width=.9\textwidth>>>
97 [center]>
98
99 ==== Multi-Channel - Samba : daemons ====
100
101 <[center]
102 <<<smb3-mc-daemons-n2.png,width=.9\textwidth>>>
103 [center]>
104
105 ==== Multi-Channel - Samba : daemons ====
106
107 <[center]
108 <<<smb3-mc-daemons-n3.png,width=.9\textwidth>>>
109 [center]>
110
111 ==== Multi-Channel - Samba ====
112
113 <[block]{samba/smbd: multi-process}
114 * '''Currently:''' process $\Leftrightarrow$ TCP connection
115 * '''Idea:''' transfer new TPC connection to existing smbd
116 * '''How?''' ==> use fd-passing (sendmsg/recvmsg)
117 * '''When?'''
118 ** ''Natural choice'': at SessionSetup (Bind)
119 ** !Idea!: as early as possible, based on ClientGUID \\ %
120 ==> per ClientGUID single process model
121 [block]>
122
123
124 ==== Multi-Channel - Samba : original ====
125
126 <[center]
127 %%<<<smb3-mc-samba_exp.png,height=.9\textheight>>>
128 <<<smb3-mc-samba.png,height=.9\textheight>>>
129 [center]>
130
131 ==== The relevance of the ClientGUID ====
132
133 +<2->{
134 <[block]{Assumption was:}
135 * All channels in a session have the same ClientGUID
136 * The server enforces that
137 [block]>
138 }
139
140 +<3->{
141 <[block]{Evidence from [MS-SMB2]:}
142 * 3.3.5.9 Receiving an SMB2 CREATE Request:
143 ** Sets Open.ClientGuid to Connection.ClientGuid
144 ** Replay detection checks \\ %
145 Open.ClientGuid == Connection.ClientGuid
146 * 3.3.5.9.7/12 Durable (v2) Reconnect Create Context:
147 ** check Open.ClientGuid == Connection.ClientGuid
148 [block]>
149 }
150
151 ==== Multi-Channel - Samba : modified ====
152
153 <[center]
154 <<<smb3-mc-samba-v2.png,height=.9\textheight>>>
155 [center]>
156
157
158 ==== Multi-Channel - Samba ====
159
160 # preparation: \\ %
161 messaging rewrite using unix dgm sockets with sendmsg [DONE,4.2]
162 # add fd-passing to messaging [DONE,4.2]
163 # preparations in internal structures [DONE]
164 # prepare code to cope with multiple channels [DONE]
165 # implement smbd message to pass a tcp connection [ess.DONE]
166 # transfer connection in Negotiate (by ClientGUID) [largely DONE]
167 # transfer connection in Session Bind (by SessionID) [WIP]
168 # implement session bind [ess.DONE]
169 # implement channel epoch numbers [WIP]
170 # implement interface discovery [WIP]
171 # implement test case [WIP(isn't it always...)]
172
173
174 ==== @MSG\_SMBXSRV\_CONNECTION\_PASS@ ====
175
176 <[block]{from smbXsrv.idl}
177 <[code]
178 typedef struct {
179     NTTIME                 initial_connect_time;
180     GUID                   client_guid;
181     hyper                  seq_low;
182     DATA_BLOB              negotiate_request;
183 } smbXsrv_connection_pass0;
184 [code]>
185 [block]>
186
187 ==== Internal Structures (smbXsrv) ====
188
189
190 <[block]{before}
191 <[code]
192 smbXsrv_session->smbXsrv_connection
193 [code]>
194 [block]>
195
196 <[block]{after}
197 <[code]
198 smbXsrv_session->smbXsrv_client->smbXsrv_connections
199 [code]>
200 [block]>
201
202 [frame]>
203
204 <[sambabg]
205
206 ==== ====[plain]
207
208 <[center]
209 \Large
210 shell breakout to browse code/diff
211 [center]>
212
213
214
215 ==== ====[plain]
216
217 <[center]
218 \Large
219 Multi-Channel Demo
220 [center]>
221
222 ==== ====[plain]
223
224 <[center]
225 \Large
226 '''Outlook: SMB Direct'''
227 [center]>
228
229 [frame]>
230 [sambabg]>
231
232
233 ==== SMB Direct (RDMA) ====
234
235 * windows:
236 ** requires multi-channel
237 ** start with TCP, bind an RDMA channel
238 ** reads and writes use RDMA write/read
239 ** protocol/metadata via send/receive
240
241 * wireshark dissector: [DONE]
242
243 * samba (TODO):
244 ** prereq: multi-channel / fd-passing
245 ** buffer / transport abstractions [TODO]
246 ** _red_problem_: libraries: not fork safe and no fd-passing \\ %
247 ==> central daemon (or kernel module) to serve as RDMA "proxy"
248
249 ==== SMB Direct (RDMA) - Plan ====
250
251 <[center]
252 <<<smb3-rdma-samba-v2.png,height=.9\textheight>>>
253 [center]>
254
255
256 ==== SMB features in Samba ====
257
258 <[center]
259 \Large
260 @https://wiki.samba.org/index.php/Samba3/SMB3@
261 [center]>
262
263
264
265 [frame]>
266
267 <[sambabg]
268 ==== Thanks for your attention! ====[plain]
269
270 %\transdissolve
271
272 <[center]
273 <[columns]
274 [[[.6\textwidth]]]
275
276 {\Large
277
278 Questions?
279
280 --*3em--
281
282 @obnox\@samba.org@
283
284 %--*.5em--
285 %
286 %@madam\@redhat.com@
287
288 --*.5em--
289
290 @obnox\@redhat.com@
291
292 }
293 [[[.3\textwidth]]]
294 <<<feet-sand-1280.png,height=.8\textheight>>>
295 %<<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
296
297 [columns]>
298 [center]>
299 [frame]>
300 [sambabg]>