aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/tcp.h
diff options
context:
space:
mode:
authorArjun Roy <arjunroy@google.com>2020-02-14 15:30:49 -0800
committerDavid S. Miller <davem@davemloft.net>2020-02-16 19:25:02 -0800
commitc8856c051454909e5059df4e81c77b9c366c5515 (patch)
tree72b78bb1392b3d2209b387599d8f15fbb2fcae5c /include/uapi/linux/tcp.h
parentMerge branch 'Enhance-virtio-vsock-connection-semantics' (diff)
downloadlinux-dev-c8856c051454909e5059df4e81c77b9c366c5515.tar.xz
linux-dev-c8856c051454909e5059df4e81c77b9c366c5515.zip
tcp-zerocopy: Return inq along with tcp receive zerocopy.
This patchset is intended to reduce the number of extra system calls imposed by TCP receive zerocopy. For ping-pong RPC style workloads, this patchset has demonstrated a system call reduction of about 30% when coupled with userspace changes. For applications using edge-triggered epoll, returning inq along with the result of tcp receive zerocopy could remove the need to call recvmsg()=-EAGAIN after a successful zerocopy. Generally speaking, since normally we would need to perform a recvmsg() call for every successful small RPC read via TCP receive zerocopy, returning inq can reduce the number of system calls performed by approximately half. Signed-off-by: Arjun Roy <arjunroy@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/tcp.h')
-rw-r--r--include/uapi/linux/tcp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index fd9eb8f6bcae..548f480b9c66 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -345,5 +345,6 @@ struct tcp_zerocopy_receive {
__u64 address; /* in: address of mapping */
__u32 length; /* in/out: number of bytes to map/mapped */
__u32 recv_skip_hint; /* out: amount of bytes to skip */
+ __u32 inq; /* out: amount of bytes in read queue */
};
#endif /* _UAPI_LINUX_TCP_H */