aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorCong Wang <cong.wang@bytedance.com>2022-06-15 09:20:11 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2022-06-20 14:05:52 +0200
commit04919bed948dc22a0032a9da867b7dcb8aece4ca (patch)
tree434852050f126b3f99b6bb2d73df48e4cbc1570c /include/net/tcp.h
parentMerge branch 'mlxsw-unified-bridge-conversion-part-1' (diff)
downloadlinux-dev-04919bed948dc22a0032a9da867b7dcb8aece4ca.tar.xz
linux-dev-04919bed948dc22a0032a9da867b7dcb8aece4ca.zip
tcp: Introduce tcp_read_skb()
This patch inroduces tcp_read_skb() based on tcp_read_sock(), a preparation for the next patch which actually introduces a new sock ops. TCP is special here, because it has tcp_read_sock() which is mainly used by splice(). tcp_read_sock() supports partial read and arbitrary offset, neither of them is needed for sockmap. Signed-off-by: Cong Wang <cong.wang@bytedance.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20220615162014.89193-2-xiyou.wangcong@gmail.com
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index c21a9b516f1e..7547d90fbb57 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -672,6 +672,8 @@ void tcp_get_info(struct sock *, struct tcp_info *);
/* Read 'sendfile()'-style from a TCP socket */
int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
sk_read_actor_t recv_actor);
+int tcp_read_skb(struct sock *sk, read_descriptor_t *desc,
+ sk_read_actor_t recv_actor);
void tcp_initialize_rcv_mss(struct sock *sk);