aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-08-25 01:55:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:48:30 -0400
commit18f02545a9a16c9a89778b91a162ad16d510bb32 (patch)
tree2b1c67a8168b695630d26216b7dd3be17179ca5c /net/ipv4
parent5b3c98821a8753239aefc1c217409aa3e5c90787 (diff)
[TCP] MIB: Add counters for discarded SACK blocks
In DSACK case, some events are not extraordinary, such as packet duplication generated DSACK. They can arrive easily below snd_una when undo_marker is not set (TCP being in CA_Open), counting such DSACKs amoung SACK discards will likely just mislead if they occur in some scenario when there are other problems as well. Similarly, excessively delayed packets could cause "normal" DSACKs. Therefore, separate counters are allocated for DSACK events. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/proc.c3
-rw-r--r--net/ipv4/tcp_input.c10
2 files changed, 12 insertions, 1 deletions
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index 3b690cf2a4ee..986d1c83a000 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -244,6 +244,9 @@ static const struct snmp_mib snmp4_net_list[] = {
244 SNMP_MIB_ITEM("TCPAbortOnLinger", LINUX_MIB_TCPABORTONLINGER), 244 SNMP_MIB_ITEM("TCPAbortOnLinger", LINUX_MIB_TCPABORTONLINGER),
245 SNMP_MIB_ITEM("TCPAbortFailed", LINUX_MIB_TCPABORTFAILED), 245 SNMP_MIB_ITEM("TCPAbortFailed", LINUX_MIB_TCPABORTFAILED),
246 SNMP_MIB_ITEM("TCPMemoryPressures", LINUX_MIB_TCPMEMORYPRESSURES), 246 SNMP_MIB_ITEM("TCPMemoryPressures", LINUX_MIB_TCPMEMORYPRESSURES),
247 SNMP_MIB_ITEM("TCPSACKDiscard", LINUX_MIB_TCPSACKDISCARD),
248 SNMP_MIB_ITEM("TCPDSACKIgnoredOld", LINUX_MIB_TCPDSACKIGNOREDOLD),
249 SNMP_MIB_ITEM("TCPDSACKIgnoredNoUndo", LINUX_MIB_TCPDSACKIGNOREDNOUNDO),
247 SNMP_MIB_SENTINEL 250 SNMP_MIB_SENTINEL
248}; 251};
249 252
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index a2364ebf8585..f9e4d7ad68b7 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1240,8 +1240,16 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
1240 int fack_count; 1240 int fack_count;
1241 int dup_sack = (found_dup_sack && (i == first_sack_index)); 1241 int dup_sack = (found_dup_sack && (i == first_sack_index));
1242 1242
1243 if (!tcp_is_sackblock_valid(tp, dup_sack, start_seq, end_seq)) 1243 if (!tcp_is_sackblock_valid(tp, dup_sack, start_seq, end_seq)) {
1244 if (dup_sack) {
1245 if (!tp->undo_marker)
1246 NET_INC_STATS_BH(LINUX_MIB_TCPDSACKIGNOREDNOUNDO);
1247 else
1248 NET_INC_STATS_BH(LINUX_MIB_TCPDSACKIGNOREDOLD);
1249 } else
1250 NET_INC_STATS_BH(LINUX_MIB_TCPSACKDISCARD);
1244 continue; 1251 continue;
1252 }
1245 1253
1246 skb = cached_skb; 1254 skb = cached_skb;
1247 fack_count = cached_fack_count; 1255 fack_count = cached_fack_count;