Dan Talayco | 412ea94 | 2012-04-23 15:06:50 -0700 | [diff] [blame] | 1 | |
| 2 | |
| 3 | DRAFT TEST PLAN FOR TESTING TOP-HALF OF OpenFlow 1.0 SWITCH |
| 4 | |
| 5 | Draft 2 - 23 Apr 2012 |
| 6 | |
| 7 | |
| 8 | |
| 9 | 1. GENERAL |
| 10 | =========== |
| 11 | |
| 12 | 1.1 Test particular implementation, not OpenFlow protocol |
| 13 | |
| 14 | This test plan is intended to test the function of those features of an OF |
| 15 | agent implementation that would be particular to a given switch, |
| 16 | i.e. semantics of various OF operations are correctly implemented on a given |
| 17 | switch. |
| 18 | It is NOT intended to test: |
| 19 | - syntactic featues, such as badly formed OF protocol messages, etc., nor |
| 20 | - semantic features that would be common to all implementations, e.g. |
| 21 | qualifying on a VLAN id > 4095, an action to set VLAN PCP to a value > 7, |
| 22 | etc. |
| 23 | |
| 24 | |
| 25 | 2. FLOW ADD |
| 26 | ============ |
| 27 | |
| 28 | 2.5 FLOW ADD 5 |
| 29 | --------------- |
| 30 | |
| 31 | OVERVIEW |
| 32 | - Add flows to switch, read back and verify flow configurations |
| 33 | |
| 34 | PURPOSE |
| 35 | - Test acceptance of flow adds |
| 36 | - Test ability of switch to process additions to flow table in random |
| 37 | priority order |
| 38 | - Test correctness of flow configuration responses |
| 39 | |
| 40 | INPUTS |
| 41 | - NUM_FLOWS: number of flows to define; 0 => maximum number of flows, as |
| 42 | determined from switch capabilities |
| 43 | |
| 44 | PROCESS |
| 45 | 1. Delete all flows from switch |
| 46 | 2. Generate NUM_FLOWS distinct flow configurations |
| 47 | 3. Send NUM_FLOWS flow adds to switch, for flows generated in step 2 above |
| 48 | - Flow mods with OFPFF_SEND_FLOW_REM = 0 (do not send remove message) and |
| 49 | OFPFF_CHECK_OVERLAP = 0 (do not check for overlap) |
| 50 | 4. Verify that no OFPT_ERROR responses were generated by switch |
| 51 | 5. Retrieve flow stats from switch |
| 52 | 6. Compare flow configurations returned by switch |
| 53 | 7. Test PASSED iff all flows sent to switch in step 3 above are returned in |
| 54 | step 5 above; else test FAILED |
| 55 | |
| 56 | NOTES |
| 57 | - Will use randomized flow configuration, in an attempt to cover combinations |
| 58 | of qualifier wildcarding, qualifier values, actions and action parameters |
| 59 | |
| 60 | |
| 61 | 2.5.1 FLOW ADD 5.1 |
| 62 | ------------------- |
| 63 | |
| 64 | OVERVIEW |
| 65 | - Verify flow canonicalization |
| 66 | |
| 67 | PURPOSE |
| 68 | - Test that switch properly canonicalizes a given flow definition |
| 69 | (canonicalization is defined as wildcarding out qualifiers when antecedent |
| 70 | qualifiers are not set correctly, e.g. nw_tos cannot be specified, and hence |
| 71 | must be wildcarded, if dl_type is not specified to be 0x0800 (IP)) |
| 72 | |
| 73 | INPUTS |
| 74 | None |
| 75 | |
| 76 | PROCESS |
| 77 | 1. Delete all flows from switch |
| 78 | 2. Generate 1 flow definition, which is different from its canonicalization |
| 79 | 3. Send flow to switch |
| 80 | 4. Retrieve flow from switch |
| 81 | 5. Compare returned flow to canonical form of defined flow |
| 82 | 7. Test PASSED iff flow received in step 4 above is identical to canonical |
| 83 | form of flow defined in step 3 above |
| 84 | |
| 85 | |
| 86 | 2.6 FLOW ADD 6 |
| 87 | --------------- |
| 88 | |
| 89 | OVERVIEW |
| 90 | - Test flow table capacity |
| 91 | |
| 92 | PURPOSE |
| 93 | - Test switch can accept as many flow definitions as it claims |
| 94 | - Test generation of OFPET_FLOW_MOD_FAILED/OFPFMFC_ALL_TABLES_FULL |
| 95 | - Test that attempting to create flows beyond capacity does not corrupt flow |
| 96 | table |
| 97 | |
| 98 | INPUTS |
| 99 | None |
| 100 | |
| 101 | PROCESS |
| 102 | 1. Delete all flows from switch |
| 103 | 2. Send OFPT_FEATURES_REQUEST to determine switch features |
| 104 | 3. For each table reported by step 2 above, send OFPT_STATS_REQUEST/ |
| 105 | OFPST_TABLE to determine table features |
| 106 | 4. Generate (N + 1) distinct flow configurations, where N is the flow capacity |
| 107 | reported by the switch in steps 2 and 3 above |
| 108 | - Flow wildcarding must obey supported wildcards, for each table |
| 109 | 5. Send (N + 1) flow adds to switch, for flows generated in step 4 above |
| 110 | - Flow mods with OFPFF_SEND_FLOW_REM = 0 (do not send remove message) and |
| 111 | OFPFF_CHECK_OVERLAP = 0 (do not check for overlap) |
| 112 | 6. Verify that OFPET_FLOW_MOD_FAILED/OFPFMFC_ALL_TABLES_FULL error response |
| 113 | was generated by switch, for last flow mod sent |
| 114 | 7. Retrieve flow stats from switch |
| 115 | 8. Compare flow configurations returned by switch |
| 116 | 9. Test PASSED iff: |
| 117 | - error message received, for correct flow |
| 118 | - last flow definition sent to switch is not in flow table |
| 119 | else test FAILED |
| 120 | |
| 121 | |
| 122 | 2.7 FLOW ADD 7 |
| 123 | --------------- |
| 124 | |
| 125 | OVERVIEW |
| 126 | - Test flow redefinition |
| 127 | |
| 128 | PURPOSE |
| 129 | - Verify that successive flow adds with same priority and match criteria |
| 130 | overwrite in flow table |
| 131 | |
| 132 | INPUTS |
| 133 | None |
| 134 | |
| 135 | PROCESS |
| 136 | 1. Delete all flows from switch |
| 137 | 2. Generate flow definition F1 |
| 138 | 3. Generate flow definition F2, with same key (priority and match) as F1, |
| 139 | but with different actions |
| 140 | 4. Send flow adds for F1 and F2 to switch |
| 141 | - Flow mods with OFPFF_SEND_FLOW_REM = 0 (do not send remove message) and |
| 142 | OFPFF_CHECK_OVERLAP = 0 (do not check for overlap) |
| 143 | 5. Retrieve flow stats from switch |
| 144 | 6. Compare flow configurations returned by switch |
| 145 | 7. Test PASSED iff 1 flow returned by switch, matching configuration of F2, |
| 146 | and with counters equal to 0; else test FAILED |
| 147 | |
| 148 | |
| 149 | 2.8 FLOW ADD 8 |
| 150 | --------------- |
| 151 | |
| 152 | OVERVIEW |
| 153 | - Add overlapping flows to switch, verify that overlapping flows are rejected |
| 154 | |
| 155 | PURPOSE |
| 156 | - Test detection of overlapping flows by switch |
| 157 | - Test generation of OFPET_FLOW_MOD_FAILED/OFPFMFC_OVERLAP messages |
| 158 | - Test rejection of overlapping flows |
| 159 | - Test defining overlapping flows does not corrupt flow table |
| 160 | |
| 161 | INPUTS |
| 162 | None |
| 163 | |
| 164 | PROCESS |
| 165 | 1. Delete all flows from switch |
| 166 | 2. Generate flow definition F1 |
| 167 | 3. Generate flow definition F2, with key overlapping F1, by wildcarding a |
| 168 | qualifier specified in F1 |
| 169 | 4. Send flow adds to switch, for flows generated in steps 2 and 3 above |
| 170 | - Flow mods with OFPFF_SEND_FLOW_REM = 0 (do not send remove message) and |
| 171 | OFPFF_CHECK_OVERLAP = 1 (check for overlap) |
| 172 | 4. Verify that OFPET_FLOW_MOD_FAILED/OFPFMFC_OVERLAP error response was |
| 173 | generated by switch |
| 174 | 5. Retrieve flow stats from switch |
| 175 | 6. Compare flow configurations returned by switch |
| 176 | 7. Test PASSED iff: |
| 177 | - error message received, for overlapping flow |
| 178 | - overlapping flow is not in flow table |
| 179 | else test FAILED |
| 180 | |
| 181 | |
| 182 | 3. FLOW MODIFY |
| 183 | =============== |
| 184 | |
| 185 | 3.1 FLOW MODIFY 1 |
| 186 | ------------------ |
| 187 | |
| 188 | OVERVIEW |
| 189 | - Strict modify of single existing flow |
| 190 | |
| 191 | PURPOSE |
| 192 | - Verify that strict flow modify operates only on specified flow |
| 193 | - Verify that flow is correctly modified |
| 194 | |
| 195 | INPUTS |
| 196 | - NUM_FLOWS: number of flows to define; 0 => maximum number of flows, |
| 197 | as determined from switch capabilities |
| 198 | |
| 199 | PROCESS |
| 200 | 1. Delete all flows from switch |
| 201 | 2. Generate NUM_FLOWS distinct flow configurations |
| 202 | 3. Send NUM_FLOWS flow adds to switch, for flows generated in step 2 above |
| 203 | - Flow mods with OFPFF_SEND_FLOW_REM = 0 (do not send remove message) and |
| 204 | OFPFF_CHECK_OVERLAP = 0 (do not check for overlap) |
| 205 | 4. Pick 1 defined flow F at random |
| 206 | 5. Generate new action list for F |
| 207 | 6. Send flow modify for F to switch |
| 208 | 4. Verify that no OFPT_ERROR responses were generated by switch |
| 209 | 5. Retrieve flow stats from switch |
| 210 | 6. Compare flow configurations returned by switch |
| 211 | 7. Test PASSED iff all flows sent to switch in step 3 and 6 above are |
| 212 | returned in step 5 above; else test FAILED |
| 213 | |
| 214 | |
| 215 | 3.2 FLOW MODIFY 2 |
| 216 | ------------------ |
| 217 | |
| 218 | OVERVIEW |
| 219 | - Loose modify of existing flows |
| 220 | |
| 221 | PURPOSE |
| 222 | - Verify that loose flow modify operates only on matching flows |
| 223 | - Verify that matching flows are correctly modified |
| 224 | |
| 225 | INPUTS |
| 226 | - NUM_FLOWS: number of flows to define; 0 => maximum number of flows, as |
| 227 | determined from switch capabilities |
| 228 | |
| 229 | PROCESS |
| 230 | 1. Delete all flows from switch |
| 231 | 2. Generate NUM_FLOWS distinct flow configurations |
| 232 | 3. Send NUM_FLOWS flow adds to switch, for flows generated in step 2 above |
| 233 | - Flow mods with OFPFF_SEND_FLOW_REM = 0 (do not send remove message) and |
| 234 | OFPFF_CHECK_OVERLAP = 0 (do not check for overlap) |
| 235 | 4. Pick 1 defined flow F at random |
| 236 | 5. Wildcard out 1 qualifier in match of F, creating F', such that F' will |
| 237 | match more than 1 existing flow key, and create new actions list A' for F' |
| 238 | 6. Send loose flow modify for F' to switch |
| 239 | 7. Retrieve flow stats from switch |
| 240 | 8. Compare flow configurations returned by switch |
| 241 | 9. Test PASSED iff all flows sent to switch in steps 3 and 6 above, are |
| 242 | returned in step 7 above, each with correct (original or modified) action |
| 243 | list; |
| 244 | else test FAILED |
| 245 | |
| 246 | |
| 247 | 3.3 FLOW MODIFY 3 |
| 248 | ------------------ |
| 249 | |
| 250 | OVERVIEW |
| 251 | - Strict modify of non-existent flow |
| 252 | |
| 253 | PRUPOSE |
| 254 | - Verify that strict modify of a non-existent flow is equivalent to a flow add |
| 255 | |
| 256 | INPUTS |
| 257 | None |
| 258 | |
| 259 | PROCESS |
| 260 | 1. Delete all flows from switch |
| 261 | 2. Send strict flow modify to switch |
| 262 | 3. Retrieve flows from switch |
| 263 | 4. Test PASSED iff single flow defined in step 2 above is returned in step 3 |
| 264 | above; else test FAILED |
| 265 | |
| 266 | |
| 267 | 3.3.1 FLOW MODIFY 3_1 |
| 268 | --------------------- |
| 269 | |
| 270 | OVERVIEW |
| 271 | - No-op modify |
| 272 | |
| 273 | PURPOSE |
| 274 | - Verify that modify of a flow with new actions same as old ones operates |
| 275 | correctly |
| 276 | |
| 277 | PARAMETERS |
| 278 | None |
| 279 | |
| 280 | PROCESS |
| 281 | 1. Delete all flows from switch |
| 282 | 2. Send single flow mod, as strict modify, to switch |
| 283 | 3. Verify flow table in switch |
| 284 | 4. Send same flow mod, as strict modify, to switch |
| 285 | 5. Verify flow table in switch |
| 286 | 6. Test PASSED iff flow defined in step 2 and 4 above verified; else FAILED |
| 287 | |
| 288 | |
| 289 | 4. FLOW DELETE |
| 290 | =============== |
| 291 | |
| 292 | 4.1 FLOW DELETE 1 |
| 293 | ------------------ |
| 294 | |
| 295 | OVERVIEW |
| 296 | - Strict delete of single flows |
| 297 | |
| 298 | PURPOSE |
| 299 | - Verify correct operation of strict delete of single defined flow |
| 300 | |
| 301 | INPUTS |
| 302 | - NUM_FLOWS: Number of flows to define; 0 => maximum number of flows, as |
| 303 | determined fro switch capabilities |
| 304 | |
| 305 | PROCESS |
| 306 | 1. Delete all flows from switch |
| 307 | 2. Generate NUM_FLOWS distinct flow configurations |
| 308 | 3. Send NUM_FLOWS flow adds to switch, for flows generated in step 2 above |
| 309 | - Flow mods with OFPFF_SEND_FLOW_REM = 0 (do not send remove message) and |
| 310 | OFPFF_CHECK_OVERLAP = 0 (do not check for overlap) |
| 311 | 4. Pick 1 defined flow F at random |
| 312 | 5. Send strict flow delete for F to switch |
| 313 | 6. Retrieve flow stats from switch |
| 314 | 7. Compare flow configurations returned by switch |
| 315 | 8. Test PASSED iff all flows sent to switch in step 3 above, less flow |
| 316 | removed in step 5 above, are returned in step 5 above; else test FAILED |
| 317 | |
| 318 | |
| 319 | 4.2 FLOW DELETE 2 |
| 320 | ------------------ |
| 321 | |
| 322 | OVERVIEW |
| 323 | - Loose delete of flows |
| 324 | |
| 325 | PURPOSE |
| 326 | - Verify correct operation of loose delete of multiple flows |
| 327 | |
| 328 | INPUTS |
| 329 | - NUM_FLOWS: Number of flows to define; 0 => maximum number of flows, as |
| 330 | determined fro switch capabilities |
| 331 | |
| 332 | PROCESS |
| 333 | 1. Delete all flows from switch |
| 334 | 2. Generate NUM_FLOWS distinct flow configurations |
| 335 | 3. Send NUM_FLOWS flow adds to switch, for flows generated in step 2 above |
| 336 | - Flow mods with OFPFF_SEND_FLOW_REM = 0 (do not send remove message) and |
| 337 | OFPFF_CHECK_OVERLAP = 0 (do not check for overlap) |
| 338 | 4. Pick 1 defined flow F at random |
| 339 | 5. Wildcard out 1 qualifier in match of F, creating F', such that F' will |
| 340 | match more than 1 existing flow key |
| 341 | 6. Send loose flow delete for F' to switch |
| 342 | 7. Retrieve flow stats from switch |
| 343 | 8. Compare flow configurations returned by switch |
| 344 | 9. Test PASSED iff all flows sent to switch in step 3 above, less flows |
| 345 | removed in step 6 above (i.e. those that match F'), are returned in step |
| 346 | 5 above; |
| 347 | else test FAILED |
| 348 | |
| 349 | |
| 350 | 4.4 FLOW DELETE 4 |
| 351 | ------------------ |
| 352 | |
| 353 | OVERVIEW |
| 354 | - Flow removed messages |
| 355 | |
| 356 | PURPOSE |
| 357 | - Verify that switch generates OFPT_FLOW_REMOVED/OFPRR_DELETE response |
| 358 | messages when deleting flows that were added with OFPFF_SEND_FLOW_REM flag |
| 359 | |
| 360 | INPUTS |
| 361 | - NUM_FLOWS: Number of flows to define; 0 => maximum number of flows, as |
| 362 | determined fro switch capabilities |
| 363 | |
| 364 | PROCESS |
| 365 | 1. Delete all flows from switch |
| 366 | 2. Generate NUM_FLOWS distinct flow configurations |
| 367 | 3. Send NUM_FLOWS flow adds to switch, for flows generated in step 2 above |
| 368 | - Flow mods with OFPFF_SEND_FLOW_REM = 1 (do not send remove message) and |
| 369 | OFPFF_CHECK_OVERLAP = 0 (do not check for overlap) |
| 370 | 4. Pick 1 defined flow F at random |
| 371 | 5. Send strict flow delete for F to switch |
| 372 | 6. Verify that OFPT_FLOW_REMOVED/OFPRR_DELETE message is received from switch |
| 373 | 7. Retrieve flow stats from switch |
| 374 | 8. Compare flow configurations returned by switch |
| 375 | 9. Test PASSED iff all flows sent to switch in step 3 above, less flow |
| 376 | removed in step 5 above, are returned in step 5 above; else test FAILED |
| 377 | |
| 378 | |