Skip to content

Commit

Permalink
sock_diag: add SK_MEMINFO_BACKLOG
Browse files Browse the repository at this point in the history
Adding socket backlog len in INET_DIAG_SKMEMINFO is really useful to
diagnose various TCP problems.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jun 4, 2012
1 parent 5d0ba55 commit d594e98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/sock_diag.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ enum {
SK_MEMINFO_FWD_ALLOC,
SK_MEMINFO_WMEM_QUEUED,
SK_MEMINFO_OPTMEM,
SK_MEMINFO_BACKLOG,

SK_MEMINFO_VARS,
};
Expand Down
1 change: 1 addition & 0 deletions net/core/sock_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attrtype)
mem[SK_MEMINFO_FWD_ALLOC] = sk->sk_forward_alloc;
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;

return 0;

Expand Down

0 comments on commit d594e98

Please sign in to comment.