aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2008-11-25 00:27:22 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 00:27:22 -0500
commit111cc8b913b42ef07793648b1699288332f273e1 (patch)
treef74fb48630319113247b5ee0c660b24f2af160d9
parent92ee76b6d99bfcdab6162816c9025541ef7248eb (diff)
tcp: add some mibs to track collapsing
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/snmp.h3
-rw-r--r--net/ipv4/proc.c3
-rw-r--r--net/ipv4/tcp_input.c4
3 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/snmp.h b/include/linux/snmp.h
index 7a6e6bba4a71..aee3f1e1d1ce 100644
--- a/include/linux/snmp.h
+++ b/include/linux/snmp.h
@@ -216,6 +216,9 @@ enum
216 LINUX_MIB_TCPSPURIOUSRTOS, /* TCPSpuriousRTOs */ 216 LINUX_MIB_TCPSPURIOUSRTOS, /* TCPSpuriousRTOs */
217 LINUX_MIB_TCPMD5NOTFOUND, /* TCPMD5NotFound */ 217 LINUX_MIB_TCPMD5NOTFOUND, /* TCPMD5NotFound */
218 LINUX_MIB_TCPMD5UNEXPECTED, /* TCPMD5Unexpected */ 218 LINUX_MIB_TCPMD5UNEXPECTED, /* TCPMD5Unexpected */
219 LINUX_MIB_SACKSHIFTED,
220 LINUX_MIB_SACKMERGED,
221 LINUX_MIB_SACKSHIFTFALLBACK,
219 __LINUX_MIB_MAX 222 __LINUX_MIB_MAX
220}; 223};
221 224
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index a631a1f110ca..731789bb499f 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -234,6 +234,9 @@ static const struct snmp_mib snmp4_net_list[] = {
234 SNMP_MIB_ITEM("TCPSpuriousRTOs", LINUX_MIB_TCPSPURIOUSRTOS), 234 SNMP_MIB_ITEM("TCPSpuriousRTOs", LINUX_MIB_TCPSPURIOUSRTOS),
235 SNMP_MIB_ITEM("TCPMD5NotFound", LINUX_MIB_TCPMD5NOTFOUND), 235 SNMP_MIB_ITEM("TCPMD5NotFound", LINUX_MIB_TCPMD5NOTFOUND),
236 SNMP_MIB_ITEM("TCPMD5Unexpected", LINUX_MIB_TCPMD5UNEXPECTED), 236 SNMP_MIB_ITEM("TCPMD5Unexpected", LINUX_MIB_TCPMD5UNEXPECTED),
237 SNMP_MIB_ITEM("TCPSackShifted", LINUX_MIB_SACKSHIFTED),
238 SNMP_MIB_ITEM("TCPSackMerged", LINUX_MIB_SACKMERGED),
239 SNMP_MIB_ITEM("TCPSackShiftFallback", LINUX_MIB_SACKSHIFTFALLBACK),
237 SNMP_MIB_SENTINEL 240 SNMP_MIB_SENTINEL
238}; 241};
239 242
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index e6291dde3348..9f8a80ba17bd 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1415,6 +1415,7 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *prev,
1415 1415
1416 if (skb->len > 0) { 1416 if (skb->len > 0) {
1417 BUG_ON(!tcp_skb_pcount(skb)); 1417 BUG_ON(!tcp_skb_pcount(skb));
1418 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SACKSHIFTED);
1418 return 0; 1419 return 0;
1419 } 1420 }
1420 1421
@@ -1436,6 +1437,8 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *prev,
1436 tcp_unlink_write_queue(skb, sk); 1437 tcp_unlink_write_queue(skb, sk);
1437 sk_wmem_free_skb(sk, skb); 1438 sk_wmem_free_skb(sk, skb);
1438 1439
1440 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SACKMERGED);
1441
1439 return 1; 1442 return 1;
1440} 1443}
1441 1444
@@ -1594,6 +1597,7 @@ noop:
1594 return skb; 1597 return skb;
1595 1598
1596fallback: 1599fallback:
1600 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SACKSHIFTFALLBACK);
1597 return NULL; 1601 return NULL;
1598} 1602}
1599 1603