blob: 22742dcd861d1ec90fe044055aa4e1a7df31fc60 [file] [log] [blame]
Dan Talayco412ea942012-04-23 15:06:50 -07001
2
3DRAFT TEST PLAN FOR TESTING TOP-HALF OF OpenFlow 1.0 SWITCH
4
5Draft 2 - 23 Apr 2012
6
7
8
91. GENERAL
10===========
11
121.1 Test particular implementation, not OpenFlow protocol
13
14This test plan is intended to test the function of those features of an OF
15agent implementation that would be particular to a given switch,
16i.e. semantics of various OF operations are correctly implemented on a given
17switch.
18It 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
252. FLOW ADD
26============
27
282.5 FLOW ADD 5
29---------------
30
31OVERVIEW
32- Add flows to switch, read back and verify flow configurations
33
34PURPOSE
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
40INPUTS
41- NUM_FLOWS: number of flows to define; 0 => maximum number of flows, as
42 determined from switch capabilities
43
44PROCESS
451. Delete all flows from switch
462. Generate NUM_FLOWS distinct flow configurations
473. 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)
504. Verify that no OFPT_ERROR responses were generated by switch
515. Retrieve flow stats from switch
526. Compare flow configurations returned by switch
537. Test PASSED iff all flows sent to switch in step 3 above are returned in
54 step 5 above; else test FAILED
55
56NOTES
57- Will use randomized flow configuration, in an attempt to cover combinations
58 of qualifier wildcarding, qualifier values, actions and action parameters
59
60
612.5.1 FLOW ADD 5.1
62-------------------
63
64OVERVIEW
65- Verify flow canonicalization
66
67PURPOSE
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
73INPUTS
74None
75
76PROCESS
771. Delete all flows from switch
782. Generate 1 flow definition, which is different from its canonicalization
793. Send flow to switch
804. Retrieve flow from switch
815. Compare returned flow to canonical form of defined flow
827. Test PASSED iff flow received in step 4 above is identical to canonical
83 form of flow defined in step 3 above
84
85
862.6 FLOW ADD 6
87---------------
88
89OVERVIEW
90- Test flow table capacity
91
92PURPOSE
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
98INPUTS
99None
100
101PROCESS
1021. Delete all flows from switch
1032. Send OFPT_FEATURES_REQUEST to determine switch features
1043. For each table reported by step 2 above, send OFPT_STATS_REQUEST/
105 OFPST_TABLE to determine table features
1064. 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
1095. 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)
1126. Verify that OFPET_FLOW_MOD_FAILED/OFPFMFC_ALL_TABLES_FULL error response
113 was generated by switch, for last flow mod sent
1147. Retrieve flow stats from switch
1158. Compare flow configurations returned by switch
1169. 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
1222.7 FLOW ADD 7
123---------------
124
125OVERVIEW
126- Test flow redefinition
127
128PURPOSE
129- Verify that successive flow adds with same priority and match criteria
130 overwrite in flow table
131
132INPUTS
133None
134
135PROCESS
1361. Delete all flows from switch
1372. Generate flow definition F1
1383. Generate flow definition F2, with same key (priority and match) as F1,
139 but with different actions
1404. 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)
1435. Retrieve flow stats from switch
1446. Compare flow configurations returned by switch
1457. Test PASSED iff 1 flow returned by switch, matching configuration of F2,
146 and with counters equal to 0; else test FAILED
147
148
1492.8 FLOW ADD 8
150---------------
151
152OVERVIEW
153- Add overlapping flows to switch, verify that overlapping flows are rejected
154
155PURPOSE
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
161INPUTS
162None
163
164PROCESS
1651. Delete all flows from switch
1662. Generate flow definition F1
1673. Generate flow definition F2, with key overlapping F1, by wildcarding a
168 qualifier specified in F1
1694. 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)
1724. Verify that OFPET_FLOW_MOD_FAILED/OFPFMFC_OVERLAP error response was
173 generated by switch
1745. Retrieve flow stats from switch
1756. Compare flow configurations returned by switch
1767. Test PASSED iff:
177 - error message received, for overlapping flow
178 - overlapping flow is not in flow table
179 else test FAILED
180
181
1823. FLOW MODIFY
183===============
184
1853.1 FLOW MODIFY 1
186------------------
187
188OVERVIEW
189- Strict modify of single existing flow
190
191PURPOSE
192- Verify that strict flow modify operates only on specified flow
193- Verify that flow is correctly modified
194
195INPUTS
196- NUM_FLOWS: number of flows to define; 0 => maximum number of flows,
197 as determined from switch capabilities
198
199PROCESS
2001. Delete all flows from switch
2012. Generate NUM_FLOWS distinct flow configurations
2023. 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)
2054. Pick 1 defined flow F at random
2065. Generate new action list for F
2076. Send flow modify for F to switch
2084. Verify that no OFPT_ERROR responses were generated by switch
2095. Retrieve flow stats from switch
2106. Compare flow configurations returned by switch
2117. 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
2153.2 FLOW MODIFY 2
216------------------
217
218OVERVIEW
219- Loose modify of existing flows
220
221PURPOSE
222- Verify that loose flow modify operates only on matching flows
223- Verify that matching flows are correctly modified
224
225INPUTS
226- NUM_FLOWS: number of flows to define; 0 => maximum number of flows, as
227 determined from switch capabilities
228
229PROCESS
2301. Delete all flows from switch
2312. Generate NUM_FLOWS distinct flow configurations
2323. 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)
2354. Pick 1 defined flow F at random
2365. 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'
2386. Send loose flow modify for F' to switch
2397. Retrieve flow stats from switch
2408. Compare flow configurations returned by switch
2419. 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
2473.3 FLOW MODIFY 3
248------------------
249
250OVERVIEW
251- Strict modify of non-existent flow
252
253PRUPOSE
254- Verify that strict modify of a non-existent flow is equivalent to a flow add
255
256INPUTS
257None
258
259PROCESS
2601. Delete all flows from switch
2612. Send strict flow modify to switch
2623. Retrieve flows from switch
2634. Test PASSED iff single flow defined in step 2 above is returned in step 3
264 above; else test FAILED
265
266
2673.3.1 FLOW MODIFY 3_1
268---------------------
269
270OVERVIEW
271- No-op modify
272
273PURPOSE
274- Verify that modify of a flow with new actions same as old ones operates
275 correctly
276
277PARAMETERS
278None
279
280PROCESS
2811. Delete all flows from switch
2822. Send single flow mod, as strict modify, to switch
2833. Verify flow table in switch
2844. Send same flow mod, as strict modify, to switch
2855. Verify flow table in switch
2866. Test PASSED iff flow defined in step 2 and 4 above verified; else FAILED
287
288
2894. FLOW DELETE
290===============
291
2924.1 FLOW DELETE 1
293------------------
294
295OVERVIEW
296- Strict delete of single flows
297
298PURPOSE
299- Verify correct operation of strict delete of single defined flow
300
301INPUTS
302- NUM_FLOWS: Number of flows to define; 0 => maximum number of flows, as
303 determined fro switch capabilities
304
305PROCESS
3061. Delete all flows from switch
3072. Generate NUM_FLOWS distinct flow configurations
3083. 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)
3114. Pick 1 defined flow F at random
3125. Send strict flow delete for F to switch
3136. Retrieve flow stats from switch
3147. Compare flow configurations returned by switch
3158. 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
3194.2 FLOW DELETE 2
320------------------
321
322OVERVIEW
323- Loose delete of flows
324
325PURPOSE
326- Verify correct operation of loose delete of multiple flows
327
328INPUTS
329- NUM_FLOWS: Number of flows to define; 0 => maximum number of flows, as
330 determined fro switch capabilities
331
332PROCESS
3331. Delete all flows from switch
3342. Generate NUM_FLOWS distinct flow configurations
3353. 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)
3384. Pick 1 defined flow F at random
3395. Wildcard out 1 qualifier in match of F, creating F', such that F' will
340 match more than 1 existing flow key
3416. Send loose flow delete for F' to switch
3427. Retrieve flow stats from switch
3438. Compare flow configurations returned by switch
3449. 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
3504.4 FLOW DELETE 4
351------------------
352
353OVERVIEW
354- Flow removed messages
355
356PURPOSE
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
360INPUTS
361- NUM_FLOWS: Number of flows to define; 0 => maximum number of flows, as
362 determined fro switch capabilities
363
364PROCESS
3651. Delete all flows from switch
3662. Generate NUM_FLOWS distinct flow configurations
3673. 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)
3704. Pick 1 defined flow F at random
3715. Send strict flow delete for F to switch
3726. Verify that OFPT_FLOW_REMOVED/OFPRR_DELETE message is received from switch
3737. Retrieve flow stats from switch
3748. Compare flow configurations returned by switch
3759. 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