History log of /linux-master/tools/testing/selftests/net/udpgso_bench.sh
Revision Date Author Comments
# dafe93b9 31-Jan-2023 Andrei Gherzan <andrei.gherzan@canonical.com>

selftests: net: udpgso_bench: Fix racing bug between the rx/tx programs

"udpgro_bench.sh" invokes udpgso_bench_rx/udpgso_bench_tx programs
subsequently and while doing so, there is a chance that the rx one is not
ready to accept socket connections. This racing bug could fail the test
with at least one of the following:

./udpgso_bench_tx: connect: Connection refused
./udpgso_bench_tx: sendmsg: Connection refused
./udpgso_bench_tx: write: Connection refused

This change addresses this by making udpgro_bench.sh wait for the rx
program to be ready before firing off the tx one - up to a 10s timeout.

Fixes: 3a687bef148d ("selftests: udp gso benchmark")
Signed-off-by: Andrei Gherzan <andrei.gherzan@canonical.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Willem de Bruijn <willemb@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20230201001612.515730-3-andrei.gherzan@canonical.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>


# b9680808 22-Jun-2022 Dimitris Michailidis <d.michailidis@fungible.com>

selftests/net: pass ipv6_args to udpgso_bench's IPv6 TCP test

udpgso_bench.sh has been running its IPv6 TCP test with IPv4 arguments
since its initial conmit. Looks like a typo.

Fixes: 3a687bef148d ("selftests: udp gso benchmark")
Cc: willemb@google.com
Signed-off-by: Dimitris Michailidis <dmichail@fungible.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20220623000234.61774-1-dmichail@fungible.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>


# 22f1a38a 18-Jun-2019 Willem de Bruijn <willemb@google.com>

selftests/net: make udpgso_bench skip unsupported testcases

Kselftest can be run against older kernels. Instead of failing hard
when a feature is unsupported, return the KSFT_SKIP exit code.

Specifically, do not fail hard on missing udp zerocopy.

The udp gso bench test runs multiple test cases from a single script.
Fail if any case fails, else return skip if any test is skipped.

Link: https://lore.kernel.org/lkml/20190618171516.GA17547@kroah.com/
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 4ffc37f5 17-Jun-2019 Fred Klassen <fklassen@appneta.com>

net/udpgso_bench.sh test fails on error

Ensure that failure on any individual test results in an overall
failure of the test script.

Signed-off-by: Fred Klassen <fklassen@appneta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# ade90d69 17-Jun-2019 Fred Klassen <fklassen@appneta.com>

net/udpgso_bench.sh add UDP GSO audit tests

Audit tests count the total number of messages sent and compares
with total number of CMSG received on error queue. Example:

udp gso zerocopy timestamp audit
udp rx: 1599 MB/s 1166414 calls/s
udp tx: 1615 MB/s 27395 calls/s 27395 msg/s
udp rx: 1634 MB/s 1192261 calls/s
udp tx: 1633 MB/s 27699 calls/s 27699 msg/s
udp rx: 1633 MB/s 1191358 calls/s
udp tx: 1631 MB/s 27678 calls/s 27678 msg/s
Summary over 4.000 seconds...
sum udp tx: 1665 MB/s 82772 calls (27590/s) 82772 msgs (27590/s)
Tx Timestamps: 82772 received 0 errors
Zerocopy acks: 82772 received

Errors are thrown if CMSG count does not equal send count,
example:

Summary over 4.000 seconds...
sum tcp tx: 7451 MB/s 493706 calls (123426/s) 493706 msgs (123426/s)
./udpgso_bench_tx: Unexpected number of Zerocopy completions: 493706 expected 493704 received

Also reduce individual test time from 4 to 3 seconds so that
overall test time does not increase significantly.

v3: Enhancements as per Willem de Bruijn <willemb@google.com>
- document -P option for TCP audit

Signed-off-by: Fred Klassen <fklassen@appneta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# db63e489 30-Nov-2018 Willem de Bruijn <willemb@google.com>

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>


# 3327a9c4 06-Nov-2018 Paolo Abeni <pabeni@redhat.com>

selftests: add functionals test for UDP GRO

Extends the existing udp programs to allow checking for proper
GRO aggregation/GSO size, and run the tests via a shell script, using
a veth pair with XDP program attached to trigger the GRO code path.

rfc v3 -> v1:
- use ip route to attach the xdp helper to the veth

rfc v2 -> rfc v3:
- add missing test program options documentation
- fix sporatic test failures (receiver faster than sender)

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 12a2ea96 11-Oct-2018 Paolo Abeni <pabeni@redhat.com>

selftests: udpgso_bench.sh explicitly requires bash

The udpgso_bench.sh script requires several bash-only features. This
may cause random failures if the default shell is not bash.
Address the above explicitly requiring bash as the script interpreter

Fixes: 3a687bef148d ("selftests: udp gso benchmark")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 8f19f12b 10-Jul-2018 Willem de Bruijn <willemb@google.com>

selftests: in udpgso_bench do not test udp zerocopy

The udpgso benchmark compares various configurations of UDP and TCP.
Including one that is not upstream, udp zerocopy. This is a leftover
from the earlier RFC patchset.

The test is part of kselftests and run in continuous spinners. Remove
the failing case to make the test start passing.

Fixes: 3a687bef148d ("selftests: udp gso benchmark")
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 3a687bef 26-Apr-2018 Willem de Bruijn <willemb@google.com>

selftests: udp gso benchmark

Send udp data between a source and sink, optionally with udp gso.
The two processes are expected to be run on separate hosts.

A script is included that runs them together over loopback in a
single namespace for functionality testing.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>