backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of14 / match / 02_METADATA_Mask.json
1 [
2     "match: 02_METADATA (Mask)",
3     {
4         "description":"ethernet/ipv4/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:2'",
5         "prerequisite":[
6             {
7                 "OFPFlowMod":{
8                     "table_id":0,
9                     "match":{
10                         "OFPMatch":{
11                             "oxm_fields":[]
12                         }
13                     },
14                     "instructions":[
15                         {
16                             "OFPInstructionWriteMetadata":{
17                                 "metadata":255,
18                                 "metadata_mask":4294967295
19                             }
20                         },
21                         {
22                             "OFPInstructionGotoTable":{
23                                 "table_id":1
24                             }
25                         }
26                     ]
27                 }
28             },
29             {
30                 "OFPFlowMod":{
31                     "table_id":1,
32                     "match":{
33                         "OFPMatch":{
34                             "oxm_fields":[
35                                 {
36                                     "OXMTlv":{
37                                         "field":"metadata",
38                                         "mask":4294967280,
39                                         "value":240
40                                     }
41                                 }
42                             ]
43                         }
44                     },
45                     "instructions":[
46                         {
47                             "OFPInstructionActions":{
48                                 "actions":[
49                                     {
50                                         "OFPActionOutput":{
51                                             "port":2
52                                         }
53                                     }
54                                 ],
55                                 "type":4
56                             }
57                         }
58                     ]
59                 }
60             }
61         ],
62         "tests":[
63             {
64                 "ingress":[
65                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
66                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
67                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
68                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
69                 ],
70                 "egress":[
71                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
72                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
73                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
74                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
75                 ]
76             }
77         ]
78     },
79     {
80         "description":"ethernet/ipv4/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:CONTROLLER'",
81         "prerequisite":[
82             {
83                 "OFPFlowMod":{
84                     "table_id":0,
85                     "match":{
86                         "OFPMatch":{
87                             "oxm_fields":[]
88                         }
89                     },
90                     "instructions":[
91                         {
92                             "OFPInstructionWriteMetadata":{
93                                 "metadata":255,
94                                 "metadata_mask":4294967295
95                             }
96                         },
97                         {
98                             "OFPInstructionGotoTable":{
99                                 "table_id":1
100                             }
101                         }
102                     ]
103                 }
104             },
105             {
106                 "OFPFlowMod":{
107                     "table_id":1,
108                     "match":{
109                         "OFPMatch":{
110                             "oxm_fields":[
111                                 {
112                                     "OXMTlv":{
113                                         "field":"metadata",
114                                         "mask":4294967280,
115                                         "value":240
116                                     }
117                                 }
118                             ]
119                         }
120                     },
121                     "instructions":[
122                         {
123                             "OFPInstructionActions":{
124                                 "actions":[
125                                     {
126                                         "OFPActionOutput":{
127                                             "max_len":65535,
128                                             "port":4294967293
129                                         }
130                                     }
131                                 ],
132                                 "type":4
133                             }
134                         }
135                     ]
136                 }
137             }
138         ],
139         "tests":[
140             {
141                 "ingress":[
142                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
143                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
144                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
145                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
146                 ],
147                 "PACKET_IN":[
148                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
149                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
150                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
151                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
152                 ]
153             }
154         ]
155     },
156     {
157         "description":"ethernet/ipv4/tcp-->'actions=write_metadata:155/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:2'",
158         "prerequisite":[
159             {
160                 "OFPFlowMod":{
161                     "table_id":0,
162                     "match":{
163                         "OFPMatch":{
164                             "oxm_fields":[]
165                         }
166                     },
167                     "instructions":[
168                         {
169                             "OFPInstructionWriteMetadata":{
170                                 "metadata":155,
171                                 "metadata_mask":4294967295
172                             }
173                         },
174                         {
175                             "OFPInstructionGotoTable":{
176                                 "table_id":1
177                             }
178                         }
179                     ]
180                 }
181             },
182             {
183                 "OFPFlowMod":{
184                     "table_id":1,
185                     "match":{
186                         "OFPMatch":{
187                             "oxm_fields":[
188                                 {
189                                     "OXMTlv":{
190                                         "field":"metadata",
191                                         "mask":4294967280,
192                                         "value":240
193                                     }
194                                 }
195                             ]
196                         }
197                     },
198                     "instructions":[
199                         {
200                             "OFPInstructionActions":{
201                                 "actions":[
202                                     {
203                                         "OFPActionOutput":{
204                                             "port":2
205                                         }
206                                     }
207                                 ],
208                                 "type":4
209                             }
210                         }
211                     ]
212                 }
213             }
214         ],
215         "tests":[
216             {
217                 "ingress":[
218                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)",
219                     "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)",
220                     "tcp(dst_port=6789, option=bytes(b'\\x01' * 4), src_port=12345)",
221                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
222                 ],
223                 "table-miss":[
224                     1
225                 ]
226             }
227         ]
228     },
229     {
230         "description":"ethernet/ipv6/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:2'",
231         "prerequisite":[
232             {
233                 "OFPFlowMod":{
234                     "table_id":0,
235                     "match":{
236                         "OFPMatch":{
237                             "oxm_fields":[]
238                         }
239                     },
240                     "instructions":[
241                         {
242                             "OFPInstructionWriteMetadata":{
243                                 "metadata":255,
244                                 "metadata_mask":4294967295
245                             }
246                         },
247                         {
248                             "OFPInstructionGotoTable":{
249                                 "table_id":1
250                             }
251                         }
252                     ]
253                 }
254             },
255             {
256                 "OFPFlowMod":{
257                     "table_id":1,
258                     "match":{
259                         "OFPMatch":{
260                             "oxm_fields":[
261                                 {
262                                     "OXMTlv":{
263                                         "field":"metadata",
264                                         "mask":4294967280,
265                                         "value":240
266                                     }
267                                 }
268                             ]
269                         }
270                     },
271                     "instructions":[
272                         {
273                             "OFPInstructionActions":{
274                                 "actions":[
275                                     {
276                                         "OFPActionOutput":{
277                                             "port":2
278                                         }
279                                     }
280                                 ],
281                                 "type":4
282                             }
283                         }
284                     ]
285                 }
286             }
287         ],
288         "tests":[
289             {
290                 "ingress":[
291                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
292                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
293                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
294                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
295                 ],
296                 "egress":[
297                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
298                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
299                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
300                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
301                 ]
302             }
303         ]
304     },
305     {
306         "description":"ethernet/ipv6/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:CONTROLLER'",
307         "prerequisite":[
308             {
309                 "OFPFlowMod":{
310                     "table_id":0,
311                     "match":{
312                         "OFPMatch":{
313                             "oxm_fields":[]
314                         }
315                     },
316                     "instructions":[
317                         {
318                             "OFPInstructionWriteMetadata":{
319                                 "metadata":255,
320                                 "metadata_mask":4294967295
321                             }
322                         },
323                         {
324                             "OFPInstructionGotoTable":{
325                                 "table_id":1
326                             }
327                         }
328                     ]
329                 }
330             },
331             {
332                 "OFPFlowMod":{
333                     "table_id":1,
334                     "match":{
335                         "OFPMatch":{
336                             "oxm_fields":[
337                                 {
338                                     "OXMTlv":{
339                                         "field":"metadata",
340                                         "mask":4294967280,
341                                         "value":240
342                                     }
343                                 }
344                             ]
345                         }
346                     },
347                     "instructions":[
348                         {
349                             "OFPInstructionActions":{
350                                 "actions":[
351                                     {
352                                         "OFPActionOutput":{
353                                             "max_len":65535,
354                                             "port":4294967293
355                                         }
356                                     }
357                                 ],
358                                 "type":4
359                             }
360                         }
361                     ]
362                 }
363             }
364         ],
365         "tests":[
366             {
367                 "ingress":[
368                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
369                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
370                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
371                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
372                 ],
373                 "PACKET_IN":[
374                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
375                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
376                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
377                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
378                 ]
379             }
380         ]
381     },
382     {
383         "description":"ethernet/ipv6/tcp-->'actions=write_metadata:155/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:2'",
384         "prerequisite":[
385             {
386                 "OFPFlowMod":{
387                     "table_id":0,
388                     "match":{
389                         "OFPMatch":{
390                             "oxm_fields":[]
391                         }
392                     },
393                     "instructions":[
394                         {
395                             "OFPInstructionWriteMetadata":{
396                                 "metadata":155,
397                                 "metadata_mask":4294967295
398                             }
399                         },
400                         {
401                             "OFPInstructionGotoTable":{
402                                 "table_id":1
403                             }
404                         }
405                     ]
406                 }
407             },
408             {
409                 "OFPFlowMod":{
410                     "table_id":1,
411                     "match":{
412                         "OFPMatch":{
413                             "oxm_fields":[
414                                 {
415                                     "OXMTlv":{
416                                         "field":"metadata",
417                                         "mask":4294967280,
418                                         "value":240
419                                     }
420                                 }
421                             ]
422                         }
423                     },
424                     "instructions":[
425                         {
426                             "OFPInstructionActions":{
427                                 "actions":[
428                                     {
429                                         "OFPActionOutput":{
430                                             "port":2
431                                         }
432                                     }
433                                 ],
434                                 "type":4
435                             }
436                         }
437                     ]
438                 }
439             }
440         ],
441         "tests":[
442             {
443                 "ingress":[
444                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)",
445                     "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)",
446                     "tcp(dst_port=6789, option=bytes(b'\\x01' * 4), src_port=12345)",
447                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
448                 ],
449                 "table-miss":[
450                     1
451                 ]
452             }
453         ]
454     },
455     {
456         "description":"ethernet/arp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:2'",
457         "prerequisite":[
458             {
459                 "OFPFlowMod":{
460                     "table_id":0,
461                     "match":{
462                         "OFPMatch":{
463                             "oxm_fields":[]
464                         }
465                     },
466                     "instructions":[
467                         {
468                             "OFPInstructionWriteMetadata":{
469                                 "metadata":255,
470                                 "metadata_mask":4294967295
471                             }
472                         },
473                         {
474                             "OFPInstructionGotoTable":{
475                                 "table_id":1
476                             }
477                         }
478                     ]
479                 }
480             },
481             {
482                 "OFPFlowMod":{
483                     "table_id":1,
484                     "match":{
485                         "OFPMatch":{
486                             "oxm_fields":[
487                                 {
488                                     "OXMTlv":{
489                                         "field":"metadata",
490                                         "mask":4294967280,
491                                         "value":240
492                                     }
493                                 }
494                             ]
495                         }
496                     },
497                     "instructions":[
498                         {
499                             "OFPInstructionActions":{
500                                 "actions":[
501                                     {
502                                         "OFPActionOutput":{
503                                             "port":2
504                                         }
505                                     }
506                                 ],
507                                 "type":4
508                             }
509                         }
510                     ]
511                 }
512             }
513         ],
514         "tests":[
515             {
516                 "ingress":[
517                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
518                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
519                     "bytes(b'\\x00' * (60 - 42))"
520                 ],
521                 "egress":[
522                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
523                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
524                     "bytes(b'\\x00' * (60 - 42))"
525                 ]
526             }
527         ]
528     },
529     {
530         "description":"ethernet/arp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:CONTROLLER'",
531         "prerequisite":[
532             {
533                 "OFPFlowMod":{
534                     "table_id":0,
535                     "match":{
536                         "OFPMatch":{
537                             "oxm_fields":[]
538                         }
539                     },
540                     "instructions":[
541                         {
542                             "OFPInstructionWriteMetadata":{
543                                 "metadata":255,
544                                 "metadata_mask":4294967295
545                             }
546                         },
547                         {
548                             "OFPInstructionGotoTable":{
549                                 "table_id":1
550                             }
551                         }
552                     ]
553                 }
554             },
555             {
556                 "OFPFlowMod":{
557                     "table_id":1,
558                     "match":{
559                         "OFPMatch":{
560                             "oxm_fields":[
561                                 {
562                                     "OXMTlv":{
563                                         "field":"metadata",
564                                         "mask":4294967280,
565                                         "value":240
566                                     }
567                                 }
568                             ]
569                         }
570                     },
571                     "instructions":[
572                         {
573                             "OFPInstructionActions":{
574                                 "actions":[
575                                     {
576                                         "OFPActionOutput":{
577                                             "max_len":65535,
578                                             "port":4294967293
579                                         }
580                                     }
581                                 ],
582                                 "type":4
583                             }
584                         }
585                     ]
586                 }
587             }
588         ],
589         "tests":[
590             {
591                 "ingress":[
592                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
593                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
594                     "bytes(b'\\x00' * (60 - 42))"
595                 ],
596                 "PACKET_IN":[
597                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
598                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
599                     "bytes(b'\\x00' * (60 - 42))"
600                 ]
601             }
602         ]
603     },
604     {
605         "description":"ethernet/arp-->'actions=write_metadata:155/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:2'",
606         "prerequisite":[
607             {
608                 "OFPFlowMod":{
609                     "table_id":0,
610                     "match":{
611                         "OFPMatch":{
612                             "oxm_fields":[]
613                         }
614                     },
615                     "instructions":[
616                         {
617                             "OFPInstructionWriteMetadata":{
618                                 "metadata":155,
619                                 "metadata_mask":4294967295
620                             }
621                         },
622                         {
623                             "OFPInstructionGotoTable":{
624                                 "table_id":1
625                             }
626                         }
627                     ]
628                 }
629             },
630             {
631                 "OFPFlowMod":{
632                     "table_id":1,
633                     "match":{
634                         "OFPMatch":{
635                             "oxm_fields":[
636                                 {
637                                     "OXMTlv":{
638                                         "field":"metadata",
639                                         "mask":4294967280,
640                                         "value":240
641                                     }
642                                 }
643                             ]
644                         }
645                     },
646                     "instructions":[
647                         {
648                             "OFPInstructionActions":{
649                                 "actions":[
650                                     {
651                                         "OFPActionOutput":{
652                                             "port":2
653                                         }
654                                     }
655                                 ],
656                                 "type":4
657                             }
658                         }
659                     ]
660                 }
661             }
662         ],
663         "tests":[
664             {
665                 "ingress":[
666                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)",
667                     "arp(dst_ip='10.10.20.20',dst_mac='ba:bb:bb:bb:bb:bb', opcode=2, src_ip='10.10.10.10',src_mac='aa:aa:aa:aa:aa:aa')",
668                     "bytes(b'\\x00' * (60 - 42))"
669                 ],
670                 "table-miss":[
671                     1
672                 ]
673             }
674         ]
675     }
676 ]