]> git.baikalelectronics.ru Git - kernel.git/commit
net: add SNMP counters tracking incoming ECN bits
authorEric Dumazet <edumazet@google.com>
Tue, 6 Aug 2013 10:32:11 +0000 (03:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Aug 2013 05:24:59 +0000 (22:24 -0700)
commite0220d17703a084d5122e9160b6ff76a3e8c1b1c
treebcb11e562859f3f9695fe8cb5ad0fc71521fe1c4
parent69b4b0b91c4ff0aed59ca23ca53943db6069959d
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>
include/uapi/linux/snmp.h
net/ipv4/ip_input.c
net/ipv4/proc.c
net/ipv6/ip6_input.c
net/ipv6/proc.c