]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: net: udpgso_bench_tx: Cater for pending datagrams zerocopy benchmarking
authorAndrei Gherzan <andrei.gherzan@canonical.com>
Wed, 1 Feb 2023 00:16:16 +0000 (00:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:11 +0000 (11:28 +0100)
commit0e7fa79ff703cafa03998af3a737cd8ef3bcad8e
tree1c80ec9e29cf5a061cbc93b4cf4fee1d40b0c8dd
parent1dba112dbd9d6d4a359b672176b71a91511ddca7
selftests: net: udpgso_bench_tx: Cater for pending datagrams zerocopy benchmarking

[ Upstream commit 329c9cd769c2e306957df031efff656c40922c76 ]

The test tool can check that the zerocopy number of completions value is
valid taking into consideration the number of datagram send calls. This can
catch the system into a state where the datagrams are still in the system
(for example in a qdisk, waiting for the network interface to return a
completion notification, etc).

This change adds a retry logic of computing the number of completions up to
a configurable (via CLI) timeout (default: 2 seconds).

Fixes: 4f97dfe4e1e0 ("net/udpgso_bench_tx: options to exercise TX CMSG")
Signed-off-by: Andrei Gherzan <andrei.gherzan@canonical.com>
Cc: Willem de Bruijn <willemb@google.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20230201001612.515730-4-andrei.gherzan@canonical.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/udpgso_bench_tx.c