aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-09-26 01:46:50 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:38 -0400
commit93e680202929802558f783fbd96c41697ae65472 (patch)
treee1d94c916f4f8da5ba86dd2f855efc9b546839ef /net/ipv4/tcp_input.c
parenta6963a6b3d2d3921b60f45e0cf18be26495d5ad1 (diff)
[TCP]: Reordered ACK's (old) SACKs not included to discarded MIB
In case of ACK reordering, the SACK block might be valid in it's time but is already obsoleted since we've received another kind of confirmation about arrival of the segments through snd_una advancement of an earlier packet. I didn't bother to build distinguishing of valid and invalid SACK blocks but simply made reordered SACK blocks that are too old always not counted regardless of their "real" validity which could be determined by using the ack field of the reordered packet (won't be significant IMHO). DSACKs can very well be considered useful even in this situation, so won't do any of this for them. 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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 4c10d9cad20f..4866e75e98e0 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1247,8 +1247,13 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
1247 NET_INC_STATS_BH(LINUX_MIB_TCPDSACKIGNOREDNOUNDO); 1247 NET_INC_STATS_BH(LINUX_MIB_TCPDSACKIGNOREDNOUNDO);
1248 else 1248 else
1249 NET_INC_STATS_BH(LINUX_MIB_TCPDSACKIGNOREDOLD); 1249 NET_INC_STATS_BH(LINUX_MIB_TCPDSACKIGNOREDOLD);
1250 } else 1250 } else {
1251 /* Don't count olds caused by ACK reordering */
1252 if ((TCP_SKB_CB(ack_skb)->ack_seq != tp->snd_una) &&
1253 !after(end_seq, tp->snd_una))
1254 continue;
1251 NET_INC_STATS_BH(LINUX_MIB_TCPSACKDISCARD); 1255 NET_INC_STATS_BH(LINUX_MIB_TCPSACKDISCARD);
1256 }
1252 continue; 1257 continue;
1253 } 1258 }
1254 1259