linux/tools
Willem de Bruijn a0bc96c0cd selftests: net: verify fq per-band packet limit
Commit 29f834aa32 ("net_sched: sch_fq: add 3 bands and WRR
scheduling") introduces multiple traffic bands, and per-band maximum
packet count.

Per-band limits ensures that packets in one class cannot fill the
entire qdisc and so cause DoS to the traffic in the other classes.

Verify this behavior:
  1. set the limit to 10 per band
  2. send 20 pkts on band A: verify that 10 are queued, 10 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

Packets must remain queued for a period to trigger this behavior.
Use SO_TXTIME to store packets for 100 msec.

The test reuses existing upstream test infra. The script is a fork of
cmsg_time.sh. The scripts call cmsg_sender.

The test extends cmsg_sender with two arguments:

* '-P' SO_PRIORITY
  There is a subtle difference between IPv4 and IPv6 stack behavior:
  PF_INET/IP_TOS        sets IP header bits and sk_priority
  PF_INET6/IPV6_TCLASS  sets IP header bits BUT NOT sk_priority

* '-n' num pkts
  Send multiple packets in quick succession.
  I first attempted a for loop in the script, but this is too slow in
  virtualized environments, causing flakiness as the 100ms timeout is
  reached and packets are dequeued.

Also do not wait for timestamps to be queued unless timestamps are
requested.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20231116203449.2627525-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-11-20 17:48:36 -08:00
..
accounting
arch ARM: 2023-11-02 15:45:15 -10:00
bootconfig
bpf bpftool: Extend net dump with netkit progs 2023-10-24 16:07:32 -07:00
build perf tools fixes for v6.6: 2nd batch 2023-10-30 13:46:27 -07:00
certs
cgroup
counter
crypto/ccp crypto: ccp - Fix some unfused tests 2023-09-15 18:29:45 +08:00
debugging
edid
firewire
firmware
gpio
hv hv/hv_kvp_daemon:Support for keyfile based connection profile 2023-10-10 03:42:29 +00:00
iio tools: iio: iio_generic_buffer ensure alignment 2023-10-05 16:16:20 +01:00
include perf tools changes for v6.7 2023-11-03 08:17:38 -10:00
kvm/kvm_stat
laptop
leds
lib perf tools changes for v6.7 2023-11-03 08:17:38 -10:00
memory-model
mm tools/mm: update the usage output to be more organized 2023-10-18 14:34:19 -07:00
net/ynl nfsd: regenerate user space parsers after ynl-gen changes 2023-11-06 09:03:46 +00:00
objtool * Refactor and clean up TDX hypercall/module call infrastructure 2023-11-01 10:28:32 -10:00
pci
pcmcia
perf perf tools changes for v6.7 2023-11-03 08:17:38 -10:00
power Merge branch 'pm-tools' 2023-11-07 20:46:13 +01:00
rcu
scripts tools/build: Fix -s detection code in tools/scripts/Makefile.include 2023-10-18 15:29:47 -07:00
spi
testing selftests: net: verify fq per-band packet limit 2023-11-20 17:48:36 -08:00
thermal tools/thermal: Remove unused 'mds' and 'nrhandler' variables 2023-10-15 23:40:10 +02:00
time
tracing rtla: Fix uninitialized variable found 2023-10-30 19:00:12 +01:00
usb
verification verification/dot2k: Delete duplicate imports 2023-10-30 16:59:12 +01:00
virtio tools/virtio: Add dma sync api for virtio test 2023-10-16 05:32:23 -04:00
wmi
workqueue
Makefile