selftests/net: report rcv_mss in tcp_mmap
authorWillem de Bruijn <willemb@google.com>
Mon, 31 Jul 2023 18:08:09 +0000 (14:08 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Aug 2023 10:40:49 +0000 (11:40 +0100)
commitbd60438eeb1ebe9415b157398083b4910c7f0aa3
treec86b1a8c3aff424cd4acc3b07a1e01b5c54c73fe
parent27bcd12295164c710369a94e56dc1ddfee1bbb75
selftests/net: report rcv_mss in tcp_mmap

tcp_mmap tests TCP_ZEROCOPY_RECEIVE. If 0% of data is received using
mmap, this may be due to mss. Report rcv_mss to identify this cause.

Output of a run failed due to too small mss:

    received 32768 MB (0 % mmap'ed) in 8.40458 s, 32.7057 Gbit
      cpu usage user:0.027922 sys:8.21126, 251.44 usec per MB, 3252 c-switches, rcv_mss 1428

Output on a successful run:

    received 32768 MB (99.9507 % mmap'ed) in 4.69023 s, 58.6064 Gbit
      cpu usage user:0.029172 sys:2.56105, 79.0473 usec per MB, 57591 c-switches, rcv_mss 4096

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/tcp_mmap.c