This adds a new socket option "SO_RXQ_ALLOC" that enables providing
the RX queue buffer allocation as ancillary data from the recvmsg()
system call. The value reported is a byte number and together with
the RX queue size (obtained via getsockopt(SO_RCVBUF) can be used to
calculate a percentage value on how full the socket buffer is.
---
arch/alpha/include/uapi/asm/socket.h | 2 ++
arch/avr32/include/uapi/asm/socket.h | 2 ++
arch/frv/include/uapi/asm/socket.h | 3 ++-
arch/ia64/include/uapi/asm/socket.h| 2 ++
arch/m32r/include/uapi/asm/socket.h| 2 ++
arch/mips/include/uapi/asm/socket.h| 2 ++
arch/mn10300/include/uapi/asm/socket.h | 2 ++
arch/parisc/include/uapi/asm/socket.h | 2 ++
arch/powerpc/include/uapi/asm/socket.h | 2 ++
arch/s390/include/uapi/asm/socket.h| 2 ++
arch/sparc/include/uapi/asm/socket.h | 2 ++
arch/xtensa/include/uapi/asm/socket.h | 2 ++
include/net/sock.h | 9 +
include/uapi/asm-generic/socket.h | 2 ++
net/core/sock.c| 8
net/ipv4/udp.c | 1 +
net/ipv6/udp.c | 1 +
net/socket.c | 12
18 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/arch/alpha/include/uapi/asm/socket.h
b/arch/alpha/include/uapi/asm/socket.h
index afc901b7a6f6..f6e945dccdc7 100644
--- a/arch/alpha/include/uapi/asm/socket.h
+++ b/arch/alpha/include/uapi/asm/socket.h
@@ -99,4 +99,6 @@
#define SCM_TIMESTAMPING_OPT_STATS 54
+#define SO_RXQ_ALLOC 55
+
#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/avr32/include/uapi/asm/socket.h
b/arch/avr32/include/uapi/asm/socket.h
index 5a650426f357..b1023265a58e 100644
--- a/arch/avr32/include/uapi/asm/socket.h
+++ b/arch/avr32/include/uapi/asm/socket.h
@@ -92,4 +92,6 @@
#define SCM_TIMESTAMPING_OPT_STATS 54
+#define SO_RXQ_ALLOC 55
+
#endif /* _UAPI__ASM_AVR32_SOCKET_H */
diff --git a/arch/frv/include/uapi/asm/socket.h
b/arch/frv/include/uapi/asm/socket.h
index 81e03530ed39..136b6eb01801 100644
--- a/arch/frv/include/uapi/asm/socket.h
+++ b/arch/frv/include/uapi/asm/socket.h
@@ -92,5 +92,6 @@
#define SCM_TIMESTAMPING_OPT_STATS 54
-#endif /* _ASM_SOCKET_H */
+#define SO_RXQ_ALLOC 55
+#endif /* _ASM_SOCKET_H */
diff --git a/arch/ia64/include/uapi/asm/socket.h
b/arch/ia64/include/uapi/asm/socket.h
index 57feb0c1f7d7..b0b39ef019cf 100644
--- a/arch/ia64/include/uapi/asm/socket.h
+++ b/arch/ia64/include/uapi/asm/socket.h
@@ -101,4 +101,6 @@
#define SCM_TIMESTAMPING_OPT_STATS 54
+#define SO_RXQ_ALLOC 55
+
#endif /* _ASM_IA64_SOCKET_H */
diff --git a/arch/m32r/include/uapi/asm/socket.h
b/arch/m32r/include/uapi/asm/socket.h
index 5853f8e92c20..f70966ea464e 100644
--- a/arch/m32r/include/uapi/asm/socket.h
+++ b/arch/m32r/include/uapi/asm/socket.h
@@ -92,4 +92,6 @@
#define SCM_TIMESTAMPING_OPT_STATS 54
+#define SO_RXQ_ALLOC 55
+
#endif /* _ASM_M32R_SOCKET_H */
diff --git a/arch/mips/include/uapi/asm/socket.h
b/arch/mips/include/uapi/asm/socket.h
index 566ecdcb5b4b..03932e896273 100644
--- a/arch/mips/include/uapi/asm/socket.h
+++ b/arch/mips/include/uapi/asm/socket.h
@@ -110,4 +110,6 @@
#define SCM_TIMESTAMPING_OPT_STATS 54
+#define SO_RXQ_ALLOC 55
+
#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/mn10300/include/uapi/asm/socket.h
b/arch/mn10300/include/uapi/asm/socket.h
index 0e12527c4b0e..d7b8dc2f454b 100644
--- a/arch/mn10300/include/uapi/asm/socket.h
+++ b/arch/mn10300/include/uapi/asm/socket.h
@@ -92,4 +92,6 @@
#define SCM_TIMESTAMPING_OPT_STATS 54
+#define SO_RXQ_ALLOC 55
+
#endif /* _ASM_SOCKET_H */
diff --git a/arch/parisc/include/uapi/asm/socket.h
b/arch/parisc/include/uapi/asm/socket.h
index 7a109b73ddf7..9062b32b828d 100644
--- a/arch/parisc/include/uapi/asm/socket.h
+++ b/arch/parisc/include/uapi/asm/socket.h
@@ -91,4 +91,6 @@
#define SCM_TIMESTAMPING_OPT_STATS 0x402F
+#define SO_RXQ_ALLOC 0x4030
+
#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/powerpc/include/uapi/asm/socket.h
b/arch/powerpc/include/uapi/asm/socket.h
index 44583a52f882..6971a55b3b2f 100644
--- a/arch/powerpc/include/uapi/asm/socket.h
+++ b/arch/powerpc/include/uapi/asm/socket.h
@@ -99,4 +99,6 @@
#define SCM_TIMESTAMPING_OPT_STATS 54
+#define SO_RXQ_ALLOC 55
+
#endif /* _ASM_POWERPC_SOCKET_H */
diff --git a/arch/s390/include/uapi/asm/socket.h
b/arch/s390/include/uapi/asm/socket.h
index b24a64cbfeb1..30c7b63e3ed6 100644
--- a/arch/s390/include/uapi/asm/socket.h
+++ b/arch/s390/include/uapi/asm/socket.h
@@ -98,4 +98,6 @@
#define SCM_TIMESTAMPING_OPT_STATS 54
+#define SO_RXQ_ALLOC 55
+
#endif /* _ASM_SOCKET_H */
diff --git a/arch/sparc/include/uapi/asm/socket.h
b/arch/sparc/include/uapi/asm/socket.h
index a25dc32f5d6a..f1d1fb318be0 100644
--- a/arch/sparc/include/uapi/asm/socket.h
+++