OSDN Git Service

tcp: Introduce tcp_read_skb()
authorCong Wang <cong.wang@bytedance.com>
Wed, 15 Jun 2022 16:20:11 +0000 (09:20 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 20 Jun 2022 12:05:52 +0000 (14:05 +0200)
commit04919bed948dc22a0032a9da867b7dcb8aece4ca
tree434852050f126b3f99b6bb2d73df48e4cbc1570c
parent4336487e30c37a2e82a1fed2370d3134cc5b6505
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
include/net/tcp.h
net/ipv4/tcp.c