diff options
author | Josh Hunt <johunt@akamai.com> | 2017-03-20 15:22:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-22 11:18:58 -0700 |
commit | a2d133b1d465016d0d97560b11f54ba0ace56d3e (patch) | |
tree | 0c41151a6860eb295d7919e22cce1dd5a8b0aea9 /include/net/sock.h | |
parent | c7cd4c9bf8df87027e739fe66d0a55951f6875d8 (diff) | |
download | linux-a2d133b1d465016d0d97560b11f54ba0ace56d3e.tar.gz linux-a2d133b1d465016d0d97560b11f54ba0ace56d3e.tar.bz2 linux-a2d133b1d465016d0d97560b11f54ba0ace56d3e.zip |
sock: introduce SO_MEMINFO getsockopt
Allows reading of SK_MEMINFO_VARS via socket option. This way an
application can get all meminfo related information in single socket
option call instead of multiple calls.
Adds helper function, sk_get_meminfo(), and uses that for both
getsockopt and sock_diag_put_meminfo().
Suggested by Eric Dumazet.
Signed-off-by: Josh Hunt <johunt@akamai.com>
Reviewed-by: Jason Baron <jbaron@akamai.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 08142be8938e..cb241a0e8434 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -2362,6 +2362,8 @@ bool sk_ns_capable(const struct sock *sk, bool sk_capable(const struct sock *sk, int cap); bool sk_net_capable(const struct sock *sk, int cap); +void sk_get_meminfo(const struct sock *sk, u32 *meminfo); + extern __u32 sysctl_wmem_max; extern __u32 sysctl_rmem_max; |