[TCP] MIB: Count FRTO's successfully detected spurious RTOs
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Wed, 26 Sep 2007 05:47:31 +0000 (22:47 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:52:39 +0000 (16:52 -0700)
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/snmp.h
net/ipv4/proc.c
net/ipv4/tcp_input.c

index d8fd3ec4148a3547dda0f0a4a39a5e59480da33d..89f0c2b5f405d27e15d9defd989a859f2434772c 100644 (file)
@@ -213,6 +213,7 @@ enum
        LINUX_MIB_TCPSACKDISCARD,               /* TCPSACKDiscard */
        LINUX_MIB_TCPDSACKIGNOREDOLD,           /* TCPSACKIgnoredOld */
        LINUX_MIB_TCPDSACKIGNOREDNOUNDO,        /* TCPSACKIgnoredNoUndo */
+       LINUX_MIB_TCPSPURIOUSRTOS,              /* TCPSpuriousRTOs */
        __LINUX_MIB_MAX
 };
 
index 2015148b41a82c397955c3ee3f068f08b639da6a..9dee70e1cf0d2a7de20f9fc4ff1d9214488ba7ae 100644 (file)
@@ -245,6 +245,7 @@ static const struct snmp_mib snmp4_net_list[] = {
        SNMP_MIB_ITEM("TCPSACKDiscard", LINUX_MIB_TCPSACKDISCARD),
        SNMP_MIB_ITEM("TCPDSACKIgnoredOld", LINUX_MIB_TCPDSACKIGNOREDOLD),
        SNMP_MIB_ITEM("TCPDSACKIgnoredNoUndo", LINUX_MIB_TCPDSACKIGNOREDNOUNDO),
+       SNMP_MIB_ITEM("TCPSpuriousRTOs", LINUX_MIB_TCPSPURIOUSRTOS),
        SNMP_MIB_SENTINEL
 };
 
index 4866e75e98e01adcb7d920de89c17cdc65f7aa6b..4b27739031fb809c24308121539533d3168a64c9 100644 (file)
@@ -2935,6 +2935,7 @@ static int tcp_process_frto(struct sock *sk, int flag)
                }
                tp->frto_counter = 0;
                tp->undo_marker = 0;
+               NET_INC_STATS_BH(LINUX_MIB_TCPSPURIOUSRTOS);
        }
        return 0;
 }