OSDN Git Service

net-tcp: Introduce tcp_recvmsg_locked().
authorArjun Roy <arjunroy@google.com>
Wed, 2 Dec 2020 22:53:43 +0000 (14:53 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 4 Dec 2020 21:40:52 +0000 (13:40 -0800)
commit2cd81161848daa9c1b5ba13ceb6ff067fbb86aa9
tree2cb311ff0f097436d225885b7d9e1b25163de9f3
parent18fb76ed53865c1b5d5f0157b1b825704590beb5
net-tcp: Introduce tcp_recvmsg_locked().

Refactor tcp_recvmsg() by splitting it into locked and unlocked
portions. Callers already holding the socket lock and not using
ERRQUEUE/cmsg/busy polling can simply call tcp_recvmsg_locked().
This is in preparation for a short-circuit copy performed by
TCP receive zerocopy for small (< PAGE_SIZE, or otherwise requested
by the user) reads.

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: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp.c