aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/proc.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2013-08-06 06:32:11 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-09 01:24:59 -0400
commit1f07d03e2069df2ecd82301936b598a3b257c6d6 (patch)
treebcb11e562859f3f9695fe8cb5ad0fc71521fe1c4 /net/ipv4/proc.c
parent09effa67a18d893fc4e6f81a3659fc9efef1445e (diff)
net: add SNMP counters tracking incoming ECN bits
With GRO/LRO processing, there is a problem because Ip[6]InReceives SNMP counters do not count the number of frames, but number of aggregated segments. Its probably too late to change this now. This patch adds four new counters, tracking number of frames, regardless of LRO/GRO, and on a per ECN status basis, for IPv4 and IPv6. Ip[6]NoECTPkts : Number of packets received with NOECT Ip[6]ECT1Pkts : Number of packets received with ECT(1) Ip[6]ECT0Pkts : Number of packets received with ECT(0) Ip[6]CEPkts : Number of packets received with Congestion Experienced lph37:~# nstat | egrep "Pkts|InReceive" IpInReceives 1634137 0.0 Ip6InReceives 3714107 0.0 Ip6InNoECTPkts 19205 0.0 Ip6InECT0Pkts 52651828 0.0 IpExtInNoECTPkts 33630 0.0 IpExtInECT0Pkts 15581379 0.0 IpExtInCEPkts 6 0.0 Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/proc.c')
-rw-r--r--net/ipv4/proc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index 6577a1149a47..5f5fa612647f 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -111,7 +111,7 @@ static const struct snmp_mib snmp4_ipstats_list[] = {
111 SNMP_MIB_SENTINEL 111 SNMP_MIB_SENTINEL
112}; 112};
113 113
114/* Following RFC4293 items are displayed in /proc/net/netstat */ 114/* Following items are displayed in /proc/net/netstat */
115static const struct snmp_mib snmp4_ipextstats_list[] = { 115static const struct snmp_mib snmp4_ipextstats_list[] = {
116 SNMP_MIB_ITEM("InNoRoutes", IPSTATS_MIB_INNOROUTES), 116 SNMP_MIB_ITEM("InNoRoutes", IPSTATS_MIB_INNOROUTES),
117 SNMP_MIB_ITEM("InTruncatedPkts", IPSTATS_MIB_INTRUNCATEDPKTS), 117 SNMP_MIB_ITEM("InTruncatedPkts", IPSTATS_MIB_INTRUNCATEDPKTS),
@@ -125,7 +125,12 @@ static const struct snmp_mib snmp4_ipextstats_list[] = {
125 SNMP_MIB_ITEM("OutMcastOctets", IPSTATS_MIB_OUTMCASTOCTETS), 125 SNMP_MIB_ITEM("OutMcastOctets", IPSTATS_MIB_OUTMCASTOCTETS),
126 SNMP_MIB_ITEM("InBcastOctets", IPSTATS_MIB_INBCASTOCTETS), 126 SNMP_MIB_ITEM("InBcastOctets", IPSTATS_MIB_INBCASTOCTETS),
127 SNMP_MIB_ITEM("OutBcastOctets", IPSTATS_MIB_OUTBCASTOCTETS), 127 SNMP_MIB_ITEM("OutBcastOctets", IPSTATS_MIB_OUTBCASTOCTETS),
128 /* Non RFC4293 fields */
128 SNMP_MIB_ITEM("InCsumErrors", IPSTATS_MIB_CSUMERRORS), 129 SNMP_MIB_ITEM("InCsumErrors", IPSTATS_MIB_CSUMERRORS),
130 SNMP_MIB_ITEM("InNoECTPkts", IPSTATS_MIB_NOECTPKTS),
131 SNMP_MIB_ITEM("InECT1Pkts", IPSTATS_MIB_ECT1PKTS),
132 SNMP_MIB_ITEM("InECT0Pkts", IPSTATS_MIB_ECT0PKTS),
133 SNMP_MIB_ITEM("InCEPkts", IPSTATS_MIB_CEPKTS),
129 SNMP_MIB_SENTINEL 134 SNMP_MIB_SENTINEL
130}; 135};
131 136