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", 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 "id": "3e1e", 137 "name": "Add taprio Qdisc with an invalid cycle-time", 138 "category": [ 139 "qdisc", 140 "taprio" 141 ], 142 "plugins": { 143 "requires": "nsPlugin" 144 }, 145 "setup": [ 146 "echo \"1 1 8\" > /sys/bus/netdevsim/new_device", 147 "$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 cycle-time 4294967296 || /bin/true", 148 "$IP link set dev $ETH up", 149 "$IP addr add 10.10.10.10/24 dev $ETH" 150 ], 151 "cmdUnderTest": "/bin/true", 152 "expExitCode": "0", 153 "verifyCmd": "$TC qdisc show dev $ETH", 154 "matchPattern": "qdisc taprio 1: root refcnt", 155 "matchCount": "0", 156 "teardown": [ 157 "echo \"1\" > /sys/bus/netdevsim/del_device" 158 ] 159 }, 160 { 161 "id": "39b4", 162 "name": "Reject grafting taprio as child qdisc of software taprio", 163 "category": [ 164 "qdisc", 165 "taprio" 166 ], 167 "plugins": { 168 "requires": "nsPlugin" 169 }, 170 "setup": [ 171 "echo \"1 1 8\" > /sys/bus/netdevsim/new_device", 172 "$TC qdisc replace dev $ETH handle 8001: parent root stab overhead 24 taprio 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 base-time 0 sched-entry S ff 20000000 clockid CLOCK_TAI", 173 "./taprio_wait_for_admin.sh $TC $ETH" 174 ], 175 "cmdUnderTest": "$TC qdisc replace dev $ETH parent 8001:7 taprio 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 base-time 200 sched-entry S ff 20000000 clockid CLOCK_TAI", 176 "expExitCode": "2", 177 "verifyCmd": "bash -c \"./taprio_wait_for_admin.sh $TC $ETH && $TC -j qdisc show dev $ETH root | jq '.[].options.base_time'\"", 178 "matchPattern": "0", 179 "matchCount": "1", 180 "teardown": [ 181 "$TC qdisc del dev $ETH root", 182 "echo \"1\" > /sys/bus/netdevsim/del_device" 183 ] 184 }, 185 { 186 "id": "e8a1", 187 "name": "Reject grafting taprio as child qdisc of offloaded taprio", 188 "category": [ 189 "qdisc", 190 "taprio" 191 ], 192 "plugins": { 193 "requires": "nsPlugin" 194 }, 195 "setup": [ 196 "echo \"1 1 8\" > /sys/bus/netdevsim/new_device", 197 "$TC qdisc replace dev $ETH handle 8001: parent root stab overhead 24 taprio 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 base-time 0 sched-entry S ff 20000000 flags 0x2", 198 "./taprio_wait_for_admin.sh $TC $ETH" 199 ], 200 "cmdUnderTest": "$TC qdisc replace dev $ETH parent 8001:7 taprio 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 base-time 200 sched-entry S ff 20000000 flags 0x2", 201 "expExitCode": "2", 202 "verifyCmd": "bash -c \"./taprio_wait_for_admin.sh $TC $ETH && $TC -j qdisc show dev $ETH root | jq '.[].options.base_time'\"", 203 "matchPattern": "0", 204 "matchCount": "1", 205 "teardown": [ 206 "$TC qdisc del dev $ETH root", 207 "echo \"1\" > /sys/bus/netdevsim/del_device" 208 ] 209 }, 210 { 211 "id": "a7bf", 212 "name": "Graft cbs as child of software taprio", 213 "category": [ 214 "qdisc", 215 "taprio", 216 "cbs" 217 ], 218 "plugins": { 219 "requires": "nsPlugin" 220 }, 221 "setup": [ 222 "echo \"1 1 8\" > /sys/bus/netdevsim/new_device", 223 "$TC qdisc replace dev $ETH handle 8001: parent root stab overhead 24 taprio 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 base-time 0 sched-entry S ff 20000000 clockid CLOCK_TAI" 224 ], 225 "cmdUnderTest": "$TC qdisc replace dev $ETH handle 8002: parent 8001:8 cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470", 226 "expExitCode": "0", 227 "verifyCmd": "$TC -d qdisc show dev $ETH", 228 "matchPattern": "qdisc cbs 8002: parent 8001:8 hicredit 30 locredit -1470 sendslope -980000 idleslope 20000 offload 0", 229 "matchCount": "1", 230 "teardown": [ 231 "$TC qdisc del dev $ETH root", 232 "echo \"1\" > /sys/bus/netdevsim/del_device" 233 ] 234 }, 235 { 236 "id": "6a83", 237 "name": "Graft cbs as child of offloaded taprio", 238 "category": [ 239 "qdisc", 240 "taprio", 241 "cbs" 242 ], 243 "plugins": { 244 "requires": "nsPlugin" 245 }, 246 "setup": [ 247 "echo \"1 1 8\" > /sys/bus/netdevsim/new_device", 248 "$TC qdisc replace dev $ETH handle 8001: parent root stab overhead 24 taprio 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 base-time 0 sched-entry S ff 20000000 flags 0x2" 249 ], 250 "cmdUnderTest": "$TC qdisc replace dev $ETH handle 8002: parent 8001:8 cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470", 251 "expExitCode": "0", 252 "verifyCmd": "$TC -d qdisc show dev $ETH", 253 "matchPattern": "qdisc cbs 8002: parent 8001:8 refcnt 2 hicredit 30 locredit -1470 sendslope -980000 idleslope 20000 offload 0", 254 "matchCount": "1", 255 "teardown": [ 256 "$TC qdisc del dev $ETH root", 257 "echo \"1\" > /sys/bus/netdevsim/del_device" 258 ] 259 } 260] 261