blob: 5bf2d4a95c603b3f90bcd7d140dc1c867cb48948 [file] [log] [blame]
Carmelo Casconefbc577b2016-06-17 23:19:09 -07001{
2 "header_types": [
3 {
4 "name": "standard_metadata_t",
5 "id": 0,
6 "fields": [
7 [
8 "ingress_port",
9 9
10 ],
11 [
12 "packet_length",
13 32
14 ],
15 [
16 "egress_spec",
17 9
18 ],
19 [
20 "egress_port",
21 9
22 ],
23 [
24 "egress_instance",
25 32
26 ],
27 [
28 "instance_type",
29 32
30 ],
31 [
32 "clone_spec",
33 32
34 ],
35 [
36 "_padding",
37 5
38 ]
39 ],
40 "length_exp": null,
41 "max_length": null
42 },
43 {
44 "name": "intrinsic_metadata_t",
45 "id": 1,
46 "fields": [
47 [
48 "ingress_global_timestamp",
49 32
50 ],
51 [
52 "lf_field_list",
53 32
54 ],
55 [
56 "mcast_grp",
57 16
58 ],
59 [
60 "egress_rid",
61 16
62 ]
63 ],
64 "length_exp": null,
65 "max_length": null
66 },
67 {
68 "name": "ethernet_t",
69 "id": 2,
70 "fields": [
71 [
72 "dstAddr",
73 48
74 ],
75 [
76 "srcAddr",
77 48
78 ],
79 [
80 "etherType",
81 16
82 ]
83 ],
84 "length_exp": null,
85 "max_length": null
86 },
87 {
88 "name": "ipv4_t",
89 "id": 3,
90 "fields": [
91 [
92 "version",
93 4
94 ],
95 [
96 "ihl",
97 4
98 ],
99 [
100 "diffserv",
101 8
102 ],
103 [
104 "totalLen",
105 16
106 ],
107 [
108 "identification",
109 16
110 ],
111 [
112 "flags",
113 3
114 ],
115 [
116 "fragOffset",
117 13
118 ],
119 [
120 "ttl",
121 8
122 ],
123 [
124 "protocol",
125 8
126 ],
127 [
128 "hdrChecksum",
129 16
130 ],
131 [
132 "srcAddr",
133 32
134 ],
135 [
136 "dstAddr",
137 32
138 ]
139 ],
140 "length_exp": null,
141 "max_length": null
142 },
143 {
144 "name": "tcp_t",
145 "id": 4,
146 "fields": [
147 [
148 "srcPort",
149 16
150 ],
151 [
152 "dstPort",
153 16
154 ],
155 [
156 "seqNo",
157 32
158 ],
159 [
160 "ackNo",
161 32
162 ],
163 [
164 "dataOffset",
165 4
166 ],
167 [
168 "res",
169 3
170 ],
171 [
172 "ecn",
173 3
174 ],
175 [
176 "ctrl",
177 6
178 ],
179 [
180 "window",
181 16
182 ],
183 [
184 "checksum",
185 16
186 ],
187 [
188 "urgentPtr",
189 16
190 ]
191 ],
192 "length_exp": null,
193 "max_length": null
194 },
195 {
196 "name": "udp_t",
197 "id": 5,
198 "fields": [
199 [
200 "srcPort",
201 16
202 ],
203 [
204 "dstPort",
205 16
206 ],
207 [
208 "length_",
209 16
210 ],
211 [
212 "checksum",
213 16
214 ]
215 ],
216 "length_exp": null,
217 "max_length": null
218 },
219 {
220 "name": "ecmp_metadata_t",
221 "id": 6,
222 "fields": [
223 [
224 "groupId",
225 16
226 ],
227 [
228 "selector",
229 16
230 ]
231 ],
232 "length_exp": null,
233 "max_length": null
234 }
235 ],
236 "headers": [
237 {
238 "name": "standard_metadata",
239 "id": 0,
240 "header_type": "standard_metadata_t",
241 "metadata": true
242 },
243 {
244 "name": "intrinsic_metadata",
245 "id": 1,
246 "header_type": "intrinsic_metadata_t",
247 "metadata": true
248 },
249 {
250 "name": "ethernet",
251 "id": 2,
252 "header_type": "ethernet_t",
253 "metadata": false
254 },
255 {
256 "name": "ipv4",
257 "id": 3,
258 "header_type": "ipv4_t",
259 "metadata": false
260 },
261 {
262 "name": "tcp",
263 "id": 4,
264 "header_type": "tcp_t",
265 "metadata": false
266 },
267 {
268 "name": "udp",
269 "id": 5,
270 "header_type": "udp_t",
271 "metadata": false
272 },
273 {
274 "name": "ecmp_metadata",
275 "id": 6,
276 "header_type": "ecmp_metadata_t",
277 "metadata": true
278 }
279 ],
280 "header_stacks": [],
281 "parsers": [
282 {
283 "name": "parser",
284 "id": 0,
285 "init_state": "start",
286 "parse_states": [
287 {
288 "name": "start",
289 "id": 0,
290 "parser_ops": [],
291 "transition_key": [],
292 "transitions": [
293 {
294 "value": "default",
295 "mask": null,
296 "next_state": "parse_ethernet"
297 }
298 ]
299 },
300 {
301 "name": "parse_ethernet",
302 "id": 1,
303 "parser_ops": [
304 {
305 "op": "extract",
306 "parameters": [
307 {
308 "type": "regular",
309 "value": "ethernet"
310 }
311 ]
312 }
313 ],
314 "transition_key": [
315 {
316 "type": "field",
317 "value": [
318 "ethernet",
319 "etherType"
320 ]
321 }
322 ],
323 "transitions": [
324 {
325 "value": "0x0800",
326 "mask": null,
327 "next_state": "parse_ipv4"
328 },
329 {
330 "value": "default",
331 "mask": null,
332 "next_state": null
333 }
334 ]
335 },
336 {
337 "name": "parse_ipv4",
338 "id": 2,
339 "parser_ops": [
340 {
341 "op": "extract",
342 "parameters": [
343 {
344 "type": "regular",
345 "value": "ipv4"
346 }
347 ]
348 }
349 ],
350 "transition_key": [
351 {
352 "type": "field",
353 "value": [
354 "ipv4",
355 "fragOffset"
356 ]
357 },
358 {
359 "type": "field",
360 "value": [
361 "ipv4",
362 "protocol"
363 ]
364 }
365 ],
366 "transitions": [
367 {
368 "value": "0x000006",
369 "mask": null,
370 "next_state": "parse_tcp"
371 },
372 {
373 "value": "0x000011",
374 "mask": null,
375 "next_state": "parse_udp"
376 },
377 {
378 "value": "default",
379 "mask": null,
380 "next_state": null
381 }
382 ]
383 },
384 {
385 "name": "parse_tcp",
386 "id": 3,
387 "parser_ops": [
388 {
389 "op": "extract",
390 "parameters": [
391 {
392 "type": "regular",
393 "value": "tcp"
394 }
395 ]
396 }
397 ],
398 "transition_key": [],
399 "transitions": [
400 {
401 "value": "default",
402 "mask": null,
403 "next_state": null
404 }
405 ]
406 },
407 {
408 "name": "parse_udp",
409 "id": 4,
410 "parser_ops": [
411 {
412 "op": "extract",
413 "parameters": [
414 {
415 "type": "regular",
416 "value": "udp"
417 }
418 ]
419 }
420 ],
421 "transition_key": [],
422 "transitions": [
423 {
424 "value": "default",
425 "mask": null,
426 "next_state": null
427 }
428 ]
429 }
430 ]
431 }
432 ],
433 "deparsers": [
434 {
435 "name": "deparser",
436 "id": 0,
437 "order": [
438 "ethernet",
439 "ipv4",
440 "udp",
441 "tcp"
442 ]
443 }
444 ],
445 "meter_arrays": [],
446 "actions": [
447 {
448 "name": "_drop",
449 "id": 0,
450 "runtime_data": [],
451 "primitives": [
452 {
453 "op": "modify_field",
454 "parameters": [
455 {
456 "type": "field",
457 "value": [
458 "standard_metadata",
459 "egress_spec"
460 ]
461 },
462 {
463 "type": "hexstr",
464 "value": "0x1ff"
465 }
466 ]
467 }
468 ]
469 },
470 {
471 "name": "ecmp_group",
472 "id": 1,
473 "runtime_data": [
474 {
475 "name": "groupId",
476 "bitwidth": 16
477 },
478 {
479 "name": "groupSize",
480 "bitwidth": 16
481 }
482 ],
483 "primitives": [
484 {
485 "op": "modify_field",
486 "parameters": [
487 {
488 "type": "field",
489 "value": [
490 "ecmp_metadata",
491 "groupId"
492 ]
493 },
494 {
495 "type": "runtime_data",
496 "value": 0
497 }
498 ]
499 },
500 {
501 "op": "modify_field_with_hash_based_offset",
502 "parameters": [
503 {
504 "type": "field",
505 "value": [
506 "ecmp_metadata",
507 "selector"
508 ]
509 },
510 {
511 "type": "hexstr",
512 "value": "0x0"
513 },
514 {
515 "type": "calculation",
516 "value": "ecmp_hash"
517 },
518 {
519 "type": "runtime_data",
520 "value": 1
521 }
522 ]
523 }
524 ]
525 },
526 {
527 "name": "send_to_cpu",
528 "id": 2,
529 "runtime_data": [],
530 "primitives": [
531 {
532 "op": "modify_field",
533 "parameters": [
534 {
535 "type": "field",
536 "value": [
537 "standard_metadata",
538 "egress_spec"
539 ]
540 },
541 {
542 "type": "hexstr",
543 "value": "0xff"
544 }
545 ]
546 }
547 ]
548 },
549 {
550 "name": "count_packet",
551 "id": 3,
552 "runtime_data": [],
553 "primitives": [
554 {
555 "op": "count",
556 "parameters": [
557 {
558 "type": "counter_array",
559 "value": "ingress_port_counter"
560 },
561 {
562 "type": "field",
563 "value": [
564 "standard_metadata",
565 "ingress_port"
566 ]
567 }
568 ]
569 },
570 {
571 "op": "count",
572 "parameters": [
573 {
574 "type": "counter_array",
575 "value": "egress_port_counter"
576 },
577 {
578 "type": "field",
579 "value": [
580 "standard_metadata",
581 "egress_spec"
582 ]
583 }
584 ]
585 }
586 ]
587 },
588 {
589 "name": "set_egress_port",
590 "id": 4,
591 "runtime_data": [
592 {
593 "name": "port",
594 "bitwidth": 9
595 }
596 ],
597 "primitives": [
598 {
599 "op": "modify_field",
600 "parameters": [
601 {
602 "type": "field",
603 "value": [
604 "standard_metadata",
605 "egress_spec"
606 ]
607 },
608 {
609 "type": "runtime_data",
610 "value": 0
611 }
612 ]
613 }
614 ]
615 }
616 ],
617 "pipelines": [
618 {
619 "name": "ingress",
620 "id": 0,
621 "init_table": "table0",
622 "tables": [
623 {
624 "name": "port_count_table",
625 "id": 0,
626 "match_type": "exact",
627 "type": "simple",
628 "max_size": 16384,
629 "with_counters": false,
630 "direct_meters": null,
631 "support_timeout": false,
632 "key": [],
633 "actions": [
634 "count_packet"
635 ],
636 "next_tables": {
637 "count_packet": null
638 },
639 "default_action": null,
640 "base_default_next": null
641 },
642 {
643 "name": "table0",
644 "id": 1,
645 "match_type": "ternary",
646 "type": "simple",
647 "max_size": 16384,
648 "with_counters": true,
649 "direct_meters": null,
650 "support_timeout": true,
651 "key": [
652 {
653 "match_type": "ternary",
654 "target": [
655 "standard_metadata",
656 "ingress_port"
657 ],
658 "mask": null
659 },
660 {
661 "match_type": "ternary",
662 "target": [
663 "ethernet",
664 "dstAddr"
665 ],
666 "mask": null
667 },
668 {
669 "match_type": "ternary",
670 "target": [
671 "ethernet",
672 "srcAddr"
673 ],
674 "mask": null
675 },
676 {
677 "match_type": "ternary",
678 "target": [
679 "ethernet",
680 "etherType"
681 ],
682 "mask": null
683 }
684 ],
685 "actions": [
686 "set_egress_port",
687 "ecmp_group",
688 "send_to_cpu",
689 "_drop"
690 ],
691 "next_tables": {
692 "set_egress_port": "_condition_0",
693 "ecmp_group": "ecmp_group_table",
694 "send_to_cpu": "_condition_0",
695 "_drop": "_condition_0"
696 },
697 "default_action": null,
698 "base_default_next": "_condition_0"
699 },
700 {
701 "name": "ecmp_group_table",
702 "id": 2,
703 "match_type": "exact",
704 "type": "simple",
705 "max_size": 16384,
706 "with_counters": true,
707 "direct_meters": null,
708 "support_timeout": false,
709 "key": [
710 {
711 "match_type": "exact",
712 "target": [
713 "ecmp_metadata",
714 "groupId"
715 ],
716 "mask": null
717 },
718 {
719 "match_type": "exact",
720 "target": [
721 "ecmp_metadata",
722 "selector"
723 ],
724 "mask": null
725 }
726 ],
727 "actions": [
728 "set_egress_port"
729 ],
730 "next_tables": {
731 "set_egress_port": "_condition_0"
732 },
733 "default_action": null,
734 "base_default_next": "_condition_0"
735 }
736 ],
737 "conditionals": [
738 {
739 "name": "_condition_0",
740 "id": 0,
741 "expression": {
742 "type": "expression",
743 "value": {
744 "op": "<",
745 "left": {
746 "type": "field",
747 "value": [
748 "standard_metadata",
749 "egress_spec"
750 ]
751 },
752 "right": {
753 "type": "hexstr",
754 "value": "0xfe"
755 }
756 }
757 },
758 "true_next": "port_count_table",
759 "false_next": null
760 }
761 ]
762 },
763 {
764 "name": "egress",
765 "id": 1,
766 "init_table": null,
767 "tables": [],
768 "conditionals": []
769 }
770 ],
771 "calculations": [
772 {
773 "name": "ecmp_hash",
774 "id": 0,
775 "input": [
776 {
777 "type": "field",
778 "value": [
779 "ipv4",
780 "srcAddr"
781 ]
782 },
783 {
784 "type": "field",
785 "value": [
786 "ipv4",
787 "dstAddr"
788 ]
789 },
790 {
791 "type": "field",
792 "value": [
793 "ipv4",
794 "protocol"
795 ]
796 },
797 {
798 "type": "field",
799 "value": [
800 "tcp",
801 "srcPort"
802 ]
803 },
804 {
805 "type": "field",
806 "value": [
807 "tcp",
808 "dstPort"
809 ]
810 },
811 {
812 "type": "field",
813 "value": [
814 "udp",
815 "srcPort"
816 ]
817 },
818 {
819 "type": "field",
820 "value": [
821 "udp",
822 "dstPort"
823 ]
824 }
825 ],
826 "algo": "bmv2_hash"
827 }
828 ],
829 "checksums": [],
830 "learn_lists": [],
831 "field_lists": [],
832 "counter_arrays": [
833 {
834 "name": "ingress_port_counter",
835 "id": 0,
836 "is_direct": false,
837 "size": 254
838 },
839 {
840 "name": "egress_port_counter",
841 "id": 1,
842 "is_direct": false,
843 "size": 254
844 },
845 {
846 "name": "table0_counter",
847 "id": 2,
848 "is_direct": true,
849 "binding": "table0"
850 },
851 {
852 "name": "ecmp_group_table_counter",
853 "id": 3,
854 "is_direct": true,
855 "binding": "ecmp_group_table"
856 }
857 ],
858 "register_arrays": [],
859 "force_arith": [
860 [
861 "standard_metadata",
862 "ingress_port"
863 ],
864 [
865 "standard_metadata",
866 "packet_length"
867 ],
868 [
869 "standard_metadata",
870 "egress_spec"
871 ],
872 [
873 "standard_metadata",
874 "egress_port"
875 ],
876 [
877 "standard_metadata",
878 "egress_instance"
879 ],
880 [
881 "standard_metadata",
882 "instance_type"
883 ],
884 [
885 "standard_metadata",
886 "clone_spec"
887 ],
888 [
889 "standard_metadata",
890 "_padding"
891 ],
892 [
893 "intrinsic_metadata",
894 "ingress_global_timestamp"
895 ],
896 [
897 "intrinsic_metadata",
898 "lf_field_list"
899 ],
900 [
901 "intrinsic_metadata",
902 "mcast_grp"
903 ],
904 [
905 "intrinsic_metadata",
906 "egress_rid"
907 ]
908 ]
909}