projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e2fb4b
)
Phonet: dropped datagrams accounting
author
Rémi Denis-Courmont
<remi.denis-courmont@nokia.com>
Tue, 21 Jul 2009 01:57:58 +0000
(
01:57
+0000)
committer
David S. Miller
<davem@davemloft.net>
Fri, 24 Jul 2009 00:58:20 +0000
(17:58 -0700)
The per-socket drop count is visible via /proc/net/phonet.
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/phonet/datagram.c
patch
|
blob
|
history
diff --git
a/net/phonet/datagram.c
b/net/phonet/datagram.c
index
e087862
..
ef5c75c
100644
(file)
--- a/
net/phonet/datagram.c
+++ b/
net/phonet/datagram.c
@@
-159,8
+159,11
@@
out_nofree:
static int pn_backlog_rcv(struct sock *sk, struct sk_buff *skb)
{
int err = sock_queue_rcv_skb(sk, skb);
- if (err < 0)
+ if (err < 0)
{
kfree_skb(skb);
+ if (err == -ENOMEM)
+ atomic_inc(&sk->sk_drops);
+ }
return err ? NET_RX_DROP : NET_RX_SUCCESS;
}