1[
2    {
3        "id": "ba39",
4        "name": "Add taprio Qdisc to multi-queue device (8 queues)",
5        "category": [
6            "qdisc",
7            "taprio"
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: taprio num_tc 3 map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@0 1@0 base-time 1000000000 sched-entry S 01 300000 flags 0x1 clockid CLOCK_TAI",
16        "expExitCode": "0",
17        "verifyCmd": "$TC qdisc show dev $ETH",
18        "matchPattern": "qdisc taprio 1: root refcnt [0-9]+ tc 3 map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2",
19        "matchCount": "1",
20        "teardown": [
21            "echo \"1\" > /sys/bus/netdevsim/del_device"
22        ]
23    },
24    {
25        "id": "9462",
26        "name": "Add taprio Qdisc with multiple sched-entry",
27        "category": [
28            "qdisc",
29            "taprio"
30        ],
31        "plugins": {
32            "requires": "nsPlugin"
33        },
34        "setup": [
35            "echo \"1 1 8\" > /sys/bus/netdevsim/new_device"
36        ],
37        "cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: taprio num_tc 3 map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@0 1@0 base-time 1000000000 sched-entry S 01 300000 sched-entry S 03 300000 sched-entry S 04 400000 flags 0x1 clockid CLOCK_TAI",
38        "expExitCode": "0",
39        "verifyCmd": "$TC qdisc show dev $ETH",
40        "matchPattern": "index [0-9]+ cmd S gatemask 0x[0-9]+ interval [0-9]+00000",
41        "matchCount": "3",
42        "teardown": [
43            "echo \"1\" > /sys/bus/netdevsim/del_device"
44        ]
45    },
46    {
47        "id": "8d92",
48        "name": "Add taprio Qdisc with txtime-delay",
49        "category": [
50            "qdisc",
51            "taprio"
52        ],
53        "plugins": {
54            "requires": "nsPlugin"
55        },
56        "setup": [
57            "echo \"1 1 8\" > /sys/bus/netdevsim/new_device"
58        ],
59        "cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: taprio num_tc 3 map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@0 1@0 base-time 1000000000 sched-entry S 01 300000 flags 0x1 txtime-delay 500000 clockid CLOCK_TAI",
60        "expExitCode": "0",
61        "verifyCmd": "$TC qdisc show dev $ETH",
62        "matchPattern": "clockid TAI flags 0x1 txtime delay 500000",
63        "matchCount": "1",
64        "teardown": [
65            "echo \"1\" > /sys/bus/netdevsim/del_device"
66        ]
67    },
68    {
69        "id": "d092",
70        "name": "Delete taprio Qdisc with valid handle",
71        "category": [
72            "qdisc",
73            "taprio"
74        ],
75        "plugins": {
76            "requires": "nsPlugin"
77        },
78        "setup": [
79            "echo \"1 1 8\" > /sys/bus/netdevsim/new_device",
80            "$TC qdisc add dev $ETH root handle 1: taprio num_tc 3 map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@0 1@0 base-time 1000000000 sched-entry S 01 300000 flags 0x1 clockid CLOCK_TAI"
81        ],
82        "cmdUnderTest": "$TC qdisc del dev $ETH root handle 1:",
83        "expExitCode": "0",
84        "verifyCmd": "$TC qdisc show dev $ETH",
85        "matchPattern": "qdisc taprio 1: root refcnt",
86        "matchCount": "0",
87        "teardown": [
88            "echo \"1\" > /sys/bus/netdevsim/del_device"
89        ]
90    },
91    {
92        "id": "8471",
93        "name": "Show taprio class",
94        "category": [
95            "qdisc",
96            "taprio"
97        ],
98        "plugins": {
99            "requires": "nsPlugin"
100        },
101        "setup": [
102            "echo \"1 1 8\" > /sys/bus/netdevsim/new_device"
103        ],
104        "cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: taprio num_tc 3 map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@0 1@0 base-time 1000000000 sched-entry S 01 300000 flags 0x1 clockid CLOCK_TAI",
105        "expExitCode": "0",
106        "verifyCmd": "$TC class show dev $ETH",
107        "matchPattern": "class taprio 1:[0-9]+ root leaf 1:",
108        "matchCount": "8",
109        "teardown": [
110            "echo \"1\" > /sys/bus/netdevsim/del_device"
111        ]
112    },
113    {
114        "id": "0a85",
115        "name": "Add taprio Qdisc to single-queue device",
116        "category": [
117            "qdisc",
118            "taprio"
119        ],
120        "plugins": {
121            "requires": "nsPlugin"
122        },
123        "setup": [
124            "echo \"1 1\" > /sys/bus/netdevsim/new_device"
125        ],
126        "cmdUnderTest": "$TC qdisc add dev $ETH root handle 1: taprio num_tc 3 map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@0 1@0 base-time 1000000000 sched-entry S 01 300000 flags 0x1 clockid CLOCK_TAI",
127        "expExitCode": "2",
128        "verifyCmd": "$TC qdisc show dev $ETH",
129        "matchPattern": "qdisc taprio 1: root refcnt",
130        "matchCount": "0",
131        "teardown": [
132            "echo \"1\" > /sys/bus/netdevsim/del_device"
133        ]
134    }
135]
136