mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-23 23:39:58 +07:00
aacb0c2e52
After prior kernel change, mmap() on TCP socket only reserves VMA. We have to use getsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...) to perform the transfert of pages from skbs in TCP receive queue into such VMA. 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 */ }; After a successful getsockopt(...TCP_ZEROCOPY_RECEIVE...), @length contains number of bytes that were mapped, and @recv_skip_hint contains number of bytes that should be read using conventional read()/recv()/recvmsg() system calls, to skip a sequence of bytes that can not be mapped, because not properly page aligned. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Andy Lutomirski <luto@kernel.org> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> |
||
---|---|---|
.. | ||
forwarding | ||
.gitignore | ||
config | ||
fib_tests.sh | ||
fib-onlink-tests.sh | ||
in_netns.sh | ||
Makefile | ||
msg_zerocopy.c | ||
msg_zerocopy.sh | ||
netdevice.sh | ||
pmtu.sh | ||
psock_fanout.c | ||
psock_lib.h | ||
psock_tpacket.c | ||
reuseaddr_conflict.c | ||
reuseport_bpf_cpu.c | ||
reuseport_bpf_numa.c | ||
reuseport_bpf.c | ||
reuseport_dualstack.c | ||
rtnetlink.sh | ||
run_afpackettests | ||
run_netsocktests | ||
socket.c | ||
tcp_mmap.c | ||
test_bpf.sh | ||
udpgso_bench_rx.c | ||
udpgso_bench_tx.c | ||
udpgso_bench.sh | ||
udpgso.c | ||
udpgso.sh |