1[ 2 { 3 "id": "6430", 4 "name": "Create TBF with default setting", 5 "category": [ 6 "qdisc", 7 "tbf" 8 ], 9 "plugins": { 10 "requires": "nsPlugin" 11 }, 12 "setup": [ 13 "$IP link add dev $DUMMY type dummy || /bin/true" 14 ], 15 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root tbf limit 1000 burst 1500 rate 10000", 16 "expExitCode": "0", 17 "verifyCmd": "$TC qdisc show dev $DUMMY", 18 "matchPattern": "qdisc tbf 1: root refcnt [0-9]+ rate 10Kbit burst 1500b limit 1000b", 19 "matchCount": "1", 20 "teardown": [ 21 "$TC qdisc del dev $DUMMY handle 1: root", 22 "$IP link del dev $DUMMY type dummy" 23 ] 24 }, 25 { 26 "id": "0518", 27 "name": "Create TBF with mtu setting", 28 "category": [ 29 "qdisc", 30 "tbf" 31 ], 32 "plugins": { 33 "requires": "nsPlugin" 34 }, 35 "setup": [ 36 "$IP link add dev $DUMMY type dummy || /bin/true" 37 ], 38 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root tbf limit 1000 burst 1500 rate 20000 mtu 2048", 39 "expExitCode": "0", 40 "verifyCmd": "$TC qdisc show dev $DUMMY", 41 "matchPattern": "qdisc tbf 1: root refcnt [0-9]+ rate 20Kbit burst 1500b limit 1000b", 42 "matchCount": "1", 43 "teardown": [ 44 "$TC qdisc del dev $DUMMY handle 1: root", 45 "$IP link del dev $DUMMY type dummy" 46 ] 47 }, 48 { 49 "id": "320a", 50 "name": "Create TBF with peakrate setting", 51 "category": [ 52 "qdisc", 53 "tbf" 54 ], 55 "plugins": { 56 "requires": "nsPlugin" 57 }, 58 "setup": [ 59 "$IP link add dev $DUMMY type dummy || /bin/true" 60 ], 61 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root tbf limit 1000 burst 1500 rate 20000 mtu 1510 peakrate 30000", 62 "expExitCode": "0", 63 "verifyCmd": "$TC qdisc show dev $DUMMY", 64 "matchPattern": "qdisc tbf 1: root refcnt [0-9]+ rate 20Kbit burst 1500b peakrate 30Kbit minburst.*limit 1000b", 65 "matchCount": "1", 66 "teardown": [ 67 "$TC qdisc del dev $DUMMY handle 1: root", 68 "$IP link del dev $DUMMY type dummy" 69 ] 70 }, 71 { 72 "id": "239b", 73 "name": "Create TBF with latency setting", 74 "category": [ 75 "qdisc", 76 "tbf" 77 ], 78 "plugins": { 79 "requires": "nsPlugin" 80 }, 81 "setup": [ 82 "$IP link add dev $DUMMY type dummy || /bin/true" 83 ], 84 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root tbf burst 1500 rate 20000 latency 100ms", 85 "expExitCode": "0", 86 "verifyCmd": "$TC qdisc show dev $DUMMY", 87 "matchPattern": "qdisc tbf 1: root refcnt [0-9]+ rate 20Kbit burst 1500b lat 100ms", 88 "matchCount": "1", 89 "teardown": [ 90 "$TC qdisc del dev $DUMMY handle 1: root", 91 "$IP link del dev $DUMMY type dummy" 92 ] 93 }, 94 { 95 "id": "c975", 96 "name": "Create TBF with overhead setting", 97 "category": [ 98 "qdisc", 99 "tbf" 100 ], 101 "plugins": { 102 "requires": "nsPlugin" 103 }, 104 "setup": [ 105 "$IP link add dev $DUMMY type dummy || /bin/true" 106 ], 107 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root tbf limit 1000 burst 1500 rate 20000 overhead 300", 108 "expExitCode": "0", 109 "verifyCmd": "$TC qdisc show dev $DUMMY", 110 "matchPattern": "qdisc tbf 1: root refcnt [0-9]+ rate 20Kbit burst 1800b limit 1000b overhead 300", 111 "matchCount": "1", 112 "teardown": [ 113 "$TC qdisc del dev $DUMMY handle 1: root", 114 "$IP link del dev $DUMMY type dummy" 115 ] 116 }, 117 { 118 "id": "948c", 119 "name": "Create TBF with linklayer setting", 120 "category": [ 121 "qdisc", 122 "tbf" 123 ], 124 "plugins": { 125 "requires": "nsPlugin" 126 }, 127 "setup": [ 128 "$IP link add dev $DUMMY type dummy || /bin/true" 129 ], 130 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root tbf limit 1000 burst 1500 rate 20000 linklayer atm", 131 "expExitCode": "0", 132 "verifyCmd": "$TC qdisc show dev $DUMMY", 133 "matchPattern": "qdisc tbf 1: root refcnt [0-9]+ rate 20Kbit burst 1696b limit 1000b linklayer atm", 134 "matchCount": "1", 135 "teardown": [ 136 "$TC qdisc del dev $DUMMY handle 1: root", 137 "$IP link del dev $DUMMY type dummy" 138 ] 139 }, 140 { 141 "id": "3549", 142 "name": "Replace TBF with mtu", 143 "category": [ 144 "qdisc", 145 "tbf" 146 ], 147 "plugins": { 148 "requires": "nsPlugin" 149 }, 150 "setup": [ 151 "$IP link add dev $DUMMY type dummy || /bin/true", 152 "$TC qdisc add dev $DUMMY handle 1: root tbf limit 1000 burst 1500 rate 20000 linklayer atm" 153 ], 154 "cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 1: root tbf limit 1000 burst 1500 rate 20000 linklayer ethernet", 155 "expExitCode": "0", 156 "verifyCmd": "$TC qdisc show dev $DUMMY", 157 "matchPattern": "qdisc tbf 1: root refcnt [0-9]+ rate 20Kbit burst 1500b limit 1000b", 158 "matchCount": "1", 159 "teardown": [ 160 "$TC qdisc del dev $DUMMY handle 1: root", 161 "$IP link del dev $DUMMY type dummy" 162 ] 163 }, 164 { 165 "id": "f948", 166 "name": "Change TBF with latency time", 167 "category": [ 168 "qdisc", 169 "tbf" 170 ], 171 "plugins": { 172 "requires": "nsPlugin" 173 }, 174 "setup": [ 175 "$IP link add dev $DUMMY type dummy || /bin/true", 176 "$TC qdisc add dev $DUMMY handle 1: root tbf burst 1500 rate 20000 latency 10ms" 177 ], 178 "cmdUnderTest": "$TC qdisc change dev $DUMMY handle 1: root tbf burst 1500 rate 20000 latency 200ms", 179 "expExitCode": "0", 180 "verifyCmd": "$TC qdisc show dev $DUMMY", 181 "matchPattern": "qdisc tbf 1: root refcnt [0-9]+ rate 20Kbit burst 1500b lat 200ms", 182 "matchCount": "1", 183 "teardown": [ 184 "$TC qdisc del dev $DUMMY handle 1: root", 185 "$IP link del dev $DUMMY type dummy" 186 ] 187 }, 188 { 189 "id": "2348", 190 "name": "Show TBF class", 191 "category": [ 192 "qdisc", 193 "tbf" 194 ], 195 "plugins": { 196 "requires": "nsPlugin" 197 }, 198 "setup": [ 199 "$IP link add dev $DUMMY type dummy || /bin/true" 200 ], 201 "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root tbf limit 1000 burst 1500 rate 10000", 202 "expExitCode": "0", 203 "verifyCmd": "$TC class show dev $DUMMY", 204 "matchPattern": "class tbf.*parent 1:", 205 "matchCount": "1", 206 "teardown": [ 207 "$TC qdisc del dev $DUMMY handle 1: root", 208 "$IP link del dev $DUMMY type dummy" 209 ] 210 } 211] 212