blob: 1dd6c025dc8d23796f0b7dc8472e34cfdccb46c8 [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": "wcmp_meta_t",
221 "id": 6,
222 "fields": [
223 [
224 "groupId",
225 16
226 ],
227 [
228 "numBits",
229 8
230 ],
231 [
232 "selector",
233 64
234 ]
235 ],
236 "length_exp": null,
237 "max_length": null
238 }
239 ],
240 "headers": [
241 {
242 "name": "standard_metadata",
243 "id": 0,
244 "header_type": "standard_metadata_t",
245 "metadata": true
246 },
247 {
248 "name": "intrinsic_metadata",
249 "id": 1,
250 "header_type": "intrinsic_metadata_t",
251 "metadata": true
252 },
253 {
254 "name": "ethernet",
255 "id": 2,
256 "header_type": "ethernet_t",
257 "metadata": false
258 },
259 {
260 "name": "ipv4",
261 "id": 3,
262 "header_type": "ipv4_t",
263 "metadata": false
264 },
265 {
266 "name": "tcp",
267 "id": 4,
268 "header_type": "tcp_t",
269 "metadata": false
270 },
271 {
272 "name": "udp",
273 "id": 5,
274 "header_type": "udp_t",
275 "metadata": false
276 },
277 {
278 "name": "wcmp_meta",
279 "id": 6,
280 "header_type": "wcmp_meta_t",
281 "metadata": true
282 }
283 ],
284 "header_stacks": [],
285 "parsers": [
286 {
287 "name": "parser",
288 "id": 0,
289 "init_state": "start",
290 "parse_states": [
291 {
292 "name": "start",
293 "id": 0,
294 "parser_ops": [],
295 "transition_key": [],
296 "transitions": [
297 {
298 "value": "default",
299 "mask": null,
300 "next_state": "parse_ethernet"
301 }
302 ]
303 },
304 {
305 "name": "parse_ethernet",
306 "id": 1,
307 "parser_ops": [
308 {
309 "op": "extract",
310 "parameters": [
311 {
312 "type": "regular",
313 "value": "ethernet"
314 }
315 ]
316 }
317 ],
318 "transition_key": [
319 {
320 "type": "field",
321 "value": [
322 "ethernet",
323 "etherType"
324 ]
325 }
326 ],
327 "transitions": [
328 {
329 "value": "0x0800",
330 "mask": null,
331 "next_state": "parse_ipv4"
332 },
333 {
334 "value": "default",
335 "mask": null,
336 "next_state": null
337 }
338 ]
339 },
340 {
341 "name": "parse_ipv4",
342 "id": 2,
343 "parser_ops": [
344 {
345 "op": "extract",
346 "parameters": [
347 {
348 "type": "regular",
349 "value": "ipv4"
350 }
351 ]
352 }
353 ],
354 "transition_key": [
355 {
356 "type": "field",
357 "value": [
358 "ipv4",
359 "fragOffset"
360 ]
361 },
362 {
363 "type": "field",
364 "value": [
365 "ipv4",
366 "protocol"
367 ]
368 }
369 ],
370 "transitions": [
371 {
372 "value": "0x000006",
373 "mask": null,
374 "next_state": "parse_tcp"
375 },
376 {
377 "value": "0x000011",
378 "mask": null,
379 "next_state": "parse_udp"
380 },
381 {
382 "value": "default",
383 "mask": null,
384 "next_state": null
385 }
386 ]
387 },
388 {
389 "name": "parse_tcp",
390 "id": 3,
391 "parser_ops": [
392 {
393 "op": "extract",
394 "parameters": [
395 {
396 "type": "regular",
397 "value": "tcp"
398 }
399 ]
400 }
401 ],
402 "transition_key": [],
403 "transitions": [
404 {
405 "value": "default",
406 "mask": null,
407 "next_state": null
408 }
409 ]
410 },
411 {
412 "name": "parse_udp",
413 "id": 4,
414 "parser_ops": [
415 {
416 "op": "extract",
417 "parameters": [
418 {
419 "type": "regular",
420 "value": "udp"
421 }
422 ]
423 }
424 ],
425 "transition_key": [],
426 "transitions": [
427 {
428 "value": "default",
429 "mask": null,
430 "next_state": null
431 }
432 ]
433 }
434 ]
435 }
436 ],
437 "deparsers": [
438 {
439 "name": "deparser",
440 "id": 0,
441 "order": [
442 "ethernet",
443 "ipv4",
444 "tcp",
445 "udp"
446 ]
447 }
448 ],
449 "meter_arrays": [],
450 "actions": [
451 {
452 "name": "set_egress_port",
453 "id": 0,
454 "runtime_data": [
455 {
456 "name": "port",
457 "bitwidth": 9
458 }
459 ],
460 "primitives": [
461 {
462 "op": "modify_field",
463 "parameters": [
464 {
465 "type": "field",
466 "value": [
467 "standard_metadata",
468 "egress_spec"
469 ]
470 },
471 {
472 "type": "runtime_data",
473 "value": 0
474 }
475 ]
476 }
477 ]
478 },
479 {
480 "name": "_drop",
481 "id": 1,
482 "runtime_data": [],
483 "primitives": [
484 {
485 "op": "modify_field",
486 "parameters": [
487 {
488 "type": "field",
489 "value": [
490 "standard_metadata",
491 "egress_spec"
492 ]
493 },
494 {
495 "type": "hexstr",
496 "value": "0x1ff"
497 }
498 ]
499 }
500 ]
501 },
502 {
503 "name": "send_to_cpu",
504 "id": 2,
505 "runtime_data": [],
506 "primitives": [
507 {
508 "op": "modify_field",
509 "parameters": [
510 {
511 "type": "field",
512 "value": [
513 "standard_metadata",
514 "egress_spec"
515 ]
516 },
517 {
518 "type": "hexstr",
519 "value": "0xff"
520 }
521 ]
522 }
523 ]
524 },
525 {
526 "name": "wcmp_group",
527 "id": 3,
528 "runtime_data": [
529 {
530 "name": "groupId",
531 "bitwidth": 16
532 }
533 ],
534 "primitives": [
535 {
536 "op": "modify_field",
537 "parameters": [
538 {
539 "type": "field",
540 "value": [
541 "wcmp_meta",
542 "groupId"
543 ]
544 },
545 {
546 "type": "runtime_data",
547 "value": 0
548 }
549 ]
550 },
551 {
552 "op": "modify_field_with_hash_based_offset",
553 "parameters": [
554 {
555 "type": "field",
556 "value": [
557 "wcmp_meta",
558 "numBits"
559 ]
560 },
561 {
562 "type": "hexstr",
563 "value": "0x2"
564 },
565 {
566 "type": "calculation",
567 "value": "wcmp_hash"
568 },
569 {
570 "type": "hexstr",
571 "value": "0x3e"
572 }
573 ]
574 }
575 ]
576 },
577 {
578 "name": "wcmp_set_selector",
579 "id": 4,
580 "runtime_data": [],
581 "primitives": [
582 {
583 "op": "modify_field",
584 "parameters": [
585 {
586 "type": "field",
587 "value": [
588 "wcmp_meta",
589 "selector"
590 ]
591 },
592 {
593 "type": "expression",
594 "value": {
595 "type": "expression",
596 "value": {
597 "op": "<<",
598 "left": {
599 "type": "expression",
600 "value": {
601 "op": "-",
602 "left": {
603 "type": "expression",
604 "value": {
605 "op": "<<",
606 "left": {
607 "type": "hexstr",
608 "value": "0x1"
609 },
610 "right": {
611 "type": "field",
612 "value": [
613 "wcmp_meta",
614 "numBits"
615 ]
616 }
617 }
618 },
619 "right": {
620 "type": "hexstr",
621 "value": "0x1"
622 }
623 }
624 },
625 "right": {
626 "type": "expression",
627 "value": {
628 "op": "-",
629 "left": {
630 "type": "hexstr",
631 "value": "0x40"
632 },
633 "right": {
634 "type": "field",
635 "value": [
636 "wcmp_meta",
637 "numBits"
638 ]
639 }
640 }
641 }
642 }
643 }
644 }
645 ]
646 }
647 ]
648 },
649 {
650 "name": "count_packet",
651 "id": 5,
652 "runtime_data": [],
653 "primitives": [
654 {
655 "op": "count",
656 "parameters": [
657 {
658 "type": "counter_array",
659 "value": "ingress_port_counter"
660 },
661 {
662 "type": "field",
663 "value": [
664 "standard_metadata",
665 "ingress_port"
666 ]
667 }
668 ]
669 },
670 {
671 "op": "count",
672 "parameters": [
673 {
674 "type": "counter_array",
675 "value": "egress_port_counter"
676 },
677 {
678 "type": "field",
679 "value": [
680 "standard_metadata",
681 "egress_spec"
682 ]
683 }
684 ]
685 }
686 ]
687 }
688 ],
689 "pipelines": [
690 {
691 "name": "ingress",
692 "id": 0,
693 "init_table": "table0",
694 "tables": [
695 {
696 "name": "port_count_table",
697 "id": 0,
698 "match_type": "exact",
699 "type": "simple",
700 "max_size": 16384,
701 "with_counters": false,
702 "direct_meters": null,
703 "support_timeout": false,
704 "key": [],
705 "actions": [
706 "count_packet"
707 ],
708 "next_tables": {
709 "count_packet": null
710 },
711 "default_action": null,
712 "base_default_next": null
713 },
714 {
715 "name": "table0",
716 "id": 1,
717 "match_type": "ternary",
718 "type": "simple",
719 "max_size": 16384,
720 "with_counters": true,
721 "direct_meters": null,
722 "support_timeout": true,
723 "key": [
724 {
725 "match_type": "ternary",
726 "target": [
727 "standard_metadata",
728 "ingress_port"
729 ],
730 "mask": null
731 },
732 {
733 "match_type": "ternary",
734 "target": [
735 "ethernet",
736 "dstAddr"
737 ],
738 "mask": null
739 },
740 {
741 "match_type": "ternary",
742 "target": [
743 "ethernet",
744 "srcAddr"
745 ],
746 "mask": null
747 },
748 {
749 "match_type": "ternary",
750 "target": [
751 "ethernet",
752 "etherType"
753 ],
754 "mask": null
755 }
756 ],
757 "actions": [
758 "set_egress_port",
759 "wcmp_group",
760 "send_to_cpu",
761 "_drop"
762 ],
763 "next_tables": {
764 "set_egress_port": "_condition_0",
765 "wcmp_group": "wcmp_set_selector_table",
766 "send_to_cpu": "_condition_0",
767 "_drop": "_condition_0"
768 },
769 "default_action": null,
770 "base_default_next": "_condition_0"
771 },
772 {
773 "name": "wcmp_set_selector_table",
774 "id": 2,
775 "match_type": "exact",
776 "type": "simple",
777 "max_size": 16384,
778 "with_counters": false,
779 "direct_meters": null,
780 "support_timeout": false,
781 "key": [],
782 "actions": [
783 "wcmp_set_selector"
784 ],
785 "next_tables": {
786 "wcmp_set_selector": "wcmp_group_table"
787 },
788 "default_action": null,
789 "base_default_next": "_condition_0"
790 },
791 {
792 "name": "wcmp_group_table",
793 "id": 3,
794 "match_type": "lpm",
795 "type": "simple",
796 "max_size": 16384,
797 "with_counters": true,
798 "direct_meters": null,
799 "support_timeout": false,
800 "key": [
801 {
802 "match_type": "exact",
803 "target": [
804 "wcmp_meta",
805 "groupId"
806 ],
807 "mask": null
808 },
809 {
810 "match_type": "lpm",
811 "target": [
812 "wcmp_meta",
813 "selector"
814 ],
815 "mask": null
816 }
817 ],
818 "actions": [
819 "set_egress_port"
820 ],
821 "next_tables": {
822 "set_egress_port": "_condition_0"
823 },
824 "default_action": null,
825 "base_default_next": "_condition_0"
826 }
827 ],
828 "conditionals": [
829 {
830 "name": "_condition_0",
831 "id": 0,
832 "expression": {
833 "type": "expression",
834 "value": {
835 "op": "<",
836 "left": {
837 "type": "field",
838 "value": [
839 "standard_metadata",
840 "egress_spec"
841 ]
842 },
843 "right": {
844 "type": "hexstr",
845 "value": "0xfe"
846 }
847 }
848 },
849 "true_next": "port_count_table",
850 "false_next": null
851 }
852 ]
853 },
854 {
855 "name": "egress",
856 "id": 1,
857 "init_table": null,
858 "tables": [],
859 "conditionals": []
860 }
861 ],
862 "calculations": [
863 {
864 "name": "wcmp_hash",
865 "id": 0,
866 "input": [
867 {
868 "type": "field",
869 "value": [
870 "ipv4",
871 "srcAddr"
872 ]
873 },
874 {
875 "type": "field",
876 "value": [
877 "ipv4",
878 "dstAddr"
879 ]
880 },
881 {
882 "type": "field",
883 "value": [
884 "ipv4",
885 "protocol"
886 ]
887 },
888 {
889 "type": "field",
890 "value": [
891 "tcp",
892 "srcPort"
893 ]
894 },
895 {
896 "type": "field",
897 "value": [
898 "tcp",
899 "dstPort"
900 ]
901 },
902 {
903 "type": "field",
904 "value": [
905 "udp",
906 "srcPort"
907 ]
908 },
909 {
910 "type": "field",
911 "value": [
912 "udp",
913 "dstPort"
914 ]
915 }
916 ],
917 "algo": "bmv2_hash"
918 }
919 ],
920 "checksums": [],
921 "learn_lists": [],
922 "field_lists": [],
923 "counter_arrays": [
924 {
925 "name": "ingress_port_counter",
926 "id": 0,
927 "is_direct": false,
928 "size": 254
929 },
930 {
931 "name": "egress_port_counter",
932 "id": 1,
933 "is_direct": false,
934 "size": 254
935 },
936 {
937 "name": "table0_counter",
938 "id": 2,
939 "is_direct": true,
940 "binding": "table0"
941 },
942 {
943 "name": "wcmp_group_table_counter",
944 "id": 3,
945 "is_direct": true,
946 "binding": "wcmp_group_table"
947 }
948 ],
949 "register_arrays": [],
950 "force_arith": [
951 [
952 "standard_metadata",
953 "ingress_port"
954 ],
955 [
956 "standard_metadata",
957 "packet_length"
958 ],
959 [
960 "standard_metadata",
961 "egress_spec"
962 ],
963 [
964 "standard_metadata",
965 "egress_port"
966 ],
967 [
968 "standard_metadata",
969 "egress_instance"
970 ],
971 [
972 "standard_metadata",
973 "instance_type"
974 ],
975 [
976 "standard_metadata",
977 "clone_spec"
978 ],
979 [
980 "standard_metadata",
981 "_padding"
982 ],
983 [
984 "intrinsic_metadata",
985 "ingress_global_timestamp"
986 ],
987 [
988 "intrinsic_metadata",
989 "lf_field_list"
990 ],
991 [
992 "intrinsic_metadata",
993 "mcast_grp"
994 ],
995 [
996 "intrinsic_metadata",
997 "egress_rid"
998 ]
999 ]
1000}