Commit 57bf3dd2 authored by Willem de Bruijn's avatar Willem de Bruijn Committed by David S. Miller

selftests/net: calibrate fq_band_pktlimit

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: default avatarWillem de Bruijn <willemb@google.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 14850821
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# 3. send 20 pkts on band A: verify that 0 are queued, 20 dropped # 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 # 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. # packets are still queued when later ones are sent.
# Use SO_TXTIME for this. # Use SO_TXTIME for this.
...@@ -29,19 +29,21 @@ ip -6 addr add fdaa::1/128 dev dummy0 ...@@ -29,19 +29,21 @@ ip -6 addr add fdaa::1/128 dev dummy0
ip -6 route add fdaa::/64 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 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')" 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')" 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')" OUT3="$(tc -s qdisc show dev dummy0 | grep '^\ Sent')"
# Initial stats will report zero sent, as all packets are still # 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. # twenty are now sent.
sleep 0.1 sleep 0.6
OUT4="$(tc -s qdisc show dev dummy0 | grep '^\ Sent')" OUT4="$(tc -s qdisc show dev dummy0 | grep '^\ Sent')"
# Log the output after the test # Log the output after the test
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment