xref: /linux/tools/testing/selftests/tc-testing/tc-tests/qdiscs/mqprio.json (revision fd7d598270724cc787982ea48bbe17ad383a8b7f)
1[
2    {
3        "id": "9903",
4        "name": "Add mqprio Qdisc to multi-queue device (8 queues)",
5        "category": [
6            "qdisc",
7            "mqprio"
8        ],
9        "plugins": {
10            "requires": "nsPlugin"
11        },
12        "setup": [
13            "echo \"1 1 8\" > /sys/bus/netdevsim/new_device"
14        ],
15        "cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: mqprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 0",
16        "expExitCode": "0",
17        "verifyCmd": "$TC qdisc show dev $ETH",
18        "matchPattern": "qdisc mqprio 1: root tc 8 map 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0.*queues:\\(0:0\\) \\(1:1\\) \\(2:2\\) \\(3:3\\) \\(4:4\\) \\(5:5\\) \\(6:6\\) \\(7:7\\)",
19        "matchCount": "1",
20        "teardown": [
21            "echo \"1\" > /sys/bus/netdevsim/del_device"
22        ]
23    },
24    {
25        "id": "453a",
26        "name": "Delete nonexistent mqprio Qdisc",
27        "category": [
28            "qdisc",
29            "mqprio"
30        ],
31        "plugins": {
32            "requires": "nsPlugin"
33        },
34        "setup": [
35            "echo \"1 1 4\" > /sys/bus/netdevsim/new_device"
36        ],
37        "cmdUnderTest": "$TC qdisc del dev $ETH root handle 1: mqprio",
38        "expExitCode": "2",
39        "verifyCmd": "$TC qdisc show dev $ETH",
40        "matchPattern": "qdisc mqprio 1: root",
41        "matchCount": "0",
42        "teardown": [
43            "echo \"1\" > /sys/bus/netdevsim/del_device"
44        ]
45    },
46    {
47        "id": "5292",
48        "name": "Delete mqprio Qdisc twice",
49        "category": [
50            "qdisc",
51            "mqprio"
52        ],
53        "plugins": {
54            "requires": "nsPlugin"
55        },
56        "setup": [
57            "echo \"1 1 8\" > /sys/bus/netdevsim/new_device",
58            "$TC qdisc add dev $ETH root handle 1: mqprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 0",
59            "$TC qdisc del dev $ETH root handle 1:"
60        ],
61        "cmdUnderTest": "$TC qdisc del dev $ETH root handle 1:",
62        "expExitCode": "2",
63        "verifyCmd": "$TC qdisc show dev $ETH",
64        "matchPattern": "qdisc mqprio 1: root",
65        "matchCount": "0",
66        "teardown": [
67            "echo \"1\" > /sys/bus/netdevsim/del_device"
68        ]
69    },
70    {
71        "id": "45a9",
72        "name": "Add mqprio Qdisc to single-queue device",
73        "category": [
74            "qdisc",
75            "mqprio"
76        ],
77        "plugins": {
78            "requires": "nsPlugin"
79        },
80        "setup": [
81            "echo \"1 1\" > /sys/bus/netdevsim/new_device"
82        ],
83        "cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: mqprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 0",
84        "expExitCode": "2",
85        "verifyCmd": "$TC qdisc show dev $ETH",
86        "matchPattern": "qdisc mqprio 1: root",
87        "matchCount": "0",
88        "teardown": [
89            "echo \"1\" > /sys/bus/netdevsim/del_device"
90        ]
91    },
92    {
93        "id": "2ba9",
94        "name": "Show mqprio class",
95        "category": [
96            "qdisc",
97            "mqprio"
98        ],
99        "plugins": {
100            "requires": "nsPlugin"
101        },
102        "setup": [
103            "echo \"1 1 8\" > /sys/bus/netdevsim/new_device"
104        ],
105        "cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: mqprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 0",
106        "expExitCode": "0",
107        "verifyCmd": "$TC class show dev $ETH",
108        "matchPattern": "class mqprio 1:",
109        "matchCount": "16",
110        "teardown": [
111            "echo \"1\" > /sys/bus/netdevsim/del_device"
112        ]
113    }
114]
115