linux-stable/tools/testing/selftests
Vladimir Oltean 665338b2a7 net/sched: taprio: dump class stats for the actual q->qdiscs[]
This makes a difference for the software scheduling mode, where
dev_queue->qdisc_sleeping is the same as the taprio root Qdisc itself,
but when we're talking about what Qdisc and stats get reported for a
traffic class, the root taprio isn't what comes to mind, but q->qdiscs[]
is.

To understand the difference, I've attempted to send 100 packets in
software mode through class 8001:5, and recorded the stats before and
after the change.

Here is before:

$ tc -s class show dev eth0
class taprio 8001:1 root leaf 8001:
 Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:2 root leaf 8001:
 Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:3 root leaf 8001:
 Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:4 root leaf 8001:
 Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:5 root leaf 8001:
 Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:6 root leaf 8001:
 Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:7 root leaf 8001:
 Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:8 root leaf 8001:
 Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0

and here is after:

class taprio 8001:1 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:2 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:3 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:4 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:5 root
 Sent 9400 bytes 100 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:6 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:7 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0
class taprio 8001:8 root leaf 800d:
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 window_drops 0

The most glaring (and expected) difference is that before, all class
stats reported the global stats, whereas now, they really report just
the counters for that traffic class.

Finally, Pedro Tammela points out that there is a tc selftest which
checks specifically which handle do the child Qdiscs corresponding to
each class have. That's changing here - taprio no longer reports
tcm->tcm_info as the same handle "1:" as itself (the root Qdisc), but 0
(the handle of the default pfifo child Qdiscs). Since iproute2 does not
print a child Qdisc handle of 0, adjust the test's expected output.

