Re: [PATCH net 2/2] selftests: tc-testing: add TCA_STAB overhead rejection tests for DRR and ETS
Jamal Hadi Salim <[email protected]>
| Newsgroups | org.kernel.vger.netdev,org.kernel.vger.stable |
|---|---|
| Message-ID | <CAM0EoM=J1YnjBLpCOPjDwFOOwAYgZLtOXCYffTmi=w5Ne40bGw@mail.gmail.com> |
On Tue, Aug 18, 2026 at 6:17 AM Jamal Hadi Salim <[email protected]> wrote: > > Add tdc test cases that verify a qdisc with an oversized TCA_STAB > overhead (2147483000) is rejected. Without the fix, the qdisc is > accepted and a single packet drives the deficit loop into a soft > lockup; with the fix, the add fails with -EINVAL. > > Reported-by: [email protected] > Tested-by: Victor Nogueira <[email protected]> > Signed-off-by: Jamal Hadi Salim <[email protected]> > --- > .../tc-testing/tc-tests/qdiscs/drr.json | 20 +++++++++++++++++++ > .../tc-testing/tc-tests/qdiscs/ets.json | 20 +++++++++++++++++++ > 2 files changed, 40 insertions(+) > > diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/drr.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/drr.json > index 2b61d8d79bde..7713eb35aaeb 100644 > --- a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/drr.json > +++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/drr.json > @@ -86,5 +86,25 @@ > "teardown": [ > "$TC qdisc del dev $DUMMY root" > ] > + }, > + { > + "id": "d1e2", > + "name": "Reject DRR qdisc with oversized TCA_STAB overhead", > + "category": [ > + "qdisc", > + "drr" > + ], > + "plugins": { > + "requires": "nsPlugin" > + }, > + "setup": [ > + ], > + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root stab overhead 2147483000 drr", > + "expExitCode": "2", > + "verifyCmd": "$TC qdisc show dev $DUMMY", > + "matchPattern": "qdisc drr", > + "matchCount": "0", > + "teardown": [ > + ] > } > ] > diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/ets.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/ets.json > index ee09e6d6fdf3..da7ae626f7e1 100644 > --- a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/ets.json > +++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/ets.json > @@ -1007,5 +1007,25 @@ > "teardown": [ > "echo \"1\" > /sys/bus/netdevsim/del_device" > ] > + }, > + { > + "id": "f3a4", > + "name": "Reject ETS qdisc with oversized TCA_STAB overhead", > + "category": [ > + "qdisc", > + "ets" > + ], > + "plugins": { > + "requires": "nsPlugin" > + }, > + "setup": [ > + ], > + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root stab overhead 2147483000 ets bands 1 strict 0 quanta 1", > + "expExitCode": "2", > + "verifyCmd": "$TC qdisc show dev $DUMMY", > + "matchPattern": "qdisc ets", > + "matchCount": "0", > + "teardown": [ > + ] > } > ] > -- > 2.43.0 V2 had a different title. -- pw-bot: cr >