All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] tcp: allow to repair a tcp connections in closing states
@ 2014-03-21 13:32 Andrey Vagin
  2014-03-21 13:32 ` [PATCH 1/3] tcp: allow to enable repair mode for sockets in any state Andrey Vagin
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Andrey Vagin @ 2014-03-21 13:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: criu, netdev, Andrey Vagin, David S. Miller, Alexey Kuznetsov,
	James Morris, Hideaki YOSHIFUJI, Patrick McHardy, Eric Dumazet,
	Pavel Emelyanov, Cyrill Gorcunov

Currently connections only in the TCP_ESTABLISHED state can be dumped and
restored. This series allows to restore connections in the FIN_WAIT_1,
FIN_WAIT_2, LAST_ACK, CLOSE_WAIT or CLOSING states.

For restoring closing states we need an ability to restore a fin packet
in a queue. In this series I suggest to use the interface of control
messages for that.

Here is an example of user-space code:

msg.msg_control = buf;
msg.msg_controllen = sizeof buf;
cmsg = CMSG_FIRSTHDR(&msg);
cmsg->cmsg_level = SOL_TCP;
cmsg->cmsg_type = TCP_CMSG_SEND_FIN;
cmsg->cmsg_len = CMSG_LEN(0);
msg.msg_controllen = cmsg->cmsg_len;
if (sendmsg(sk, &msg, 0) < 0) {
	pr_perror("sendmsg");
	return -1;
}

Andrey Vagin (3):
  tcp: allow to enable repair mode for sockets in any state
  tcp: check repair before fastopen in tcp_sendmsg
  tcp: add ability to restore a fin packet

 include/net/tcp.h        |  1 +
 include/uapi/linux/tcp.h |  3 +++
 net/ipv4/tcp.c           | 69 +++++++++++++++++++++++++++++++++++++-----------
 net/ipv4/tcp_input.c     |  2 +-
 4 files changed, 59 insertions(+), 16 deletions(-)

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>

-- 
1.8.5.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-24 23:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-21 13:32 [PATCH RFC 0/3] tcp: allow to repair a tcp connections in closing states Andrey Vagin
2014-03-21 13:32 ` [PATCH 1/3] tcp: allow to enable repair mode for sockets in any state Andrey Vagin
2014-03-24 22:47   ` Pavel Emelyanov
2014-03-21 13:33 ` [PATCH 2/3] tcp: check repair before fastopen in tcp_sendmsg Andrey Vagin
2014-03-21 13:33 ` [PATCH 3/3] tcp: add ability to restore a fin packet Andrey Vagin
2014-03-21 14:04   ` [CRIU] " Christopher Covington
2014-03-24 23:29 ` [PATCH RFC 0/3] tcp: allow to repair a tcp connections in closing states David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.