Link: https://lore.kernel.org/netdev/3b83fcf6-a5e8-26fb-8c8a-ec34ec4c3342@mojatatu.com/
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20230807193324.4128292-6-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-08-09 15:59:21 -07:00
..
alsa selftests: ALSA: Add test-pcmtest-driver to .gitignore 2023-07-19 15:25:03 +02:00
amd-pstate linux-kselftest-next-6.4-rc1 2023-04-24 12:28:34 -07:00
arm64 selftests/arm64: fix build failure during the "emit_tests" step 2023-07-14 12:33:35 -06:00
bpf selftests/bpf: Add testcase for xdp attaching failure tracepoint 2023-08-02 14:21:12 -07:00
breakpoints
cachestat selftests: add selftests for cachestat 2023-06-09 16:25:17 -07:00
capabilities
cgroup selftests: cgroup: fix unexpected failure on test_memcg_sock 2023-06-23 16:59:26 -07:00
clone3 selftests/clone3: test clone3 with exit signal in flags 2023-06-12 16:39:11 -06:00
connector selftests: connector: Fix input argument error paths to skip 2023-07-31 20:11:42 -07:00
core selftests: core: Fix incorrect kernel headers search path 2023-01-30 15:04:52 -07:00
cpu-hotplug
cpufreq selftests/cpufreq: Don't enable generic lock debugging options 2023-06-12 16:39:11 -06:00
damon selftests: damon: add config file 2023-06-19 16:19:11 -07:00
dma
dmabuf-heaps selftests: dmabuf-heaps: Fix incorrect kernel headers search path 2023-02-13 09:09:44 -07:00
drivers selftests: mlxsw: router_bridge_lag: Add a new selftest 2023-08-09 15:27:51 -07:00
efivarfs selftests/efivarfs: Add checking of the test return value 2022-11-22 09:09:04 -07:00
exec
filesystems linux-kselftest-next-6.3-rc1 2023-02-23 09:37:29 -08:00
firmware
fpu
ftrace selftests/ftrace: Fix to check fprobe event eneblement 2023-07-26 12:54:17 +09:00
futex selftests: futex: Fix incorrect kernel headers search path 2023-02-13 09:09:44 -07:00
gpio gpio updates for v6.5 2023-06-29 10:11:10 -07:00
hid for-netdev 2023-07-13 19:13:24 -07:00
ia64
intel_pstate selftests/intel_pstate: fix build for ARCH=x86_64 2022-10-18 14:13:19 -06:00
iommu iommufd/selftest: Cover domain unmap with huge pages and access 2023-04-04 13:11:24 -03:00
ipc selftests: ipc: Fix incorrect kernel headers search path 2023-02-13 09:09:44 -07:00
ir
kcmp selftests: kcmp: Fix incorrect kernel headers search path 2023-02-13 09:09:45 -07:00
kexec selftests/kexec: fix build for ARCH=x86_64 2022-10-18 14:13:25 -06:00
kmod testing: use the copyleft-next-0.3.1 SPDX tag 2022-11-08 15:44:02 +01:00
kselftest selftests: allow runners to override the timeout 2023-06-12 16:39:11 -06:00
kvm KVM: selftests: Expand x86's sregs test to cover illegal CR0 values 2023-07-29 11:05:32 -04:00
landlock selftests/landlock: Add hostfs tests 2023-06-12 21:26:23 +02:00
lib
livepatch
lkdtm
locking
media_tests selftests: media_tests: Add new subtest to video_device_test 2023-06-12 16:39:10 -06:00
membarrier linux-kselftest-next-6.3-rc1 2023-02-23 09:37:29 -08:00
memfd selftests/memfd: fix test_sysctl 2023-04-18 16:53:52 -07:00
memory-hotplug selftests/memory-hotplug: Remove the redundant warning information 2022-10-18 14:21:18 -06:00
mincore selftests/mincore: fix skip condition for check_huge_pages test 2023-07-13 12:51:13 -06:00
mm selftests/mm: mkdirty: fix incorrect position of #endif 2023-07-17 12:53:22 -07:00
mount
mount_setattr selftests mount: Fix mount_setattr_test builds failed 2023-03-31 09:18:45 -06:00
move_mount_set_group selftests: move_mount_set_group: Fix incorrect kernel headers search path 2023-02-13 09:09:45 -07:00
mqueue
nci NFC: nci: Extend virtual NCI deinit test 2022-11-21 10:49:58 +00:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-03 14:34:37 -07:00
netfilter selftests: nft_flowtable.sh: check ingress/egress chain too 2023-05-10 09:31:07 +02:00
nolibc selftests/nolibc: make sure gcc always use little endian on MIPS 2023-06-09 11:46:10 -07:00
nsfs
ntb
openat2
perf_events selftests: perf_events: Fix incorrect kernel headers search path 2023-02-13 09:09:45 -07:00
pid_namespace selftests: pid_namespace: Fix incorrect kernel headers search path 2023-02-13 09:09:45 -07:00
pidfd selftest: pidfd: Omit long and repeating outputs 2023-06-12 16:39:11 -06:00
powerpc selftests/powerpc/dexcr: Add DEXCR status utility lsdexcr 2023-06-19 17:36:28 +10:00
prctl selftests: prctl: Fix spelling mistake "anonynous" -> "anonymous" 2023-06-12 16:39:10 -06:00
proc selftests/proc: Assert clock_gettime(CLOCK_BOOTTIME) VS /proc/uptime monotonicity 2023-04-18 16:35:13 +02:00
pstore
ptp selftests/ptp: Add -X option for testing PTP_SYS_OFFSET_PRECISE 2023-07-28 10:59:40 +01:00
ptrace Update for entry and ptrace: 2023-04-25 11:05:04 -07:00
rcutorture A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
resctrl selftests/resctrl: Fix incorrect error return on test complete 2023-04-14 11:13:18 -06:00
riscv selftests/riscv: fix potential build failure during the "emit_tests" step 2023-07-14 12:32:42 -06:00
rlimits
rseq selftests/rseq: Play nice with binaries statically linked against glibc 2.35+ 2023-07-29 11:05:28 -04:00
rtc selftests: rtc: skip when RTC is not present 2022-11-15 13:30:51 -07:00
safesetid
sched selftests: sched: Add more core schedule prctl calls 2023-03-28 10:27:07 -06:00
seccomp LoongArch changes for v6.3 2023-03-01 09:27:00 -08:00
sgx selftests/sgx: Add "test_encl.elf" to TEST_FILES 2023-05-08 11:01:03 -06:00
sigaltstack selftests: sigaltstack: fix -Wuninitialized 2023-03-20 17:28:31 -06:00
size
sparc64
splice selftests: splice_read: Fix sysfs read cases 2022-11-29 17:28:31 -07:00
static_keys
sync selftests: sync: Fix incorrect kernel headers search path 2023-02-13 09:09:45 -07:00
syscall_user_dispatch
sysctl test_sysclt: Test for registering a mount point 2023-06-18 02:32:54 -07:00
tc-testing net/sched: taprio: dump class stats for the actual q->qdiscs[] 2023-08-09 15:59:21 -07:00
tdx selftests: tdx: Use installed kernel headers search path 2023-02-13 09:09:46 -07:00
timens selftests/timens: add a test for vfork+exit 2022-10-25 15:15:52 -07:00
timers tools: timers: fix freq average calculation 2023-07-13 13:32:36 -06:00
tmpfs
tpm2 selftests: tpm2: remove redundant ord() 2023-02-13 09:09:46 -07:00
tty selftests: tty: add selftest for tty timestamp updates 2023-06-15 13:45:42 +02:00
uevent
user
user_events selftests/user_events: Test struct size match cases 2023-07-12 12:04:47 -04:00
vDSO kselftest: vDSO: Fix accumulation of uninitialized ret when CLOCK_REALTIME is undefined 2023-06-12 16:39:10 -06:00
watchdog selftests/watchdog: Fix spelling mistake "Temeprature" -> "Temperature" 2022-10-27 02:53:37 -06:00
wireguard wireguard: netlink: send staged packets when setting initial private key 2023-07-03 09:17:52 +01:00
x86 Add support for new Linear Address Masking CPU feature. This is similar 2023-04-28 09:43:49 -07:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest.h kselftest: Support nolibc 2023-04-11 14:10:47 -06:00
kselftest_deps.sh selftests/vm: rename selftests/vm to selftests/mm 2023-01-18 17:12:56 -08:00
kselftest_harness.h selftests/harness: allow tests to be skipped during setup 2023-06-15 22:24:01 -07:00
kselftest_install.sh
kselftest_module.h
lib.mk selftests: error out if kernel header files are not yet built 2023-06-19 16:19:03 -07:00
Makefile connector/cn_proc: Selftest for proc connector 2023-07-23 11:34:22 +01:00
run_kselftest.sh kselftests: Sort the collections list to avoid duplicate tests 2023-06-12 16:39:11 -06:00