ShreyaPandita | 2dcc181 | 2012-09-28 12:13:28 -0400 | [diff] [blame] | 1 | *********** Conformance Test-suite **************** |
| 2 | OF-Switch-1.0.0-TestCases detailed testing methodology |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | **** Openflow protocol messages **** |
| 9 | |
| 10 | |
| 11 | |
| 12 | 1. Features Request |
| 13 | |
| 14 | Test Description: Check features request is implemented |
| 15 | |
| 16 | Test mode: Automated |
| 17 | Test Title: FeaturesRequest |
| 18 | Ports: I (Control Plane) |
| 19 | Initial State: Default (Clear switch state), Connection Setup |
| 20 | Test-Field: Mandatory |
| 21 | |
| 22 | |
| 23 | Test Notes: |
| 24 | |
| 25 | a) Send OFPT_FEATURES_REQUEST from controller. |
| 26 | b) Verify OFPT_FEATURES_REPLY is received without errors |
| 27 | |
| 28 | |
| 29 | |
| 30 | 2. Configuration request |
| 31 | |
| 32 | Test Description: Check basic get configuration request is implemented |
| 33 | |
| 34 | Test mode: Automated |
| 35 | Test Title: ConfigurationRequest |
| 36 | Ports: I (Control Plane) |
| 37 | Initial State: Default (Clear switch state), Connection Setup |
| 38 | Test-Field: Mandatory |
| 39 | |
| 40 | |
| 41 | Test Notes: |
| 42 | |
| 43 | a) Send OFPT_GET_CONFIG_REQUEST |
| 44 | b) Verify OFPT_GET_CONFIG_REPLY is received without errors. |
| 45 | |
| 46 | |
| 47 | |
| 48 | 3. Modify State (ADD) |
| 49 | |
| 50 | Test Description: Check basic Flow ADD request is implemented |
| 51 | |
| 52 | Test mode: Automated |
| 53 | Test Title: ModifyStateAdd |
| 54 | Ports: 3 (1 Control Plane 2 dataplane) |
| 55 | Initial State: Default (Clear switch state), Connection Setup |
| 56 | Test-Field: Mandatory |
| 57 | |
| 58 | |
| 59 | Test Notes: |
| 60 | |
| 61 | a) Send OFPT_FLOW_MOD, command = OFPFC_ADD |
| 62 | b) Send ofp_table_stats request |
| 63 | c) Verify that active_count=1 in the reply |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | 4. Modify State (DELETE) |
| 69 | |
| 70 | Test Description: Check basic Flow Delete request is implemented |
| 71 | |
| 72 | Test mode: Automated |
| 73 | Test Title: ModifyStateDelete |
| 74 | Ports: 3 (1 Control Plane 2 dataplane) |
| 75 | Initial State: Default (Clear switch state), Connection Setup |
| 76 | Test-Field: Mandatory |
| 77 | |
| 78 | |
| 79 | Test Notes: |
| 80 | |
| 81 | a) Send OFPT_FLOW_MOD, command = OFPFC_ADD |
| 82 | b) Send ofp_table_stats request |
| 83 | c) Verify that active_count=1 in the reply |
| 84 | d) Send OFPT_FLOW_MOD, command = OFPFC_DELETE |
| 85 | e) Send ofp_table_stats request |
| 86 | f) Verify active _count=0 in the reply |
| 87 | |
| 88 | |
| 89 | |
| 90 | 5. Modify State (MODIFY) |
| 91 | |
| 92 | Test Description: Check basic Flow Modify request is implemented |
| 93 | |
| 94 | Test mode: Automated |
| 95 | Test Title: ModifyStateModify |
| 96 | Ports: 3 (1 Control Plane and 2 Dataplane) |
| 97 | Initial State: Default (Clear switch state), Connection Setup |
| 98 | Test-Field: Mandatory |
| 99 | |
| 100 | |
| 101 | Test Notes: |
| 102 | |
| 103 | a) Send OFPT_FLOW_MOD , command = OFPFC_ADD, action A |
| 104 | b) Send ofp_table_stats request, Verify active_count=1 |
| 105 | c) Send OFPT_FLOW_MOD , command = OFPFC_MODIFY, action A |
| 106 | d) Send Test Packet matching the flow |
| 107 | e) Verify packet implements action A |
| 108 | |
| 109 | |
| 110 | |
| 111 | 6. Read State |
| 112 | |
| 113 | Test Description: Check basic Read State is implemented |
| 114 | |
| 115 | Test mode: Automated |
| 116 | Test Title: ReadState |
| 117 | Ports: 3 (1 Control Plane, 2 dataplane) |
| 118 | Initial State: Default (Clear switch state), Connection Setup |
| 119 | Test-Field: Mandatory |
| 120 | |
| 121 | |
| 122 | Test Notes: |
| 123 | |
| 124 | a) Send OFPT_FLOW_MOD, command = OFPFC_ADD |
| 125 | b) Create a OFPC_FLOW_STATS message and send it |
| 126 | c) Verify switch replies without errors |
| 127 | |
| 128 | |
| 129 | |
| 130 | 7. Send packet |
| 131 | |
| 132 | Test Description: Check basic Send-Packet is implemented. |
| 133 | Send-Packet: These are used by the controller to send packets out of a specified port on the switch. |
| 134 | |
| 135 | Test mode: Automated |
| 136 | Test Title: SendPacket |
| 137 | Ports: 5 (1 Control Plane, 4 Dataplane) |
| 138 | Initial State: Default (Clear switch state), Connection Setup |
| 139 | Test-Field: Mandatory |
| 140 | |
| 141 | |
| 142 | Test Notes: |
| 143 | |
| 144 | a) Send OFPT_PACKET_OUT out message from controller to switch for every dataplane port. |
| 145 | b) Verify the packet appears on the each dataplane port |
| 146 | c) Verify sent packet matches the received packet |
| 147 | |
| 148 | |
| 149 | |
| 150 | 8. Barrier Request |
| 151 | |
| 152 | Test Description: This test checks that a basic barrier request does not generate an error. |
| 153 | |
| 154 | Test mode: Automated |
| 155 | Test Title: BarrierRequestReply |
| 156 | Ports: I (Control Plane) |
| 157 | Initial State: Default (Clear switch state), Connection Setup |
| 158 | Test-Field: Mandatory |
| 159 | |
| 160 | |
| 161 | Test Notes: |
| 162 | |
| 163 | a) Send OFPT_BARRIER_REQUEST |
| 164 | c) Verify OFPT_BARRIER_REPLY is received on the control plane. |
| 165 | |
| 166 | |
| 167 | |
| 168 | 9. Packet In |
| 169 | |
| 170 | Test Description: Check packet_in is implemented. This test just checks that non matched dataplane packets |
| 171 | generate a packet_in |
| 172 | |
| 173 | Test mode: Automated |
| 174 | Test Title: PacketIn |
| 175 | Ports: 2 (1 Control Plane and 1 Dataplane) |
| 176 | Initial State: Default (Clear switch state), Connection Setup |
| 177 | Test-Field: Mandatory |
| 178 | |
| 179 | |
| 180 | Test Notes: |
| 181 | |
| 182 | a) Send a packet to dataplane port , without inserting a flow entry |
| 183 | b) Verify a OFPT_PACKET_IN is generated on the control plane |
| 184 | |
| 185 | |
| 186 | |
| 187 | 10. Hello |
| 188 | |
| 189 | Test Description: This test checks for basic Hello message generation with correct version field. |
| 190 | |
| 191 | Test mode: Automated |
| 192 | Test Title: Hello |
| 193 | Ports: 1 (Control Plane) |
| 194 | Initial State: Default (Clear switch state), Connection Setup |
| 195 | Test-Field: Mandatory |
| 196 | |
| 197 | |
| 198 | Test Notes: |
| 199 | |
| 200 | a) Send OFPT_HELLO from controller to switch |
| 201 | b) Verify switch also sends OFPT_HELLO message in response |
| 202 | c) Verify version field in the hello message is set to Openflow version 1.0.0 |
| 203 | |
| 204 | |
| 205 | |
| 206 | 11. Echo |
| 207 | |
| 208 | Test Description: This test checks for basic Echo Reply message generation with correct version field with |
| 209 | same transaction id. |
| 210 | |
| 211 | Test mode: Automated |
| 212 | Test Title: EchoWithoutBody |
| 213 | Ports: 1 (Control Plane) |
| 214 | Initial State: Default (Clear switch state), Connection setup |
| 215 | Test-Field: Mandatory |
| 216 | |
| 217 | |
| 218 | Test Notes: |
| 219 | |
| 220 | a) Send OFPT_ECHO_REQUEST from the controller side. |
| 221 | b) Verify switch responds back with OFPT_ECHO_REPLY with same xid. |
| 222 | c) Verify Openflow version in header is set to Openflow version 1.0.0. |
| 223 | |
| 224 | |
| 225 | |
| 226 | |
| 227 | |
| 228 | **** Detailed controller to switch messages **** |
| 229 | |
| 230 | |
| 231 | |
| 232 | 1. Overlap checking |
| 233 | |
| 234 | Test Description: Verify that if overlap check flag is set in the flow entry and an overlapping flow is |
| 235 | inserted then an error is generated and switch refuses flow entry |
| 236 | |
| 237 | Test mode: Automated |
| 238 | Test Title: OverlapChecking |
| 239 | Ports: 3 (1 Control Plane 2 dataplane) |
| 240 | Initial State: Default (Clear switch state), Connection setup |
| 241 | Test-Field: Mandatory |
| 242 | |
| 243 | |
| 244 | Test-Notes: |
| 245 | |
| 246 | a) Generate Flow F1--> Wildcard All |
| 247 | b) Send ofp_table_stats request , verify active_count=1 |
| 248 | c) Generate overlapping flow F2 --> Wildcard All Except Ingress Port ( with flag OFPFF_CHECK_OVERLAP set) |
| 249 | d) Verify that switch generates OFPT_ERROR msg. |
| 250 | Type: OFPET_FLOW_MOD_FAILED code : OFPFMFC_OVERLAP |
| 251 | |
| 252 | |
| 253 | |
| 254 | 2. No overlap checking |
| 255 | |
| 256 | Test Description: Verify that without overlap check flag set, overlapping flows can be created. |
| 257 | |
| 258 | Test mode: Automated |
| 259 | Test Title: NoOverlapchecking |
| 260 | Ports: 3 (1 Control Plane, 2 Dataplane) |
| 261 | Initial State: Default (Clear switch state), Connection setup |
| 262 | Test-Field: Mandatory |
| 263 | |
| 264 | |
| 265 | Test Notes: |
| 266 | |
| 267 | a) Generate Flow F1--> Wildcard All. |
| 268 | b) Send ofp_table_stats request , verify active_count=1 |
| 269 | e) Generate overlapping flow F2 --> Wildcard All Except Ingress Port ( without flag OFPFF_CHECK_OVERLAP set) |
| 270 | c) Send a ofp_table_stats request, verify active_count=2 |
| 271 | |
| 272 | |
| 273 | |
| 274 | 3. Identical flows |
| 275 | |
| 276 | Test Description: Verify that adding two identical flows overwrites the existing one and clears counters |
| 277 | |
| 278 | Test mode: Automated |
| 279 | Test Title: IdenticalFlows |
| 280 | Ports: 3 (1 Control Plane), (2 dataplane) |
| 281 | Initial State: Default (Clear switch state), Connection setup |
| 282 | Test-Field: Mandatory |
| 283 | |
| 284 | |
| 285 | Test Notes: |
| 286 | |
| 287 | a) Generate Flow F1. |
| 288 | b) Send ofp_table_stats request , verify active_count=1 |
| 289 | b) Increment counters (packet_count, byte_count) by sending a packet matching flow F1. |
| 290 | C) Send ofp_flow_stats request. Verify flow counters: byte_count and packet_count |
| 291 | c) Create identical flow F2 |
| 292 | d) Send a ofp_table_stats request, verify active_count=1 |
| 293 | e) Send ofp_flow_stats request. Verify flow counters: byte_count and packet_count are reset |
| 294 | |
| 295 | |
| 296 | |
| 297 | 4. No table to add (Written in oftestNeed to add to conformance Test-Suites) |
| 298 | |
| 299 | |
| 300 | |
| 301 | 5. Never valid port (TBD) |
| 302 | |
| 303 | |
| 304 | |
| 305 | |
| 306 | 6. Currently not existing port Version A and B (TBD) |
| 307 | |
| 308 | |
| 309 | |
| 310 | |
| 311 | 7. Emergency flow with timeout values |
| 312 | |
| 313 | Test Description: Timeout values are not allowed for emergency flows |
| 314 | |
| 315 | Test Title: EmerFlowTimeout |
| 316 | Test mode: Automated |
| 317 | Ports: 3 (1 control plane, 2 Dataplane) |
| 318 | Initial State: Default (Clear switch state), Connection setup |
| 319 | |
| 320 | |
| 321 | Test Notes: |
| 322 | |
| 323 | a) Generate a flow F with OFPFF_EMERG set in flag and timeout values assigned. |
| 324 | b) Verify switch generates an OFPT_ERROR msg, Type: OFPET_FLOW_MOD_FAILED, Code OFPFMFC_BAD_EMERG_TIMEOUT |
| 325 | |
| 326 | |
| 327 | |
| 328 | 8. Missing modify adds |
| 329 | |
| 330 | Test Description: If a modify does not match an existing flow, the flow gets added. |
| 331 | |
| 332 | Title: MissingModifyAdd |
| 333 | Test mode: Automated |
| 334 | Ports:3 (1 control plane,2 Data Plane) |
| 335 | Initial State: Connection setup, Clear Switch State |
| 336 | Test-Field: Mandatory |
| 337 | |
| 338 | |
| 339 | Test Notes: |
| 340 | |
| 341 | a) Generate a flow-mod , command OFPC_MODIFY (Note: There should be no flows matching this flow_mod modify command) |
| 342 | b) Send a ofp_table_stats request, verify active_count=1 |
| 343 | |
| 344 | |
| 345 | |
| 346 | |
| 347 | 9. Modify changes action, preserves counters |
| 348 | |
| 349 | Test Description: A modified flow preserves counters |
| 350 | |
| 351 | Title: ModifyAction |
| 352 | Test mode: Automated |
| 353 | Ports: 4(1 control plane, 3 Dataplane) |
| 354 | Initial State: Connection setup, Clear Switch State |
| 355 | Test-Field: Mandatory |
| 356 | |
| 357 | |
| 358 | Test Notes: |
| 359 | |
| 360 | a) Create a flow_mod F-1 with command OFPC_ADD, action A |
| 361 | b) Send a test Packet matching the flow |
| 362 | c) Send an ofp_flow_stats request, verify byte_count and packet_count |
| 363 | e) Create flow_mod with command OFPC_MODIFY ,action A and modify action of flow F-1 |
| 364 | f) Send a ofp_flow_stats request, verify flow counters are preserved |
| 365 | g) Send test packet, verify it implements action A |
| 366 | |
| 367 | |
| 368 | |
| 369 | 10. Strict Modify changes action, preserves counters |
| 370 | |
| 371 | Test Description: Strict Modify Flow also changes action preserves counters |
| 372 | |
| 373 | Title: StrictModifyAction |
| 374 | Test mode: Automated |
| 375 | Ports: 4(1 control plane, 3 Dataplane) |
| 376 | Initial State: Connection setup, Clear Switch State |
| 377 | Test-Field: Mandatory |
| 378 | |
| 379 | |
| 380 | Test Notes: |
| 381 | |
| 382 | a) Create two overlapping flows: F --> Match on all, except one wildcarded (src address). Action A. Priority=100 |
| 383 | F --> Match on ingress_port = port [0], wildcarded rest. Action A. Priority=10 |
| 384 | b) Send a ofp_table_stats request, verify active_count=2 |
| 385 | c) Send Packet (it would have matched both the flows, since they are overlapping flows but it would match Flow-F1 as it has higher priority.) |
| 386 | d) Send ofp_flow_stats request for Flow-1 and verify counters packet_count and byte_count |
| 387 | e) Create flow_mod ,command OFPC_STRICT_MODIFY,match on all except src address ,priority 100 action A |
| 388 | f) Send test packet , verify action is modified |
| 389 | g) Send ofp_flow_stats request, verify counters are preserved. |
| 390 | |
| 391 | |
| 392 | |
| 393 | |
| 394 | 11. Delete non existing flow |
| 395 | |
| 396 | Test Description: Request deletion of non-existing flow |
| 397 | |
| 398 | Title: DeleteNonexistingFlow |
| 399 | Test mode: Automated |
| 400 | Ports: 1(1 control plane) |
| 401 | Initial State: Connection setup, Clear Switch State |
| 402 | Test-Field: Mandatory |
| 403 | |
| 404 | |
| 405 | Test Notes: |
| 406 | |
| 407 | a) Issue a delete command, with no flows inserted |
| 408 | b) Make sure no error is generated on the control plane |
| 409 | |
| 410 | |
| 411 | |
| 412 | 12. Delete flows with and without removed message |
| 413 | |
| 414 | Test Description: Check deletion of flows happens and generates messages as configured. i.e. if Send Flow removed messageFlag |
| 415 | is set in the flow entry, the flow deletion of that respective flow should generate the flow removed message, |
| 416 | vice versa also exists |
| 417 | |
| 418 | Test Title: SendFlowRem |
| 419 | Test mode: Automated |
| 420 | Ports: 3 (1 control plane, 2 Dataplane) |
| 421 | Initial State: Connection setup, Default (clear switch state) |
| 422 | Test-Field: Mandatory |
| 423 | |
| 424 | |
| 425 | Test Notes: |
| 426 | |
| 427 | a) Generate a flow F without OFPFF_SEND_FLOW_REM flag set |
| 428 | b) Issue a delete command OFPFC_DELETE |
| 429 | c) Verify that OFPT_FLOW_REMOVED message is not generated. |
| 430 | c) Generate a flow F with OFPFF_SEND_FLOW_REM flag set |
| 431 | d) Issue a delete command OFPFC_DELETE |
| 432 | e) Verify that OFPT_FLOW_REMOVED message is generated |
| 433 | |
| 434 | |
| 435 | |
| 436 | 13. Delete emergency flow |
| 437 | |
| 438 | Test Description: Delete emergency flow and verify no message is generated.An emergency flow deletion will not generate |
| 439 | flow-removed messages even if Send Flow removed message flag was set during the emergency flow entry. |
| 440 | |
| 441 | |
| 442 | Title: DeleteEmerFlow |
| 443 | Test mode: Automated |
| 444 | Ports: 3 (1 control plane, 2 Dataplane) |
| 445 | Initial State: Connection setup, Clear Switch State (default) |
| 446 | |
| 447 | |
| 448 | Test-Notes: |
| 449 | |
| 450 | a) Insert a flow with OFPFF_EMERG flag set. |
| 451 | b) Delete the added flow with OFPFF_SEND_FLOW_REM flag set |
| 452 | c) Test successful if no flow removed message is generated. |
| 453 | |
| 454 | |
| 455 | |
| 456 | 14. Delete and verify strict and non-strict |
| 457 | |
| 458 | Test Description: Delete and verify strict and non-strict behaviors |
| 459 | |
| 460 | This test compares the behavior of delete strict and non-strict. |
| 461 | Title: StrictVsNonstrict |
| 462 | Test mode: Automated |
| 463 | Ports: 3 (1 control plane, 2 dataplane) |
| 464 | Initial State: Connection setup, Clear Switch State |
| 465 | |
| 466 | |
| 467 | Test-Notes: |
| 468 | |
| 469 | a) Insert Flow F with an exact match. |
| 470 | b) Issue Non-strict Delete command, verify F gets deleted. |
| 471 | c) Insert F with an exact Match |
| 472 | d) Issue Strict Delete Command, verify F gets deleted. |
| 473 | e) Insert Flow T with match on all, except one wildcarded (say src address). |
| 474 | f) Insert another flow T' with match on ingress_port, wildcarded rest. |
| 475 | g) Issue Non-strict Delete ( match on ingress_port). Verify T+T' gets deleted. |
| 476 | h) Insert T and T' again. Issue Strict Delete (match on ingress port), verify only T' gets deleted |
| 477 | i) Insert T, add Priority P (say 100) |
| 478 | j) Insert T' add priority (200). |
| 479 | k) Insert T' again add priority 300 --> T |
| 480 | l) Issue Non-Strict Delete (match on ingress port). Verify T+T+T gets deleted. |
| 481 | m) Insert T, T, T again, Issue Strict Delete (match on ingress_port) with priority = 200. Verify only T gets deleted |
| 482 | |
| 483 | |
| 484 | |
| 485 | 15. Delete flows with constraint out_port |
| 486 | |
| 487 | Test Description: Delete flows filtered by action output.DELETE and DELETE STRICT commands can be optionally filtered by output port. |
| 488 | If the out_port field contains a value other than OFPP_NONE, it introduces a constraint when matching. |
| 489 | This constraint is that the rule must contain an output action directed at that port. |
| 490 | |
| 491 | Title: Outport1 |
| 492 | Test mode: Automated |
| 493 | Ports: 3 (1 control plane, 2 Dataplanes) |
| 494 | Initial State: Connection setup, Clear Switch State |
| 495 | Test-Field: Mandatory |
| 496 | |
| 497 | |
| 498 | Test-Notes: |
| 499 | |
| 500 | a) Insert a flow F with output action = port x |
| 501 | b) Send a delete command matching flow F ,but out_port =port y |
| 502 | c) Send a table_stats request , verify no flow gets deleted i.e. active_count=1 |
| 503 | d) Send a delete command matching flow F ,outport = port x |
| 504 | e) Send a table_stats request, verify flow F gets deleted. |
| 505 | |
| 506 | |
| 507 | |
| 508 | 16. Add, modify flows with constraint output |
| 509 | |
| 510 | Test Description: Add, modify flows with outport set. This field is ignored by ADD, MODIFY, and MODIFY STRICT messages. |
| 511 | |
| 512 | Title: Outport2 |
| 513 | Test mode: Automated |
| 514 | Ports: 4 (1 control plane, 3 Data planes) |
| 515 | Initial State: Connection setup, Clear Switch State |
| 516 | Test-Field: Mandatory |
| 517 | |
| 518 | Test-Notes: |
| 519 | |
| 520 | a) Insert a flow F with action A (output --> port x) , but out_port field in the flow mod set as port y |
| 521 | b) Send Table_Stats_Request, Verify Flow gets inserted. ( Flow add ignores out_port field) |
| 522 | c) Modify the action in flow F , action A ( output -->port z ), but out_port field in the flow mod set as port y |
| 523 | d) Send test packet matching the flow F |
| 524 | e) Verify packet implements action A (flow modify ignores out_port field) |
| 525 | |
| 526 | |
| 527 | |
| 528 | 17. Verify that idle timeout is implemented |
| 529 | |
| 530 | Test Description: Verify that idle timeout is implemented |
| 531 | |
| 532 | Title: IdleTimeout |
| 533 | Test mode: Automated |
| 534 | Ports: 3 (1 control plane, 2 Dataplanes) |
| 535 | Initial State: Connection setup, Clear Switch State |
| 536 | Test-Field: Mandatory |
| 537 | |
| 538 | |
| 539 | Test-Notes: |
| 540 | |
| 541 | a) Add a flow with idle timeout set and with OFPP_SEND_FLOW_REM bit set |
| 542 | b) Verify flow removed message is received. |
| 543 | c) Verify flow removed reason was idle_timeout |
| 544 | d) Verify the duration_sec field is 1 sec |
| 545 | |
| 546 | |
| 547 | |
| 548 | 18. Verify that hard timeout is implemented |
| 549 | |
| 550 | Test Description: Verify that hard timeout is implemented |
| 551 | |
| 552 | Title: HardTimeout |
| 553 | Test mode: Automated |
| 554 | Ports: 3 (1 control plane, 2 Dataplanes) |
| 555 | Initial State: Connection setup, Clear Switch State |
| 556 | Test-Field: Mandatory |
| 557 | |
| 558 | |
| 559 | Test-Notes: |
| 560 | |
| 561 | a) Add a flow with hard timeout =1 set and with OFPP_SEND_FLOW_REM bit set |
| 562 | b) Verify flow removed message is received. |
| 563 | c) Verify flow removed reason was hard_timeout |
| 564 | d) Verify the duration_sec field is 1 sec |
| 565 | |
| 566 | |
| 567 | |
| 568 | 19. Verify that messages are generated as expected |
| 569 | |
| 570 | Test Description: Verify that Flow removed messages are generated as expected |
| 571 | /* Since flow removed messages being generated when flag is set is already tested in the above tests |
| 572 | So here, we test the vice-versa condition.*/ |
| 573 | |
| 574 | Title: FlowTimeout |
| 575 | Test mode: Automated |
| 576 | Ports: 3 (1control plane, 1dataplane) |
| 577 | Initial State: Connection setup, Clear Switch State |
| 578 | Test-Field: Mandatory |
| 579 | |
| 580 | |
| 581 | Test-Notes: |
| 582 | |
| 583 | a) Generate and install a flow with idle_timeout = 1 set no OFPFF_SEND_FLOW_REM flag set. |
| 584 | b) Verify no flow removed message is received. |
| 585 | c) Send table_stats_request message and verify active_count=0 |
| 586 | |
| 587 | |
| 588 | |
| 589 | |
| 590 | |
| 591 | *** Actions *** |
| 592 | |
| 593 | |
| 594 | |
| 595 | 1. No Action drops packet |
| 596 | |
| 597 | Test Description: If no forward actions are present, the packet is dropped. |
| 598 | |
| 599 | Required Action: Drop. |
| 600 | A flow-entry with no specified action indicates that all matching packets should be dropped. |
| 601 | Test mode: Automated |
| 602 | Test Title: NoAction |
| 603 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 604 | Initial State: Default (Clear switch state), Connection setup |
| 605 | Test-Field: Mandatory |
| 606 | |
| 607 | |
| 608 | Test Notes: |
| 609 | |
| 610 | a) Send Flow mod message without any action specified |
| 611 | b) Send N packets matching the flow |
| 612 | c) Verify packets are not received on any of the dataplane ports |
| 613 | d) Verify packets are not even sent to the controller |
| 614 | |
| 615 | |
| 616 | |
| 617 | 2. Get supported actions from switch |
| 618 | |
| 619 | Test Description: Get the supported actions from switch and make sanity checks. |
| 620 | /*When connecting to the controller, a switch indicate which of the Optional Actions it supports*/ |
| 621 | |
| 622 | Test mode: Automated |
| 623 | Test Title: Announcement |
| 624 | Ports: 1 (Control Plane) |
| 625 | Initial State: Default (Clear switch state), Connection setup |
| 626 | Test-Field: Mandatory |
| 627 | |
| 628 | |
| 629 | Test Notes: |
| 630 | |
| 631 | a) Send features_request . |
| 632 | b) Verify response is OFPT_FEATURES_REPLY |
| 633 | c) Verify reply has supported action list specified |
| 634 | |
| 635 | |
| 636 | |
| 637 | 3. Forward All |
| 638 | |
| 639 | Test Description: Packet is sent to all dataplane ports except ingress port when output action.port = OFPP_ALL |
| 640 | |
| 641 | Test mode: Automated |
| 642 | Test Title: ForwardAll |
| 643 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 644 | Initial State: Default (Clear switch state), Connection setup |
| 645 | Test-Field: Mandatory |
| 646 | |
| 647 | |
| 648 | Test Notes: |
| 649 | |
| 650 | a) Install a flow with output action.port = OFPP_ALL. |
| 651 | b) Verify packets are forwarded to all ports except ingress port. |
| 652 | |
| 653 | |
| 654 | |
| 655 | 4. Forward Controller |
| 656 | |
| 657 | Test Description: Packet is sent to controller output.port = OFPP_CONTROLLER |
| 658 | |
| 659 | Test mode: Automated |
| 660 | Test Title: ForwardController |
| 661 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 662 | Initial State: Default (Clear switch state), Connection setup |
| 663 | Test-Field: Mandatory |
| 664 | |
| 665 | |
| 666 | Test Notes: |
| 667 | |
| 668 | a) Insert a flow with action output port = OFPP_CONTROLLER |
| 669 | b) Send packets matching the flow |
| 670 | c) Verify packet received on the control plane as a packet_in message |
| 671 | |
| 672 | |
| 673 | |
| 674 | 5. Forward Local (TBD Verification of packet being received at local networking stack) |
| 675 | |
| 676 | Test Description: Packet is sent to switchs local networking stack if output.port = OFPP_LOCAL |
| 677 | |
| 678 | Test mode: Automated |
| 679 | Test Title: ForwardLocal |
| 680 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 681 | Initial State: Default (Clear switch state), Connection setup |
| 682 | Test-Field: Mandatory |
| 683 | |
| 684 | |
| 685 | Test Notes: |
| 686 | |
| 687 | a) Insert a flow with action output port = OFPP_LOCAL |
| 688 | b) Send packets matching the flow |
| 689 | c) Verify packet received in the switchs local networking stack. |
| 690 | |
| 691 | |
| 692 | |
| 693 | 6. Forward Table |
| 694 | |
| 695 | Test Description: Perform actions in flow table. Only for packet-out messages. |
| 696 | /*If the output action.port in the packetout message = OFP.TABLE, then the packet implements the action |
| 697 | specified in the matching flow of the FLOW-TABLE*/ |
| 698 | |
| 699 | Test mode: Automated |
| 700 | Test Title: ForwardTable |
| 701 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 702 | Initial State: Default (Clear switch state), Connection setup |
| 703 | Test-Field: Mandatory |
| 704 | |
| 705 | Test Notes: |
| 706 | |
| 707 | a) Insert a flow F with action output.port = egress_port |
| 708 | b) Send a OFPT_PACKET_OUT message with out port=OFPP_TABLE matching flow F |
| 709 | c) Verify packet received on egress_port (i.e packetout message implemented the action specified in the matching flow of the Table) |
| 710 | |
| 711 | |
| 712 | |
| 713 | 7. Forward In Port |
| 714 | |
| 715 | Test Description: Packet is sent to input port if output.port = OFPP_INPORT |
| 716 | |
| 717 | Test mode: Automated |
| 718 | Test Title: ForwardInport |
| 719 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 720 | Initial State: Default (Clear switch state), Connection setup |
| 721 | Test-Field: Mandatory |
| 722 | |
| 723 | Test Notes: |
| 724 | |
| 725 | a) Insert a flow with action output port = OFPP_INPORT |
| 726 | b) Send packets matching the flow |
| 727 | c) Verify packet received on all dataplane ports except for input port |
| 728 | |
| 729 | |
| 730 | |
| 731 | 8. Forward Flood |
| 732 | |
| 733 | Test Description:Flood the packet along the minimum spanning tree, not including the incoming interface. |
| 734 | Packet is sent all the dataplane ports except the input port if output.port = OFPP_FLOOD |
| 735 | |
| 736 | Test mode: Automated |
| 737 | Test Title: Forward_Flood |
| 738 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 739 | Initial State: Default (Clear switch state), Connection setup |
| 740 | Test-Field: Optional |
| 741 | |
| 742 | Test Notes: |
| 743 | |
| 744 | a) Insert a flow with action output port = OFPP_FLOOD |
| 745 | b) Send packets matching the flow |
| 746 | c) Verify packet received on all dataplane ports except for input port |
| 747 | |
| 748 | |
| 749 | |
| 750 | 9. Multiple Ports -- TBD |
| 751 | |
| 752 | |
| 753 | |
| 754 | |
| 755 | 10. Forward Enqueue --- TBD |
| 756 | |
| 757 | |
| 758 | |
| 759 | |
| 760 | 11. Set VLAN Id |
| 761 | |
| 762 | Test Description: Attach VLAN ID to untagged packet. |
| 763 | If no VLAN is present, a new header is added with the specified VLAN ID and priority of zero. |
| 764 | |
| 765 | Test mode: Automated |
| 766 | Test Title: AddVlanId |
| 767 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 768 | Initial State: Default (Clear switch state), Connection setup |
| 769 | Test-Field: Optional |
| 770 | |
| 771 | |
| 772 | Test Notes: |
| 773 | |
| 774 | a) Insert a flow with action = OFPAT_SET_VLAN_VID , vlan_vid = x |
| 775 | b) Send packet (length = 100 bytes) matching the flow |
| 776 | b) Verify packet received has vlan id added to it. (I.e length of packet with vid is 104 bytes, dl_vlan_enable = True, dl_vlan= x, dl_vlan_pcp=0) |
| 777 | |
| 778 | |
| 779 | |
| 780 | 12. Modify VLAN Id |
| 781 | |
| 782 | Test Description: Modifies Vlan Tag for a tagged packet |
| 783 | If a VLAN header already exists, the VLAN ID is replaced with the specified value |
| 784 | |
| 785 | Test mode: Automated |
| 786 | Test Title: ModifyVlanId |
| 787 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 788 | Initial State: Default (Clear switch state), Connection setup |
| 789 | Test-Field: Optional |
| 790 | |
| 791 | |
| 792 | Test Notes: |
| 793 | a) Insert a flow with action = OFPAT_SET_VLAN_VID , vlan_vid = x |
| 794 | b) Send packet (length = 100 bytes) matching the flow |
| 795 | c) Verify packet received has vlan id rewritten. (I.e length of 104 bytes, dl_vlan_enable = True, dl_vlan=x) |
| 796 | |
| 797 | |
| 798 | |
| 799 | 13. Add VLAN Priority to an untagged packet |
| 800 | |
| 801 | Test Description: Attach VLAN priority to an untagged packet. |
| 802 | Since, no VLAN ID is present; a new header is added with the specified priority and a VLAN ID of zero.\ |
| 803 | |
| 804 | Test mode: Automated |
| 805 | Test Title: VlanPrio1 |
| 806 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 807 | Initial State: Default (Clear switch state), Connection setup |
| 808 | Test-Field: Optional |
| 809 | |
| 810 | |
| 811 | Test Notes: |
| 812 | |
| 813 | a) Insert a flow with action = OFPAT_SET_VLAN_PCP , dl_vlan_pcp =x |
| 814 | b) Send untagged packet matching the flow |
| 815 | c) Verify packet received has vlan priority added to it along with a vid value of zero added by default (dl_vlan_enable , dl_vlan = 0 , dl_vlan_pcp =x ) |
| 816 | |
| 817 | |
| 818 | |
| 819 | 14. Rewrite existing VLAN priority |
| 820 | |
| 821 | Test Description: Modify VLAN priority for a tagged packet. |
| 822 | |
| 823 | Test mode: Automated |
| 824 | Test Title: VlanPrio2 |
| 825 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 826 | Initial State: Default (Clear switch state), Connection setup |
| 827 | Test-Field: Optional |
| 828 | |
| 829 | |
| 830 | Test Notes: |
| 831 | |
| 832 | a) Insert a flow with action = OFPAT_SET_VLAN_PCP , dl_vlan_pcp =new_vlan_pcp |
| 833 | b) Send tagged packet matching the flow (dl_vlan = old_vlan_id , dl_vlan_pcp = old_vlan_pcp) |
| 834 | c) Verify packet received has vlan id added to it. (dl_vlan_enable , dl_vlan = 0 , dl_vlan_pcp = new_vlan_pcp) |
| 835 | |
| 836 | |
| 837 | |
| 838 | |
| 839 | 15. Modify L2 Src Address |
| 840 | |
| 841 | Test Description: Modify Ethernet Src Address of a packet |
| 842 | |
| 843 | Test mode: Automated |
| 844 | Test Title: ModifyL2Src |
| 845 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 846 | Initial State: Default (Clear switch state), Connection setup |
| 847 | Test-Field: Optional |
| 848 | |
| 849 | |
| 850 | Test Notes: |
| 851 | |
| 852 | a) Insert a flow with action = OFPAT_SET_DL_SRC , dl_src =new_dl_src |
| 853 | b) Send packet matching the flow (dl_dst = old_dl_src ) |
| 854 | c) Verify packet received has src address rewritten. (dl_src= new_dl_src) |
| 855 | |
| 856 | |
| 857 | |
| 858 | 16. Modify L2 Destination Address |
| 859 | |
| 860 | Test Description: Modify Ethernet Destination Address of a packet |
| 861 | |
| 862 | Test mode: Automated |
| 863 | Test Title: ModifyL2Dst |
| 864 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 865 | Initial State: Default (Clear switch state), Connection setup |
| 866 | Test-Field: Optional |
| 867 | |
| 868 | |
| 869 | Test Notes: |
| 870 | |
| 871 | a) Insert a flow with action = OFPAT_SET_DL_DST , dl_dst =new_dl_dst |
| 872 | b) Send packet matching the flow (dl_dst = old_dl_src ) |
| 873 | c) Verify packet received has destination address rewritten. (dl_src= new_dl_src) |
| 874 | |
| 875 | |
| 876 | |
| 877 | 17. Strip VLAN header (In oftest, need to add in conformance test-suite ) |
| 878 | |
| 879 | |
| 880 | |
| 881 | 18. Modify L3 Src Address |
| 882 | |
| 883 | Test Description: Modify Network Src Address of a packet |
| 884 | |
| 885 | Test mode: Automated |
| 886 | Test Title: ModifyL3Src |
| 887 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 888 | Initial State: Default (Clear switch state), Connection setup |
| 889 | Test-Field: Optional |
| 890 | |
| 891 | |
| 892 | Test Notes: |
| 893 | |
| 894 | a) Insert a flow with action = OFPAT_SET_NW_SRC , nw_src =new_nw_src |
| 895 | b) Send packet matching the flow (nw_src = old_nw_src ) |
| 896 | c) Verify packet received has nw address rewritten. (nw_src= new_nw_src) |
| 897 | |
| 898 | |
| 899 | |
| 900 | 19. Modify L3 Dst Address |
| 901 | |
| 902 | Test Description: Modify Network Dst Address of a packet |
| 903 | |
| 904 | Test mode: Automated |
| 905 | Test Title: ModifyL3Dst |
| 906 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 907 | Initial State: Default (Clear switch state), Connection setup |
| 908 | Test-Field: Optional |
| 909 | |
| 910 | |
| 911 | Test Notes: |
| 912 | |
| 913 | a) Insert a flow with action = OFPAT_SET_NW_DST , nw_dst =new_nw_dst |
| 914 | b) Send packet matching the flow (nw_dst = old_nw_dst ) |
| 915 | c) Verify packet received has nw destination address rewritten. (nw_dst= new_nw_dst) |
| 916 | |
| 917 | |
| 918 | |
| 919 | 20. Modify L4 Src Address |
| 920 | |
| 921 | Test Description: Modify TCP Source Port of a packet |
| 922 | |
| 923 | Test mode: Automated |
| 924 | Test Title: ModifyL4Src |
| 925 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 926 | Initial State: Default (Clear switch state), Connection setup |
| 927 | Test-Field: Optional |
| 928 | |
| 929 | |
| 930 | Test Notes: |
| 931 | |
| 932 | a) Insert a flow with action = OFPAT_SET_TP_SRC , tcp_sport =new_tcp_sport |
| 933 | b) Send packet matching the flow (tcp_sport = old_tcp_sport ) |
| 934 | c) Verify packet received has tcp source port rewritten. (tcp_sport = new_tcp_sport) |
| 935 | |
| 936 | |
| 937 | 21. Modify L4 Dst Address |
| 938 | |
| 939 | Test Description: Modify TCP Destination Port of a packet |
| 940 | |
| 941 | Test mode: Automated |
| 942 | Test Title: ModifyL4Dst |
| 943 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 944 | Initial State: Default (Clear switch state), Connection setup |
| 945 | Test-Field: Optional |
| 946 | |
| 947 | |
| 948 | Test Notes: |
| 949 | |
| 950 | a) Insert a flow with action = OFPAT_SET_TP_DST , tcp_dport =new_tcp_dport |
| 951 | b) Send packet matching the flow (tcp_dport = old_tcp_dport ) |
| 952 | c) Verify packet received has tcp destination port rewritten. (tcp_sport = new_tcp_sport) |
| 953 | |
| 954 | |
| 955 | |
| 956 | 22. Modify TOS |
| 957 | |
| 958 | Test Description: Modify Network Type of service |
| 959 | |
| 960 | Test mode: Automated |
| 961 | Test Title: ModifyTos |
| 962 | Ports: 3 (1 Control Plane 2 Dataplane) |
| 963 | Initial State: Default (Clear switch state), Connection setup |
| 964 | Test-Field: Optional |
| 965 | |
| 966 | |
| 967 | Test Notes: |
| 968 | |
| 969 | a) Insert a flow with action = OFPAT_SET_NW_TOS, ip_tos =new_ip_tos |
| 970 | b) Send packet matching the flow (ip_tos= old_ip_tos) |
| 971 | c) Verify packet received has tcp destination port rewritten. (ip_tos= new_ip_tos) |
| 972 | |
| 973 | |
| 974 | |
| 975 | 23. Order Not possible -- TBD |
| 976 | |
| 977 | |
| 978 | |
| 979 | |
| 980 | 24. Sequential execution -- TBD |
| 981 | |