summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorTung Nguyen <tung.q.nguyen@dektech.com.au>2019-04-18 21:02:19 +0700
committerDavid S. Miller <davem@davemloft.net>2019-04-19 14:59:05 -0700
commit42e5425aa0dfd8a6cdd7e177cfd9703df05c7411 (patch)
tree39e900102d0b395f3759cb8d252ec84cfc4fb65e /include/uapi/linux
parenta26deec69fa4a1843f11f11e123b49ed0699ff00 (diff)
downloadlinux-42e5425aa0dfd8a6cdd7e177cfd9703df05c7411.tar.gz
linux-42e5425aa0dfd8a6cdd7e177cfd9703df05c7411.tar.bz2
linux-42e5425aa0dfd8a6cdd7e177cfd9703df05c7411.zip
tipc: introduce new socket option TIPC_SOCK_RECVQ_USED
When using TIPC_SOCK_RECVQ_DEPTH for getsockopt(), it returns the number of buffers in receive socket buffer which is not so helpful for user space applications. This commit introduces the new option TIPC_SOCK_RECVQ_USED which returns the current allocated bytes of the receive socket buffer. This helps user space applications dimension its buffer usage to avoid buffer overload issue. Signed-off-by: Tung Nguyen <tung.q.nguyen@dektech.com.au> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/tipc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/tipc.h b/include/uapi/linux/tipc.h
index 6b2fd4d9655f..7df026ea6aff 100644
--- a/include/uapi/linux/tipc.h
+++ b/include/uapi/linux/tipc.h
@@ -190,6 +190,7 @@ struct sockaddr_tipc {
#define TIPC_MCAST_REPLICAST 134 /* Default: TIPC selects. No arg */
#define TIPC_GROUP_JOIN 135 /* Takes struct tipc_group_req* */
#define TIPC_GROUP_LEAVE 136 /* No argument */
+#define TIPC_SOCK_RECVQ_USED 137 /* Default: none (read only) */
/*
* Flag values