linux_dsm_epyc7002/tools/testing/selftests/net
Eric Dumazet aacb0c2e52 selftests: net: tcp_mmap must use TCP_ZEROCOPY_RECEIVE
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>
2018-04-29 21:29:55 -04:00
..
forwarding selftests: forwarding: Test changes in mirror-to-gretap 2018-04-27 14:57:50 -04:00
.gitignore selftests: udp gso benchmark 2018-04-26 15:09:52 -04:00
config selftests/net: enable fragments for fib-onlink-tests 2018-03-08 11:14:02 -05:00
fib_tests.sh selftests: fib_tests: Add IPv6 nexthop spec tests 2018-03-16 11:28:39 -04:00
fib-onlink-tests.sh selftests: Add multipath tests for onlink flag 2018-03-22 12:37:05 -04:00
in_netns.sh selftests/net: fix in_netns.sh script 2018-03-07 12:26:05 -05:00
Makefile selftests: udp gso benchmark 2018-04-26 15:09:52 -04:00
msg_zerocopy.c selftests/net: reap zerocopy completions passed up as ancillary data. 2018-02-27 14:19:11 -05:00
msg_zerocopy.sh test: add msg_zerocopy test 2017-08-03 21:37:30 -07:00
netdevice.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pmtu.sh selftests: pmtu: Minimum MTU for vti6 is 68 2018-04-27 14:33:19 -04:00
psock_fanout.c selftests/net: ignore background traffic in psock_fanout 2018-02-23 12:47:05 -05:00
psock_lib.h selftests/net: Fixes psock_fanout CBPF test case 2017-04-20 15:39:19 -04:00
psock_tpacket.c tools: psock_tpacket: block Rx until socket filter has been added and socket has been bound to loopback. 2017-01-05 15:03:41 -05:00
reuseaddr_conflict.c selftest: add a reuseaddr test 2017-09-19 14:09:26 -06:00
reuseport_bpf_cpu.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
reuseport_bpf_numa.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
reuseport_bpf.c bpf: fix rlimit in reuseport net selftest 2018-02-09 14:46:37 -05:00
reuseport_dualstack.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rtnetlink.sh selftests: rtnetlink: remove testns on test fail 2018-03-04 18:36:15 -05:00
run_afpackettests selftests/net: ignore background traffic in psock_fanout 2018-02-23 12:47:05 -05:00
run_netsocktests License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
socket.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tcp_mmap.c selftests: net: tcp_mmap must use TCP_ZEROCOPY_RECEIVE 2018-04-29 21:29:55 -04:00
test_bpf.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
udpgso_bench_rx.c selftests: udp gso benchmark 2018-04-26 15:09:52 -04:00
udpgso_bench_tx.c selftests: udp gso benchmark 2018-04-26 15:09:52 -04:00
udpgso_bench.sh selftests: udp gso benchmark 2018-04-26 15:09:52 -04:00
udpgso.c selftests: udp gso with corking 2018-04-26 15:09:52 -04:00
udpgso.sh selftests: udp gso with corking 2018-04-26 15:09:52 -04:00