selftests/tc-testing: Add tests for restrictions on netem duplication
authorWilliam Liu <will@willsroot.io>
Tue, 8 Jul 2025 16:44:05 +0000 (16:44 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Jul 2025 22:50:21 +0000 (15:50 -0700)
commitecdec65ec78d67d3ebd17edc88b88312054abe0d
treefe6eed74efa8f99e6df970419bdf4c5c48ac8bce
parentec8e0e3d7adef940cdf9475e2352c0680189d14e
selftests/tc-testing: Add tests for restrictions on netem duplication

Ensure that a duplicating netem cannot exist in a tree with other netems
in both qdisc addition and change. This is meant to prevent the soft
lockup and OOM loop scenario discussed in [1]. Also adjust a HFSC's
re-entrancy test case with netem for this new restriction - KASAN
still triggers upon its failure.

[1] https://lore.kernel.org/netdev/8DuRWwfqjoRDLDmBMlIfbrsZg9Gx50DHJc1ilxsEBNe2D6NMoigR_eIRIG0LOjMc3r10nUUZtArXx4oZBIdUfZQrwjcQhdinnMis_0G7VEk=@willsroot.io/

Signed-off-by: William Liu <will@willsroot.io>
Reviewed-by: Savino Dicanosa <savy@syst3mfailure.io>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/20250708164219.875521-1-will@willsroot.io
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json
tools/testing/selftests/tc-testing/tc-tests/qdiscs/netem.json