tcp: detect loss above high_seq in recovery
Subsystems (3)
PATCH v2 1/1 tcp: detect loss above high_seq in recovery
Correctly implement a loss detection heuristic: New sequences (above high_seq) sent during the fast recovery are deemed lost when higher sequences are SACKed.
Current code does not catch these losses, because tcp_mark_head_lost() does not check packets beyond high_seq. The fix is straight-forward by checking packets until the highest sacked packet. In addition, all the FLAG_DATA_LOST logic are in-effective and redundant and can be removed.
Update the loss heuristic comments. The algorithm above is documented as heuristic B, but it is redundant too because heuristic A already covers B.
Note that this change only marks some forward-retransmitted packets LOST. It does NOT forbid TCP performing further CWR on new losses. A potential follow-up patch under preparation is to perform another CWR on "new" losses such as
1) sequence above high_seq is lost (by resetting high_seq to snd_nxt)
2) retransmission is lost.
---
Changelog since v1:
- A slightly better comment
include/linux/snmp.h | 1 - net/ipv4/proc.c | 1 - net/ipv4/tcp_input.c | 41 +++++++++++++++-------------------------- 3 files changed, 15 insertions(+), 28 deletions(-)
include/linux/snmp.h +0 -1
@@ -192,7 +192,6 @@ enumLINUX_MIB_TCPPARTIALUNDO ,/* TCPPartialUndo */ LINUX_MIB_TCPDSACKUNDO ,/* TCPDSACKUndo */ LINUX_MIB_TCPLOSSUNDO ,/* TCPLossUndo */ -LINUX_MIB_TCPLOSS ,/* TCPLoss */ LINUX_MIB_TCPLOSTRETRANSMIT ,/* TCPLostRetransmit */ LINUX_MIB_TCPRENOFAILURES ,/* TCPRenoFailures */ LINUX_MIB_TCPSACKFAILURES, /* TCPSackFailures */
net/ipv4/proc.c +0 -1
@@ -216,7 +216,6 @@ static const struct snmp_mib snmp4_net_list[] = {SNMP_MIB_ITEM ("TCPPartialUndo" ,LINUX_MIB_TCPPARTIALUNDO ),SNMP_MIB_ITEM ("TCPDSACKUndo" ,LINUX_MIB_TCPDSACKUNDO ),SNMP_MIB_ITEM ("TCPLossUndo" ,LINUX_MIB_TCPLOSSUNDO ), -SNMP_MIB_ITEM ("TCPLoss" ,LINUX_MIB_TCPLOSS ),SNMP_MIB_ITEM ("TCPLostRetransmit" ,LINUX_MIB_TCPLOSTRETRANSMIT ),SNMP_MIB_ITEM ("TCPRenoFailures" ,LINUX_MIB_TCPRENOFAILURES ), SNMP_MIB_ITEM("TCPSackFailures", LINUX_MIB_TCPSACKFAILURES),
net/ipv4/tcp_input.c +15 -26
99 lines not on this page · raw message
Signature · 1 line
1.7.7.3
From: Yuchung Cheng <[email protected]>
Date: Thu, 19 Jan 2012 16:42:21 -0800
Quoted 13 lines
Correctly implement a loss detection heuristic: New sequences (above
high_seq) sent during the fast recovery are deemed lost when higher sequences are SACKed.Current code does not catch these losses, because
tcp_mark_head_lost()does not check packets beyondhigh_seq. The fix is straight-forward by checking packets until the highest sacked packet. In addition, all theFLAG_DATA_LOSTlogic are in-effective and redundant and can be removed.Update the loss heuristic comments. The algorithm above is documented as heuristic B, but it is redundant too because heuristic A already covers B.
Quoted 8 lines
Note that this change only marks some forward-retransmitted packets LOST. It does NOT forbid TCP performing further CWR on new losses. A potential follow-up patch under preparation is to perform another CWR on "new" losses such as
1) sequence abovehigh_seqis lost (by resettinghigh_seqtosnd_nxt)
2) retransmission is lost.Signed-off-by Yuchung Cheng <[email protected]>
Applied.