summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorIlpo Järvinen2007-11-16 04:35:11 +0100
committerDavid S. Miller2008-01-28 23:54:02 +0100
commitf577111302677e6d1448475821cc19ba8835f60e (patch)
tree4c5f5f0081bb0843a589fcae86ec6dc13dee3526 /net/ipv4/tcp_input.c
parent[TCP]: Move !in_sack test earlier in sacktag & reorganize if()s (diff)
downloadkernel-qcow2-linux-f577111302677e6d1448475821cc19ba8835f60e.tar.gz
kernel-qcow2-linux-f577111302677e6d1448475821cc19ba8835f60e.tar.xz
kernel-qcow2-linux-f577111302677e6d1448475821cc19ba8835f60e.zip
[TCP]: Extend reordering detection to cover CA_Loss partially
This implements more accurately what is stated in sacktag's overall comment: "Both of these heuristics are not used in Loss state, when we cannot account for retransmits accurately." When CA_Loss state is entered, the state changer ensures that undo_marker is only set if no TCPCB_RETRANS skbs were found, thus having non-zero undo_marker in CA_Loss basically tells that the R-bits still accurately reflect the current state of TCP. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 901240f40688..26713e5d89db 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1511,7 +1511,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
tcp_verify_left_out(tp);
- if ((reord < tp->fackets_out) && icsk->icsk_ca_state != TCP_CA_Loss &&
+ if ((reord < tp->fackets_out) &&
+ ((icsk->icsk_ca_state != TCP_CA_Loss) || tp->undo_marker) &&
(!tp->frto_highmark || after(tp->snd_una, tp->frto_highmark)))
tcp_update_reordering(sk, tp->fackets_out - reord, 0);