Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2d133b1 authored by Josh Hunt's avatar Josh Hunt Committed by David S. Miller
Browse files

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: default avatarJosh Hunt <johunt@akamai.com>
Reviewed-by: default avatarJason Baron <jbaron@akamai.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c7cd4c9b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -99,4 +99,6 @@

#define SCM_TIMESTAMPING_OPT_STATS	54

#define SO_MEMINFO		55

#endif /* _UAPI_ASM_SOCKET_H */
+2 −0
Original line number Diff line number Diff line
@@ -92,4 +92,6 @@

#define SCM_TIMESTAMPING_OPT_STATS	54

#define SO_MEMINFO		55

#endif /* _UAPI__ASM_AVR32_SOCKET_H */
+2 −0
Original line number Diff line number Diff line
@@ -92,5 +92,7 @@

#define SCM_TIMESTAMPING_OPT_STATS	54

#define SO_MEMINFO		55

#endif /* _ASM_SOCKET_H */
+2 −0
Original line number Diff line number Diff line
@@ -101,4 +101,6 @@

#define SCM_TIMESTAMPING_OPT_STATS	54

#define SO_MEMINFO		55

#endif /* _ASM_IA64_SOCKET_H */
+2 −0
Original line number Diff line number Diff line
@@ -92,4 +92,6 @@

#define SCM_TIMESTAMPING_OPT_STATS	54

#define SO_MEMINFO		55

#endif /* _ASM_M32R_SOCKET_H */
Loading