diff options
author | Eric Dumazet <edumazet@google.com> | 2016-04-01 08:52:18 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-04 22:11:20 -0400 |
commit | 15239302edd46b184e758048253541fb211e315e (patch) | |
tree | 99a70d1555c7c2cf0df9e4f663986296ba2497a2 /net/core | |
parent | 3b24d854cb35383c30642116e5992fd619bdc9bc (diff) |
sock_diag: add SK_MEMINFO_DROPS
Reporting sk_drops to user space was available for UDP
sockets using /proc interface.
Add this to sock_diag, so that we can have the same information
available to ss users, and we'll be able to add sk_drops
indications for TCP sockets as well.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/sock_diag.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c index a996ce8c8fb2..ca9e35bbe13c 100644 --- a/net/core/sock_diag.c +++ b/net/core/sock_diag.c @@ -67,6 +67,7 @@ int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attrtype) mem[SK_MEMINFO_WMEM_QUEUED] = sk->sk_wmem_queued; mem[SK_MEMINFO_OPTMEM] = atomic_read(&sk->sk_omem_alloc); mem[SK_MEMINFO_BACKLOG] = sk->sk_backlog.len; + mem[SK_MEMINFO_DROPS] = atomic_read(&sk->sk_drops); return nla_put(skb, attrtype, sizeof(mem), &mem); } |