Skip to content

Commit a2d133b

Browse files
joshhunt-akamaidavem330
authored andcommitted
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>
1 parent c7cd4c9 commit a2d133b

16 files changed

Lines changed: 60 additions & 9 deletions

File tree

‎arch/alpha/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,6 @@
9999

100100
#define SCM_TIMESTAMPING_OPT_STATS 54
101101

102+
#define SO_MEMINFO 55
103+
102104
#endif /* _UAPI_ASM_SOCKET_H */

‎arch/avr32/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,6 @@
9292

9393
#define SCM_TIMESTAMPING_OPT_STATS 54
9494

95+
#define SO_MEMINFO 55
96+
9597
#endif /* _UAPI__ASM_AVR32_SOCKET_H */

‎arch/frv/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,7 @@
9292

9393
#define SCM_TIMESTAMPING_OPT_STATS 54
9494

95+
#define SO_MEMINFO 55
96+
9597
#endif /* _ASM_SOCKET_H */
9698

‎arch/ia64/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,6 @@
101101

102102
#define SCM_TIMESTAMPING_OPT_STATS 54
103103

104+
#define SO_MEMINFO 55
105+
104106
#endif /* _ASM_IA64_SOCKET_H */

‎arch/m32r/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,6 @@
9292

9393
#define SCM_TIMESTAMPING_OPT_STATS 54
9494

95+
#define SO_MEMINFO 55
96+
9597
#endif /* _ASM_M32R_SOCKET_H */

‎arch/mips/include/uapi/asm/socket.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,7 @@
110110

111111
#define SCM_TIMESTAMPING_OPT_STATS 54
112112

113+
#define SO_MEMINFO 55
114+
115+
113116
#endif /* _UAPI_ASM_SOCKET_H */

‎arch/mn10300/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,6 @@
9292

9393
#define SCM_TIMESTAMPING_OPT_STATS 54
9494

95+
#define SO_MEMINFO 55
96+
9597
#endif /* _ASM_SOCKET_H */

‎arch/parisc/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,6 @@
9191

9292
#define SCM_TIMESTAMPING_OPT_STATS 0x402F
9393

94+
#define SO_MEMINFO 0x4030
95+
9496
#endif /* _UAPI_ASM_SOCKET_H */

‎arch/powerpc/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,6 @@
9999

100100
#define SCM_TIMESTAMPING_OPT_STATS 54
101101

102+
#define SO_MEMINFO 55
103+
102104
#endif /* _ASM_POWERPC_SOCKET_H */

‎arch/s390/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,6 @@
9898

9999
#define SCM_TIMESTAMPING_OPT_STATS 54
100100

101+
#define SO_MEMINFO 55
102+
101103
#endif /* _ASM_SOCKET_H */

0 commit comments

Comments
 (0)