Commit 108f9405 authored by Xiang Mei's avatar Xiang Mei Committed by Paolo Abeni
Browse files

selftests/tc-testing: Test CAKE scheduler when enqueue drops packets



Add tests that trigger packet drops in cake_enqueue(): "CAKE with QFQ
Parent - CAKE enqueue with packets dropping". It forces CAKE_enqueue to
return NET_XMIT_CN after dropping the packets when it has a QFQ parent.

Signed-off-by: default avatarXiang Mei <xmei5@asu.edu>
Reviewed-by: default avatarToke Høiland-Jørgensen <toke@toke.dk>
Link: https://patch.msgid.link/20251128001415.377823-3-xmei5@asu.edu


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 9fefc78f
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -1005,5 +1005,33 @@
        "teardown": [
            "$TC qdisc del dev $DUMMY clsact"
        ]
    },
    {
        "id": "4366",
        "name": "CAKE with QFQ Parent - CAKE enqueue with packets dropping",
        "category": [
            "qdisc",
            "cake",
            "netem"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup":[
            "$TC qdisc add dev $DUMMY handle 1: root qfq",
            "$TC class add dev $DUMMY parent 1: classid 1:1 qfq maxpkt 1024",
            "$TC qdisc add dev $DUMMY parent 1:1 handle 2: cake memlimit 9",
            "$TC filter add dev $DUMMY protocol ip parent 1: prio 1 u32 match ip protocol 1 0xff flowid 1:1",
            "ping -I$DUMMY -f -c1 -s64 -W1 10.10.10.1 || true",
            "$TC qdisc replace dev $DUMMY parent 1:1 handle 3: netem delay 0ms"
        ],
        "cmdUnderTest": "ping -I$DUMMY -f -c1 -s64 -W1 10.10.10.1 || true",
        "expExitCode": "0",
        "verifyCmd": "$TC -s qdisc show dev $DUMMY",
        "matchPattern": "qdisc qfq 1:",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root"
        ]
    }
]