diff mbox series

[net-next] selftests/net: calibrate fq_band_pktlimit

Message ID 20240127023309.3746523-1-willemdebruijn.kernel@gmail.com (mailing list archive)
State Accepted
Commit 57bf3dd2fe91aa144d2c8f53b02dc4e65c9b1135
Delegated to: Netdev Maintainers
Headers show
Series [net-next] selftests/net: calibrate fq_band_pktlimit | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success Errors and warnings before: 1 this patch: 0
netdev/cc_maintainers success CCed 0 of 0 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success net selftest script(s) already in Makefile
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 34 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-01-31--06-00 (tests: 715)

Commit Message

Willem de Bruijn Jan. 27, 2024, 2:33 a.m. UTC
From: Willem de Bruijn <willemb@google.com>

This test validates per-band packet limits in FQ. Packets are dropped
rather than enqueued if the limit for their band is reached.

This test is timing sensitive. It queues packets in FQ with a future
delivery time to fill the qdisc.

The test failed in a virtual environment (vng). Increase the delays
to make it more tolerant to environments with timing variance.

Signed-off-by: Willem de Bruijn <willemb@google.com>
---
 tools/testing/selftests/net/fq_band_pktlimit.sh | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

Comments

Simon Horman Jan. 30, 2024, 2:55 p.m. UTC | #1
On Fri, Jan 26, 2024 at 09:33:03PM -0500, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@google.com>
> 
> This test validates per-band packet limits in FQ. Packets are dropped
> rather than enqueued if the limit for their band is reached.
> 
> This test is timing sensitive. It queues packets in FQ with a future
> delivery time to fill the qdisc.
> 
> The test failed in a virtual environment (vng). Increase the delays
> to make it more tolerant to environments with timing variance.
> 
> Signed-off-by: Willem de Bruijn <willemb@google.com>

Reviewed-by: Simon Horman <horms@kernel.org>
patchwork-bot+netdevbpf@kernel.org Jan. 31, 2024, 11:20 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Fri, 26 Jan 2024 21:33:03 -0500 you wrote:
> From: Willem de Bruijn <willemb@google.com>
> 
> This test validates per-band packet limits in FQ. Packets are dropped
> rather than enqueued if the limit for their band is reached.
> 
> This test is timing sensitive. It queues packets in FQ with a future
> delivery time to fill the qdisc.
> 
> [...]

Here is the summary with links:
  - [net-next] selftests/net: calibrate fq_band_pktlimit
    https://git.kernel.org/netdev/net-next/c/57bf3dd2fe91

You are awesome, thank you!
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/fq_band_pktlimit.sh b/tools/testing/selftests/net/fq_band_pktlimit.sh
index 24b77bdf41ff..977070ed42b3 100755
--- a/tools/testing/selftests/net/fq_band_pktlimit.sh
+++ b/tools/testing/selftests/net/fq_band_pktlimit.sh
@@ -8,7 +8,7 @@ 
 # 3. send 20 pkts on band A: verify that  0 are queued, 20 dropped
 # 4. send 20 pkts on band B: verify that 10 are queued, 10 dropped
 #
-# Send packets with a 100ms delay to ensure that previously sent
+# Send packets with a delay to ensure that previously sent
 # packets are still queued when later ones are sent.
 # Use SO_TXTIME for this.
 
@@ -29,19 +29,21 @@  ip -6 addr add fdaa::1/128 dev dummy0
 ip -6 route add fdaa::/64 dev dummy0
 tc qdisc replace dev dummy0 root handle 1: fq quantum 1514 initial_quantum 1514 limit 10
 
-./cmsg_sender -6 -p u -d 100000 -n 20 fdaa::2 8000
+DELAY=400000
+
+./cmsg_sender -6 -p u -d "${DELAY}" -n 20 fdaa::2 8000
 OUT1="$(tc -s qdisc show dev dummy0 | grep '^\ Sent')"
 
-./cmsg_sender -6 -p u -d 100000 -n 20 fdaa::2 8000
+./cmsg_sender -6 -p u -d "${DELAY}" -n 20 fdaa::2 8000
 OUT2="$(tc -s qdisc show dev dummy0 | grep '^\ Sent')"
 
-./cmsg_sender -6 -p u -d 100000 -n 20 -P 7 fdaa::2 8000
+./cmsg_sender -6 -p u -d "${DELAY}" -n 20 -P 7 fdaa::2 8000
 OUT3="$(tc -s qdisc show dev dummy0 | grep '^\ Sent')"
 
 # Initial stats will report zero sent, as all packets are still
-# queued in FQ. Sleep for the delay period (100ms) and see that
+# queued in FQ. Sleep for at least the delay period and see that
 # twenty are now sent.
-sleep 0.1
+sleep 0.6
 OUT4="$(tc -s qdisc show dev dummy0 | grep '^\ Sent')"
 
 # Log the output after the test