]> git.baikalelectronics.ru Git - kernel.git/commit
udp: sk_drops handling
authorEric Dumazet <dada1@cosmosbay.com>
Wed, 18 Jun 2008 04:04:56 +0000 (21:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jun 2008 04:04:56 +0000 (21:04 -0700)
commitd490a33eccf3f400f839d9818d40427b1afb8135
tree430dd8d5b56d0a9911750ffcbd97563ce68d1b27
parent440d0c71256985c30a96c1e3a09c20d11cd4ddd1
udp: sk_drops handling

In commits 1abd3b6c496860ea0ad42f5305e86df2c2456872 ([IPV4]: Add raw
drops counter) and 53e547cfb238d3de3a8075ff65c9867deedf4782 ([IPV6]:
Add raw drops counter), Wang Chen added raw drops counter for
/proc/net/raw & /proc/net/raw6

This patch adds this capability to UDP sockets too (/proc/net/udp &
/proc/net/udp6).

This means that 'RcvbufErrors' errors found in /proc/net/snmp can be also
be examined for each udp socket.

# grep Udp: /proc/net/snmp
Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors
Udp: 23971006 75 899420 16390693 146348 0

# cat /proc/net/udp
 sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt  ---
uid  timeout inode ref pointer drops
 75: 00000000:02CB 00000000:0000 07 00000000:00000000 00:00000000 00000000  ---
  0        0 2358 2 ffff81082a538c80 0
111: 00000000:006F 00000000:0000 07 00000000:00000000 00:00000000 00000000  ---
  0        0 2286 2 ffff81042dd35c80 146348

In this example, only port 111 (0x006F) was flooded by messages that
user program could not read fast enough. 146348 messages were lost.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/ipv4/raw.c
net/ipv4/udp.c
net/ipv6/raw.c
net/ipv6/udp.c