diff options
author | Willem de Bruijn <willemb@google.com> | 2018-11-30 15:32:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-03 15:58:32 -0800 |
commit | db63e489c7aa03bab86960d6bcb6bf1fad8eea4e (patch) | |
tree | c8c872ef216758c80a3655edb104f00903eced8c /tools/testing/selftests/net/msg_zerocopy.c | |
parent | 52900d22288e7d45846037e1db277c665bbc40db (diff) | |
download | linux-db63e489c7aa03bab86960d6bcb6bf1fad8eea4e.tar.bz2 |
selftests: extend zerocopy tests to udp
Both msg_zerocopy and udpgso_bench have udp zerocopy variants.
Exercise these as part of the standard kselftest run.
With udp, msg_zerocopy has no control channel. Ensure that the
receiver exits after the sender by accounting for the initial
delay in starting them (in msg_zerocopy.sh).
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/net/msg_zerocopy.c')
-rw-r--r-- | tools/testing/selftests/net/msg_zerocopy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/msg_zerocopy.c b/tools/testing/selftests/net/msg_zerocopy.c index 406cc70c571d..4b02933cab8a 100644 --- a/tools/testing/selftests/net/msg_zerocopy.c +++ b/tools/testing/selftests/net/msg_zerocopy.c @@ -651,12 +651,13 @@ static void do_flush_datagram(int fd, int type) static void do_rx(int domain, int type, int protocol) { + const int cfg_receiver_wait_ms = 400; uint64_t tstop; int fd; fd = do_setup_rx(domain, type, protocol); - tstop = gettimeofday_ms() + cfg_runtime_ms; + tstop = gettimeofday_ms() + cfg_runtime_ms + cfg_receiver_wait_ms; do { if (type == SOCK_STREAM) do_flush_tcp(fd); |