blob: 6de909612bd0004dbf7765e3811ed01240d09d6d [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Ursula Braunb38d7322017-01-09 16:55:25 +01002/*
3 * Shared Memory Communications over RDMA (SMC-R) and RoCE
4 *
5 * Socket Closing - normal and abnormal
6 *
7 * Copyright IBM Corp. 2016
8 *
9 * Author(s): Ursula Braun <ubraun@linux.vnet.ibm.com>
10 */
11
12#include <linux/workqueue.h>
Ingo Molnarc3edc402017-02-02 08:35:14 +010013#include <linux/sched/signal.h>
14
Ursula Braunb38d7322017-01-09 16:55:25 +010015#include <net/sock.h>
16
17#include "smc.h"
18#include "smc_tx.h"
19#include "smc_cdc.h"
20#include "smc_close.h"
21
Ursula Braunb38d7322017-01-09 16:55:25 +010022static void smc_close_cleanup_listen(struct sock *parent)
23{
24 struct sock *sk;
25
26 /* Close non-accepted connections */
27 while ((sk = smc_accept_dequeue(parent, NULL)))
28 smc_close_non_accepted(sk);
29}
30
Ursula Braunb38d7322017-01-09 16:55:25 +010031/* wait for sndbuf data being transmitted */
32static void smc_close_stream_wait(struct smc_sock *smc, long timeout)
33{
34 DEFINE_WAIT_FUNC(wait, woken_wake_function);
35 struct sock *sk = &smc->sk;
36
37 if (!timeout)
38 return;
39
40 if (!smc_tx_prepared_sends(&smc->conn))
41 return;
42
43 smc->wait_close_tx_prepared = 1;
44 add_wait_queue(sk_sleep(sk), &wait);
45 while (!signal_pending(current) && timeout) {
46 int rc;
47
48 rc = sk_wait_event(sk, &timeout,
49 !smc_tx_prepared_sends(&smc->conn) ||
50 (sk->sk_err == ECONNABORTED) ||
51 (sk->sk_err == ECONNRESET),
52 &wait);
53 if (rc)
54 break;
55 }
56 remove_wait_queue(sk_sleep(sk), &wait);
57 smc->wait_close_tx_prepared = 0;
58}
59
60void smc_close_wake_tx_prepared(struct smc_sock *smc)
61{
62 if (smc->wait_close_tx_prepared)
63 /* wake up socket closing */
64 smc->sk.sk_state_change(&smc->sk);
65}
66
67static int smc_close_wr(struct smc_connection *conn)
68{
69 conn->local_tx_ctrl.conn_state_flags.peer_done_writing = 1;
70
71 return smc_cdc_get_slot_and_msg_send(conn);
72}
73
74static int smc_close_final(struct smc_connection *conn)
75{
76 if (atomic_read(&conn->bytes_to_rcv))
77 conn->local_tx_ctrl.conn_state_flags.peer_conn_abort = 1;
78 else
79 conn->local_tx_ctrl.conn_state_flags.peer_conn_closed = 1;
80
81 return smc_cdc_get_slot_and_msg_send(conn);
82}
83
84static int smc_close_abort(struct smc_connection *conn)
85{
86 conn->local_tx_ctrl.conn_state_flags.peer_conn_abort = 1;
87
88 return smc_cdc_get_slot_and_msg_send(conn);
89}
90
91/* terminate smc socket abnormally - active abort
92 * RDMA communication no longer possible
93 */
Ursula Brauna8ae8902017-12-07 13:38:44 +010094static void smc_close_active_abort(struct smc_sock *smc)
Ursula Braunb38d7322017-01-09 16:55:25 +010095{
Ursula Braun3163c502018-01-24 10:28:12 +010096 struct sock *sk = &smc->sk;
97
Ursula Braunb38d7322017-01-09 16:55:25 +010098 struct smc_cdc_conn_state_flags *txflags =
99 &smc->conn.local_tx_ctrl.conn_state_flags;
100
Ursula Braun3163c502018-01-24 10:28:12 +0100101 sk->sk_err = ECONNABORTED;
Ursula Braunb38d7322017-01-09 16:55:25 +0100102 if (smc->clcsock && smc->clcsock->sk) {
103 smc->clcsock->sk->sk_err = ECONNABORTED;
104 smc->clcsock->sk->sk_state_change(smc->clcsock->sk);
105 }
Ursula Braun3163c502018-01-24 10:28:12 +0100106 switch (sk->sk_state) {
Ursula Braunb38d7322017-01-09 16:55:25 +0100107 case SMC_INIT:
Ursula Braun46c28db2017-04-10 14:58:01 +0200108 case SMC_ACTIVE:
Ursula Braun3163c502018-01-24 10:28:12 +0100109 sk->sk_state = SMC_PEERABORTWAIT;
Ursula Braun611b63a2018-01-25 11:15:31 +0100110 release_sock(sk);
111 cancel_delayed_work_sync(&smc->conn.tx_work);
112 lock_sock(sk);
Ursula Braunb38d7322017-01-09 16:55:25 +0100113 break;
114 case SMC_APPCLOSEWAIT1:
115 case SMC_APPCLOSEWAIT2:
116 txflags->peer_conn_abort = 1;
117 sock_release(smc->clcsock);
118 if (!smc_cdc_rxed_any_close(&smc->conn))
Ursula Braun3163c502018-01-24 10:28:12 +0100119 sk->sk_state = SMC_PEERABORTWAIT;
Ursula Braunb38d7322017-01-09 16:55:25 +0100120 else
Ursula Braun3163c502018-01-24 10:28:12 +0100121 sk->sk_state = SMC_CLOSED;
Ursula Braun611b63a2018-01-25 11:15:31 +0100122 release_sock(sk);
123 cancel_delayed_work_sync(&smc->conn.tx_work);
124 lock_sock(sk);
Ursula Braunb38d7322017-01-09 16:55:25 +0100125 break;
126 case SMC_PEERCLOSEWAIT1:
127 case SMC_PEERCLOSEWAIT2:
128 if (!txflags->peer_conn_closed) {
Ursula Braun3163c502018-01-24 10:28:12 +0100129 sk->sk_state = SMC_PEERABORTWAIT;
Ursula Braunb38d7322017-01-09 16:55:25 +0100130 txflags->peer_conn_abort = 1;
131 sock_release(smc->clcsock);
132 } else {
Ursula Braun3163c502018-01-24 10:28:12 +0100133 sk->sk_state = SMC_CLOSED;
Ursula Braunb38d7322017-01-09 16:55:25 +0100134 }
135 break;
136 case SMC_PROCESSABORT:
137 case SMC_APPFINCLOSEWAIT:
138 if (!txflags->peer_conn_closed) {
139 txflags->peer_conn_abort = 1;
140 sock_release(smc->clcsock);
141 }
Ursula Braun3163c502018-01-24 10:28:12 +0100142 sk->sk_state = SMC_CLOSED;
Ursula Braunb38d7322017-01-09 16:55:25 +0100143 break;
144 case SMC_PEERFINCLOSEWAIT:
145 case SMC_PEERABORTWAIT:
146 case SMC_CLOSED:
147 break;
148 }
149
Ursula Braun3163c502018-01-24 10:28:12 +0100150 sock_set_flag(sk, SOCK_DEAD);
151 sk->sk_state_change(sk);
Ursula Braunb38d7322017-01-09 16:55:25 +0100152}
153
Ursula Brauna98bf8c02017-04-10 14:58:02 +0200154static inline bool smc_close_sent_any_close(struct smc_connection *conn)
155{
156 return conn->local_tx_ctrl.conn_state_flags.peer_conn_abort ||
157 conn->local_tx_ctrl.conn_state_flags.peer_conn_closed;
158}
159
Ursula Braunb38d7322017-01-09 16:55:25 +0100160int smc_close_active(struct smc_sock *smc)
161{
162 struct smc_cdc_conn_state_flags *txflags =
163 &smc->conn.local_tx_ctrl.conn_state_flags;
Ursula Braunb38d7322017-01-09 16:55:25 +0100164 struct smc_connection *conn = &smc->conn;
165 struct sock *sk = &smc->sk;
166 int old_state;
Ursula Braun8c96fee2017-09-21 09:16:34 +0200167 long timeout;
Ursula Braunb38d7322017-01-09 16:55:25 +0100168 int rc = 0;
169
Ursula Braun8c96fee2017-09-21 09:16:34 +0200170 timeout = current->flags & PF_EXITING ?
171 0 : sock_flag(sk, SOCK_LINGER) ?
172 sk->sk_lingertime : SMC_MAX_STREAM_WAIT_TIMEOUT;
Ursula Braunb38d7322017-01-09 16:55:25 +0100173
Ursula Braunb38d7322017-01-09 16:55:25 +0100174 old_state = sk->sk_state;
Ursula Braunbbb96bf2018-01-24 10:28:16 +0100175again:
176 switch (sk->sk_state) {
Ursula Braunb38d7322017-01-09 16:55:25 +0100177 case SMC_INIT:
178 sk->sk_state = SMC_CLOSED;
179 if (smc->smc_listen_work.func)
Ursula Braun46c28db2017-04-10 14:58:01 +0200180 cancel_work_sync(&smc->smc_listen_work);
Ursula Braunb38d7322017-01-09 16:55:25 +0100181 break;
182 case SMC_LISTEN:
183 sk->sk_state = SMC_CLOSED;
184 sk->sk_state_change(sk); /* wake up accept */
185 if (smc->clcsock && smc->clcsock->sk) {
186 rc = kernel_sock_shutdown(smc->clcsock, SHUT_RDWR);
187 /* wake up kernel_accept of smc_tcp_listen_worker */
188 smc->clcsock->sk->sk_data_ready(smc->clcsock->sk);
189 }
190 release_sock(sk);
191 smc_close_cleanup_listen(sk);
Ursula Braun46c28db2017-04-10 14:58:01 +0200192 cancel_work_sync(&smc->smc_listen_work);
Ursula Braunb38d7322017-01-09 16:55:25 +0100193 lock_sock(sk);
194 break;
195 case SMC_ACTIVE:
196 smc_close_stream_wait(smc, timeout);
197 release_sock(sk);
Ursula Braun18e537c2017-09-21 09:16:33 +0200198 cancel_delayed_work_sync(&conn->tx_work);
Ursula Braunb38d7322017-01-09 16:55:25 +0100199 lock_sock(sk);
200 if (sk->sk_state == SMC_ACTIVE) {
201 /* send close request */
202 rc = smc_close_final(conn);
Ursula Braunbbb96bf2018-01-24 10:28:16 +0100203 if (rc)
204 break;
Ursula Braunb38d7322017-01-09 16:55:25 +0100205 sk->sk_state = SMC_PEERCLOSEWAIT1;
206 } else {
207 /* peer event has changed the state */
208 goto again;
209 }
210 break;
211 case SMC_APPFINCLOSEWAIT:
212 /* socket already shutdown wr or both (active close) */
213 if (txflags->peer_done_writing &&
Ursula Brauna98bf8c02017-04-10 14:58:02 +0200214 !smc_close_sent_any_close(conn)) {
Ursula Braunb38d7322017-01-09 16:55:25 +0100215 /* just shutdown wr done, send close request */
216 rc = smc_close_final(conn);
Ursula Braunbbb96bf2018-01-24 10:28:16 +0100217 if (rc)
218 break;
Ursula Braunb38d7322017-01-09 16:55:25 +0100219 }
220 sk->sk_state = SMC_CLOSED;
Ursula Braunb38d7322017-01-09 16:55:25 +0100221 break;
222 case SMC_APPCLOSEWAIT1:
223 case SMC_APPCLOSEWAIT2:
224 if (!smc_cdc_rxed_any_close(conn))
225 smc_close_stream_wait(smc, timeout);
226 release_sock(sk);
Ursula Braun18e537c2017-09-21 09:16:33 +0200227 cancel_delayed_work_sync(&conn->tx_work);
Ursula Braunb38d7322017-01-09 16:55:25 +0100228 lock_sock(sk);
Ursula Braunbbb96bf2018-01-24 10:28:16 +0100229 if (sk->sk_state != SMC_APPCLOSEWAIT1 &&
230 sk->sk_state != SMC_APPCLOSEWAIT2)
231 goto again;
232 /* confirm close from peer */
233 rc = smc_close_final(conn);
234 if (rc)
235 break;
Ursula Braunb38d7322017-01-09 16:55:25 +0100236 if (smc_cdc_rxed_any_close(conn))
237 /* peer has closed the socket already */
238 sk->sk_state = SMC_CLOSED;
239 else
240 /* peer has just issued a shutdown write */
241 sk->sk_state = SMC_PEERFINCLOSEWAIT;
Ursula Braunb38d7322017-01-09 16:55:25 +0100242 break;
243 case SMC_PEERCLOSEWAIT1:
244 case SMC_PEERCLOSEWAIT2:
Ursula Brauna98bf8c02017-04-10 14:58:02 +0200245 if (txflags->peer_done_writing &&
246 !smc_close_sent_any_close(conn)) {
247 /* just shutdown wr done, send close request */
248 rc = smc_close_final(conn);
Ursula Braunbbb96bf2018-01-24 10:28:16 +0100249 if (rc)
250 break;
Ursula Brauna98bf8c02017-04-10 14:58:02 +0200251 }
252 /* peer sending PeerConnectionClosed will cause transition */
253 break;
Ursula Braunb38d7322017-01-09 16:55:25 +0100254 case SMC_PEERFINCLOSEWAIT:
255 /* peer sending PeerConnectionClosed will cause transition */
256 break;
257 case SMC_PROCESSABORT:
Ursula Braunb38d7322017-01-09 16:55:25 +0100258 smc_close_abort(conn);
259 sk->sk_state = SMC_CLOSED;
Ursula Braunb38d7322017-01-09 16:55:25 +0100260 break;
261 case SMC_PEERABORTWAIT:
262 case SMC_CLOSED:
263 /* nothing to do, add tracing in future patch */
264 break;
265 }
266
267 if (old_state != sk->sk_state)
Ursula Braun3163c502018-01-24 10:28:12 +0100268 sk->sk_state_change(sk);
Ursula Braunb38d7322017-01-09 16:55:25 +0100269 return rc;
270}
271
272static void smc_close_passive_abort_received(struct smc_sock *smc)
273{
274 struct smc_cdc_conn_state_flags *txflags =
275 &smc->conn.local_tx_ctrl.conn_state_flags;
276 struct sock *sk = &smc->sk;
277
278 switch (sk->sk_state) {
279 case SMC_ACTIVE:
280 case SMC_APPFINCLOSEWAIT:
281 case SMC_APPCLOSEWAIT1:
282 case SMC_APPCLOSEWAIT2:
283 smc_close_abort(&smc->conn);
284 sk->sk_state = SMC_PROCESSABORT;
285 break;
286 case SMC_PEERCLOSEWAIT1:
287 case SMC_PEERCLOSEWAIT2:
288 if (txflags->peer_done_writing &&
Ursula Brauna98bf8c02017-04-10 14:58:02 +0200289 !smc_close_sent_any_close(&smc->conn)) {
Ursula Braunb38d7322017-01-09 16:55:25 +0100290 /* just shutdown, but not yet closed locally */
291 smc_close_abort(&smc->conn);
292 sk->sk_state = SMC_PROCESSABORT;
293 } else {
294 sk->sk_state = SMC_CLOSED;
295 }
296 break;
297 case SMC_PEERFINCLOSEWAIT:
298 case SMC_PEERABORTWAIT:
299 sk->sk_state = SMC_CLOSED;
300 break;
301 case SMC_INIT:
302 case SMC_PROCESSABORT:
303 /* nothing to do, add tracing in future patch */
304 break;
305 }
306}
307
308/* Some kind of closing has been received: peer_conn_closed, peer_conn_abort,
309 * or peer_done_writing.
Ursula Braunb38d7322017-01-09 16:55:25 +0100310 */
Ursula Braun46c28db2017-04-10 14:58:01 +0200311static void smc_close_passive_work(struct work_struct *work)
Ursula Braunb38d7322017-01-09 16:55:25 +0100312{
Ursula Braun46c28db2017-04-10 14:58:01 +0200313 struct smc_connection *conn = container_of(work,
314 struct smc_connection,
315 close_work);
316 struct smc_sock *smc = container_of(conn, struct smc_sock, conn);
317 struct smc_cdc_conn_state_flags *rxflags;
Ursula Braunb38d7322017-01-09 16:55:25 +0100318 struct sock *sk = &smc->sk;
319 int old_state;
320
Ursula Braun3163c502018-01-24 10:28:12 +0100321 lock_sock(sk);
Ursula Braunb38d7322017-01-09 16:55:25 +0100322 old_state = sk->sk_state;
323
Ursula Braun46c28db2017-04-10 14:58:01 +0200324 if (!conn->alert_token_local) {
325 /* abnormal termination */
326 smc_close_active_abort(smc);
327 goto wakeup;
328 }
329
Ursula Braun3163c502018-01-24 10:28:12 +0100330 rxflags = &conn->local_rx_ctrl.conn_state_flags;
Ursula Braunb38d7322017-01-09 16:55:25 +0100331 if (rxflags->peer_conn_abort) {
332 smc_close_passive_abort_received(smc);
Ursula Braun611b63a2018-01-25 11:15:31 +0100333 release_sock(&smc->sk);
334 cancel_delayed_work_sync(&conn->tx_work);
335 lock_sock(&smc->sk);
Ursula Braunb38d7322017-01-09 16:55:25 +0100336 goto wakeup;
337 }
338
339 switch (sk->sk_state) {
340 case SMC_INIT:
Ursula Braun3163c502018-01-24 10:28:12 +0100341 if (atomic_read(&conn->bytes_to_rcv) ||
Ursula Braunb38d7322017-01-09 16:55:25 +0100342 (rxflags->peer_done_writing &&
Ursula Brauna98bf8c02017-04-10 14:58:02 +0200343 !smc_cdc_rxed_any_close(conn)))
Ursula Braunb38d7322017-01-09 16:55:25 +0100344 sk->sk_state = SMC_APPCLOSEWAIT1;
345 else
346 sk->sk_state = SMC_CLOSED;
347 break;
348 case SMC_ACTIVE:
349 sk->sk_state = SMC_APPCLOSEWAIT1;
350 break;
351 case SMC_PEERCLOSEWAIT1:
352 if (rxflags->peer_done_writing)
353 sk->sk_state = SMC_PEERCLOSEWAIT2;
Gustavo A. R. Silva7f6b4372017-10-21 20:35:30 -0500354 /* fall through */
355 /* to check for closing */
Ursula Braunb38d7322017-01-09 16:55:25 +0100356 case SMC_PEERCLOSEWAIT2:
357 case SMC_PEERFINCLOSEWAIT:
Ursula Braun3163c502018-01-24 10:28:12 +0100358 if (!smc_cdc_rxed_any_close(conn))
Ursula Braunb38d7322017-01-09 16:55:25 +0100359 break;
360 if (sock_flag(sk, SOCK_DEAD) &&
Ursula Brauna98bf8c02017-04-10 14:58:02 +0200361 smc_close_sent_any_close(conn)) {
Ursula Braunb38d7322017-01-09 16:55:25 +0100362 /* smc_release has already been called locally */
363 sk->sk_state = SMC_CLOSED;
364 } else {
365 /* just shutdown, but not yet closed locally */
366 sk->sk_state = SMC_APPFINCLOSEWAIT;
367 }
368 break;
369 case SMC_APPCLOSEWAIT1:
370 case SMC_APPCLOSEWAIT2:
371 case SMC_APPFINCLOSEWAIT:
372 case SMC_PEERABORTWAIT:
373 case SMC_PROCESSABORT:
374 case SMC_CLOSED:
375 /* nothing to do, add tracing in future patch */
376 break;
377 }
378
379wakeup:
Ursula Braunb38d7322017-01-09 16:55:25 +0100380 sk->sk_data_ready(sk); /* wakeup blocked rcvbuf consumers */
381 sk->sk_write_space(sk); /* wakeup blocked sndbuf producers */
382
Ursula Brauna98bf8c02017-04-10 14:58:02 +0200383 if (old_state != sk->sk_state) {
384 sk->sk_state_change(sk);
385 if ((sk->sk_state == SMC_CLOSED) &&
386 (sock_flag(sk, SOCK_DEAD) || !sk->sk_socket)) {
Ursula Braun3163c502018-01-24 10:28:12 +0100387 smc_conn_free(conn);
Ursula Brauna98bf8c02017-04-10 14:58:02 +0200388 schedule_delayed_work(&smc->sock_put_work,
389 SMC_CLOSE_SOCK_PUT_DELAY);
390 }
Ursula Braunb38d7322017-01-09 16:55:25 +0100391 }
Ursula Braun3163c502018-01-24 10:28:12 +0100392 release_sock(sk);
Ursula Braunb38d7322017-01-09 16:55:25 +0100393}
394
395void smc_close_sock_put_work(struct work_struct *work)
396{
397 struct smc_sock *smc = container_of(to_delayed_work(work),
398 struct smc_sock,
399 sock_put_work);
400
Ursula Braunf16a7dd2017-01-09 16:55:26 +0100401 smc->sk.sk_prot->unhash(&smc->sk);
Ursula Braunb38d7322017-01-09 16:55:25 +0100402 sock_put(&smc->sk);
403}
404
405int smc_close_shutdown_write(struct smc_sock *smc)
406{
407 struct smc_connection *conn = &smc->conn;
Ursula Braunb38d7322017-01-09 16:55:25 +0100408 struct sock *sk = &smc->sk;
409 int old_state;
Ursula Braun8c96fee2017-09-21 09:16:34 +0200410 long timeout;
Ursula Braunb38d7322017-01-09 16:55:25 +0100411 int rc = 0;
412
Ursula Braun8c96fee2017-09-21 09:16:34 +0200413 timeout = current->flags & PF_EXITING ?
414 0 : sock_flag(sk, SOCK_LINGER) ?
415 sk->sk_lingertime : SMC_MAX_STREAM_WAIT_TIMEOUT;
Ursula Braunb38d7322017-01-09 16:55:25 +0100416
Ursula Braunb38d7322017-01-09 16:55:25 +0100417 old_state = sk->sk_state;
Ursula Braunbbb96bf2018-01-24 10:28:16 +0100418again:
419 switch (sk->sk_state) {
Ursula Braunb38d7322017-01-09 16:55:25 +0100420 case SMC_ACTIVE:
421 smc_close_stream_wait(smc, timeout);
422 release_sock(sk);
Ursula Braun18e537c2017-09-21 09:16:33 +0200423 cancel_delayed_work_sync(&conn->tx_work);
Ursula Braunb38d7322017-01-09 16:55:25 +0100424 lock_sock(sk);
Ursula Braunbbb96bf2018-01-24 10:28:16 +0100425 if (sk->sk_state != SMC_ACTIVE)
426 goto again;
Ursula Braunb38d7322017-01-09 16:55:25 +0100427 /* send close wr request */
428 rc = smc_close_wr(conn);
Ursula Braunbbb96bf2018-01-24 10:28:16 +0100429 if (rc)
430 break;
431 sk->sk_state = SMC_PEERCLOSEWAIT1;
Ursula Braunb38d7322017-01-09 16:55:25 +0100432 break;
433 case SMC_APPCLOSEWAIT1:
434 /* passive close */
435 if (!smc_cdc_rxed_any_close(conn))
436 smc_close_stream_wait(smc, timeout);
437 release_sock(sk);
Ursula Braun18e537c2017-09-21 09:16:33 +0200438 cancel_delayed_work_sync(&conn->tx_work);
Ursula Braunb38d7322017-01-09 16:55:25 +0100439 lock_sock(sk);
Ursula Braunbbb96bf2018-01-24 10:28:16 +0100440 if (sk->sk_state != SMC_APPCLOSEWAIT1)
441 goto again;
Ursula Braunb38d7322017-01-09 16:55:25 +0100442 /* confirm close from peer */
443 rc = smc_close_wr(conn);
Ursula Braunbbb96bf2018-01-24 10:28:16 +0100444 if (rc)
445 break;
Ursula Braunb38d7322017-01-09 16:55:25 +0100446 sk->sk_state = SMC_APPCLOSEWAIT2;
447 break;
448 case SMC_APPCLOSEWAIT2:
449 case SMC_PEERFINCLOSEWAIT:
450 case SMC_PEERCLOSEWAIT1:
451 case SMC_PEERCLOSEWAIT2:
452 case SMC_APPFINCLOSEWAIT:
453 case SMC_PROCESSABORT:
454 case SMC_PEERABORTWAIT:
455 /* nothing to do, add tracing in future patch */
456 break;
457 }
458
459 if (old_state != sk->sk_state)
Ursula Braun3163c502018-01-24 10:28:12 +0100460 sk->sk_state_change(sk);
Ursula Braunb38d7322017-01-09 16:55:25 +0100461 return rc;
462}
Ursula Braun46c28db2017-04-10 14:58:01 +0200463
464/* Initialize close properties on connection establishment. */
465void smc_close_init(struct smc_sock *smc)
466{
467 INIT_WORK(&smc->conn.close_work, smc_close_passive_work);
468}