summaryrefslogtreecommitdiff
path: root/include/linux/tcp.h
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2012-04-19 03:41:57 +0000
committerDavid S. Miller <davem@davemloft.net>2012-04-21 15:52:25 -0400
commitb139ba4e90dccbf4cd4efb112af96a5c9e0b098c (patch)
treec955ff09255e74b8cc991dfa6f67853668a3b3c4 /include/linux/tcp.h
parent5e6a3ce6573f0c519d1ff57df60e3877bb2d3151 (diff)
tcp: Repair connection-time negotiated parameters
There are options, which are set up on a socket while performing TCP handshake. Need to resurrect them on a socket while repairing. A new sockoption accepts a buffer and parses it. The buffer should be CODE:VALUE sequence of bytes, where CODE is standard option code and VALUE is the respective value. Only 4 options should be handled on repaired socket. To read 3 out of 4 of these options the TCP_INFO sockoption can be used. An ability to get the last one (the mss_clamp) was added by the previous patch. Now the restore. Three of these options -- timestamp_ok, mss_clamp and snd_wscale -- are just restored on a coket. The sack_ok flags has 2 issues. First, whether or not to do sacks at all. This flag is just read and set back. No other sack info is saved or restored, since according to the standart and the code dropping all sack-ed segments is OK, the sender will resubmit them again, so after the repair we will probably experience a pause in connection. Next, the fack bit. It's just set back on a socket if the respective sysctl is set. No collected stats about packets flow is preserved. As far as I see (plz, correct me if I'm wrong) the fack-based congestion algorithm survives dropping all of the stats and repairs itself eventually, probably losing the performance for that period. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/tcp.h')
-rw-r--r--include/linux/tcp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 4e90e6ae79df..986593685566 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -109,6 +109,7 @@ enum {
#define TCP_REPAIR 19 /* TCP sock is under repair right now */
#define TCP_REPAIR_QUEUE 20
#define TCP_QUEUE_SEQ 21
+#define TCP_REPAIR_OPTIONS 22
enum {
TCP_NO_QUEUE,