blob: d7b8e81d27cabbd1c1f97dc9204a92477ba67fef [file] [log] [blame]
Carmelo Cascone700648c2018-04-11 12:02:16 -07001{
2 "program" : "mytunnel.p4",
3 "__meta__" : {
4 "version" : [2, 7],
5 "compiler" : "https://github.com/p4lang/p4c"
6 },
7 "header_types" : [
8 {
9 "name" : "scalars_0",
10 "id" : 0,
11 "fields" : [
12 ["tmp", 32, false],
13 ["tmp_1", 32, false],
14 ["tmp_0", 1, false],
15 ["hasReturned_0", 1, false],
16 ["_padding_2", 6, false]
17 ]
18 },
19 {
20 "name" : "ethernet_t",
21 "id" : 1,
22 "fields" : [
23 ["dst_addr", 48, false],
24 ["src_addr", 48, false],
25 ["ether_type", 16, false]
26 ]
27 },
28 {
29 "name" : "my_tunnel_t",
30 "id" : 2,
31 "fields" : [
32 ["proto_id", 16, false],
33 ["tun_id", 32, false]
34 ]
35 },
36 {
37 "name" : "ipv4_t",
38 "id" : 3,
39 "fields" : [
40 ["version", 4, false],
41 ["ihl", 4, false],
42 ["diffserv", 8, false],
43 ["len", 16, false],
44 ["identification", 16, false],
45 ["flags", 3, false],
46 ["frag_offset", 13, false],
47 ["ttl", 8, false],
48 ["protocol", 8, false],
49 ["hdr_checksum", 16, false],
50 ["src_addr", 32, false],
51 ["dst_addr", 32, false]
52 ]
53 },
54 {
55 "name" : "packet_out_header_t",
56 "id" : 4,
57 "fields" : [
58 ["egress_port", 9, false],
59 ["_padding", 7, false]
60 ]
61 },
62 {
63 "name" : "packet_in_header_t",
64 "id" : 5,
65 "fields" : [
66 ["ingress_port", 9, false],
67 ["_padding_0", 7, false]
68 ]
69 },
70 {
71 "name" : "standard_metadata",
72 "id" : 6,
73 "fields" : [
74 ["ingress_port", 9, false],
75 ["egress_spec", 9, false],
76 ["egress_port", 9, false],
77 ["clone_spec", 32, false],
78 ["instance_type", 32, false],
79 ["drop", 1, false],
80 ["recirculate_port", 16, false],
81 ["packet_length", 32, false],
82 ["enq_timestamp", 32, false],
83 ["enq_qdepth", 19, false],
84 ["deq_timedelta", 32, false],
85 ["deq_qdepth", 19, false],
86 ["ingress_global_timestamp", 48, false],
87 ["egress_global_timestamp", 48, false],
88 ["lf_field_list", 32, false],
89 ["mcast_grp", 16, false],
90 ["resubmit_flag", 32, false],
91 ["egress_rid", 16, false],
92 ["checksum_error", 1, false],
93 ["recirculate_flag", 32, false],
94 ["_padding_1", 5, false]
95 ]
96 }
97 ],
98 "headers" : [
99 {
100 "name" : "scalars",
101 "id" : 0,
102 "header_type" : "scalars_0",
103 "metadata" : true,
104 "pi_omit" : true
105 },
106 {
107 "name" : "standard_metadata",
108 "id" : 1,
109 "header_type" : "standard_metadata",
110 "metadata" : true,
111 "pi_omit" : true
112 },
113 {
114 "name" : "ethernet",
115 "id" : 2,
116 "header_type" : "ethernet_t",
117 "metadata" : false,
118 "pi_omit" : true
119 },
120 {
121 "name" : "my_tunnel",
122 "id" : 3,
123 "header_type" : "my_tunnel_t",
124 "metadata" : false,
125 "pi_omit" : true
126 },
127 {
128 "name" : "ipv4",
129 "id" : 4,
130 "header_type" : "ipv4_t",
131 "metadata" : false,
132 "pi_omit" : true
133 },
134 {
135 "name" : "packet_out",
136 "id" : 5,
137 "header_type" : "packet_out_header_t",
138 "metadata" : false,
139 "pi_omit" : true
140 },
141 {
142 "name" : "packet_in",
143 "id" : 6,
144 "header_type" : "packet_in_header_t",
145 "metadata" : false,
146 "pi_omit" : true
147 }
148 ],
149 "header_stacks" : [],
150 "header_union_types" : [],
151 "header_unions" : [],
152 "header_union_stacks" : [],
153 "field_lists" : [],
154 "errors" : [
155 ["NoError", 1],
156 ["PacketTooShort", 2],
157 ["NoMatch", 3],
158 ["StackOutOfBounds", 4],
159 ["HeaderTooShort", 5],
160 ["ParserTimeout", 6]
161 ],
162 "enums" : [],
163 "parsers" : [
164 {
165 "name" : "parser",
166 "id" : 0,
167 "init_state" : "start",
168 "parse_states" : [
169 {
170 "name" : "start",
171 "id" : 0,
172 "parser_ops" : [],
173 "transitions" : [
174 {
175 "type" : "hexstr",
176 "value" : "0x00ff",
177 "mask" : null,
178 "next_state" : "parse_packet_out"
179 },
180 {
181 "value" : "default",
182 "mask" : null,
183 "next_state" : "parse_ethernet"
184 }
185 ],
186 "transition_key" : [
187 {
188 "type" : "field",
189 "value" : ["standard_metadata", "ingress_port"]
190 }
191 ]
192 },
193 {
194 "name" : "parse_packet_out",
195 "id" : 1,
196 "parser_ops" : [
197 {
198 "parameters" : [
199 {
200 "type" : "regular",
201 "value" : "packet_out"
202 }
203 ],
204 "op" : "extract"
205 }
206 ],
207 "transitions" : [
208 {
209 "value" : "default",
210 "mask" : null,
211 "next_state" : "parse_ethernet"
212 }
213 ],
214 "transition_key" : []
215 },
216 {
217 "name" : "parse_ethernet",
218 "id" : 2,
219 "parser_ops" : [
220 {
221 "parameters" : [
222 {
223 "type" : "regular",
224 "value" : "ethernet"
225 }
226 ],
227 "op" : "extract"
228 }
229 ],
230 "transitions" : [
231 {
232 "type" : "hexstr",
233 "value" : "0x1212",
234 "mask" : null,
235 "next_state" : "parse_my_tunnel"
236 },
237 {
238 "type" : "hexstr",
239 "value" : "0x0800",
240 "mask" : null,
241 "next_state" : "parse_ipv4"
242 },
243 {
244 "value" : "default",
245 "mask" : null,
246 "next_state" : null
247 }
248 ],
249 "transition_key" : [
250 {
251 "type" : "field",
252 "value" : ["ethernet", "ether_type"]
253 }
254 ]
255 },
256 {
257 "name" : "parse_my_tunnel",
258 "id" : 3,
259 "parser_ops" : [
260 {
261 "parameters" : [
262 {
263 "type" : "regular",
264 "value" : "my_tunnel"
265 }
266 ],
267 "op" : "extract"
268 }
269 ],
270 "transitions" : [
271 {
272 "type" : "hexstr",
273 "value" : "0x0800",
274 "mask" : null,
275 "next_state" : "parse_ipv4"
276 },
277 {
278 "value" : "default",
279 "mask" : null,
280 "next_state" : null
281 }
282 ],
283 "transition_key" : [
284 {
285 "type" : "field",
286 "value" : ["my_tunnel", "proto_id"]
287 }
288 ]
289 },
290 {
291 "name" : "parse_ipv4",
292 "id" : 4,
293 "parser_ops" : [
294 {
295 "parameters" : [
296 {
297 "type" : "regular",
298 "value" : "ipv4"
299 }
300 ],
301 "op" : "extract"
302 }
303 ],
304 "transitions" : [
305 {
306 "value" : "default",
307 "mask" : null,
308 "next_state" : null
309 }
310 ],
311 "transition_key" : []
312 }
313 ]
314 }
315 ],
316 "parse_vsets" : [],
317 "deparsers" : [
318 {
319 "name" : "deparser",
320 "id" : 0,
321 "source_info" : {
322 "filename" : "mytunnel.p4",
323 "line" : 286,
324 "column" : 8,
325 "source_fragment" : "c_deparser"
326 },
327 "order" : ["packet_in", "ethernet", "my_tunnel", "ipv4"]
328 }
329 ],
330 "meter_arrays" : [],
331 "counter_arrays" : [
332 {
333 "name" : "c_ingress.tx_port_counter",
334 "id" : 0,
335 "source_info" : {
336 "filename" : "mytunnel.p4",
337 "line" : 140,
338 "column" : 48,
339 "source_fragment" : "tx_port_counter"
340 },
341 "size" : 255,
342 "is_direct" : false
343 },
344 {
345 "name" : "c_ingress.rx_port_counter",
346 "id" : 1,
347 "source_info" : {
348 "filename" : "mytunnel.p4",
349 "line" : 141,
350 "column" : 48,
351 "source_fragment" : "rx_port_counter"
352 },
353 "size" : 255,
354 "is_direct" : false
355 },
356 {
357 "name" : "c_ingress.l2_fwd_counter",
358 "id" : 2,
359 "is_direct" : true,
360 "binding" : "c_ingress.t_l2_fwd"
361 }
362 ],
363 "register_arrays" : [],
364 "calculations" : [],
365 "learn_lists" : [],
366 "actions" : [
367 {
368 "name" : "NoAction",
369 "id" : 0,
370 "runtime_data" : [],
371 "primitives" : []
372 },
373 {
374 "name" : "c_ingress.send_to_cpu",
375 "id" : 1,
376 "runtime_data" : [],
377 "primitives" : [
378 {
379 "op" : "assign",
380 "parameters" : [
381 {
382 "type" : "field",
383 "value" : ["standard_metadata", "egress_spec"]
384 },
385 {
386 "type" : "hexstr",
387 "value" : "0x00ff"
388 }
389 ],
390 "source_info" : {
391 "filename" : "mytunnel.p4",
392 "line" : 26,
393 "column" : 24,
394 "source_fragment" : "255; ..."
395 }
396 },
397 {
398 "op" : "add_header",
399 "parameters" : [
400 {
401 "type" : "header",
402 "value" : "packet_in"
403 }
404 ],
405 "source_info" : {
406 "filename" : "mytunnel.p4",
407 "line" : 148,
408 "column" : 8,
409 "source_fragment" : "hdr.packet_in.setValid()"
410 }
411 },
412 {
413 "op" : "assign",
414 "parameters" : [
415 {
416 "type" : "field",
417 "value" : ["packet_in", "ingress_port"]
418 },
419 {
420 "type" : "field",
421 "value" : ["standard_metadata", "ingress_port"]
422 }
423 ],
424 "source_info" : {
425 "filename" : "mytunnel.p4",
426 "line" : 149,
427 "column" : 8,
428 "source_fragment" : "hdr.packet_in.ingress_port = standard_metadata.ingress_port"
429 }
430 }
431 ]
432 },
433 {
434 "name" : "c_ingress.set_out_port",
435 "id" : 2,
436 "runtime_data" : [
437 {
438 "name" : "port",
439 "bitwidth" : 9
440 }
441 ],
442 "primitives" : [
443 {
444 "op" : "assign",
445 "parameters" : [
446 {
447 "type" : "field",
448 "value" : ["standard_metadata", "egress_spec"]
449 },
450 {
451 "type" : "runtime_data",
452 "value" : 0
453 }
454 ],
455 "source_info" : {
456 "filename" : "mytunnel.p4",
457 "line" : 153,
458 "column" : 8,
459 "source_fragment" : "standard_metadata.egress_spec = port"
460 }
461 }
462 ]
463 },
464 {
465 "name" : "c_ingress.set_out_port",
466 "id" : 3,
467 "runtime_data" : [
468 {
469 "name" : "port",
470 "bitwidth" : 9
471 }
472 ],
473 "primitives" : [
474 {
475 "op" : "assign",
476 "parameters" : [
477 {
478 "type" : "field",
479 "value" : ["standard_metadata", "egress_spec"]
480 },
481 {
482 "type" : "runtime_data",
483 "value" : 0
484 }
485 ],
486 "source_info" : {
487 "filename" : "mytunnel.p4",
488 "line" : 153,
489 "column" : 8,
490 "source_fragment" : "standard_metadata.egress_spec = port"
491 }
492 }
493 ]
494 },
495 {
496 "name" : "c_ingress._drop",
497 "id" : 4,
498 "runtime_data" : [],
499 "primitives" : [
500 {
501 "op" : "drop",
502 "parameters" : [],
503 "source_info" : {
504 "filename" : "mytunnel.p4",
505 "line" : 157,
506 "column" : 8,
507 "source_fragment" : "mark_to_drop()"
508 }
509 }
510 ]
511 },
512 {
513 "name" : "c_ingress._drop",
514 "id" : 5,
515 "runtime_data" : [],
516 "primitives" : [
517 {
518 "op" : "drop",
519 "parameters" : [],
520 "source_info" : {
521 "filename" : "mytunnel.p4",
522 "line" : 157,
523 "column" : 8,
524 "source_fragment" : "mark_to_drop()"
525 }
526 }
527 ]
528 },
529 {
530 "name" : "c_ingress._drop",
531 "id" : 6,
532 "runtime_data" : [],
533 "primitives" : [
534 {
535 "op" : "drop",
536 "parameters" : [],
537 "source_info" : {
538 "filename" : "mytunnel.p4",
539 "line" : 157,
540 "column" : 8,
541 "source_fragment" : "mark_to_drop()"
542 }
543 }
544 ]
545 },
546 {
547 "name" : "c_ingress.my_tunnel_ingress",
548 "id" : 7,
549 "runtime_data" : [
550 {
551 "name" : "tun_id",
552 "bitwidth" : 32
553 }
554 ],
555 "primitives" : [
556 {
557 "op" : "add_header",
558 "parameters" : [
559 {
560 "type" : "header",
561 "value" : "my_tunnel"
562 }
563 ],
564 "source_info" : {
565 "filename" : "mytunnel.p4",
566 "line" : 161,
567 "column" : 8,
568 "source_fragment" : "hdr.my_tunnel.setValid()"
569 }
570 },
571 {
572 "op" : "assign",
573 "parameters" : [
574 {
575 "type" : "field",
576 "value" : ["my_tunnel", "tun_id"]
577 },
578 {
579 "type" : "runtime_data",
580 "value" : 0
581 }
582 ],
583 "source_info" : {
584 "filename" : "mytunnel.p4",
585 "line" : 162,
586 "column" : 8,
587 "source_fragment" : "hdr.my_tunnel.tun_id = tun_id"
588 }
589 },
590 {
591 "op" : "assign",
592 "parameters" : [
593 {
594 "type" : "field",
595 "value" : ["my_tunnel", "proto_id"]
596 },
597 {
598 "type" : "field",
599 "value" : ["ethernet", "ether_type"]
600 }
601 ],
602 "source_info" : {
603 "filename" : "mytunnel.p4",
604 "line" : 163,
605 "column" : 8,
606 "source_fragment" : "hdr.my_tunnel.proto_id = hdr.ethernet.ether_type"
607 }
608 },
609 {
610 "op" : "assign",
611 "parameters" : [
612 {
613 "type" : "field",
614 "value" : ["ethernet", "ether_type"]
615 },
616 {
617 "type" : "hexstr",
618 "value" : "0x1212"
619 }
620 ],
621 "source_info" : {
622 "filename" : "mytunnel.p4",
623 "line" : 22,
624 "column" : 34,
625 "source_fragment" : "0x1212; ..."
626 }
627 }
628 ]
629 },
630 {
631 "name" : "c_ingress.my_tunnel_egress",
632 "id" : 8,
633 "runtime_data" : [
634 {
635 "name" : "port",
636 "bitwidth" : 9
637 }
638 ],
639 "primitives" : [
640 {
641 "op" : "assign",
642 "parameters" : [
643 {
644 "type" : "field",
645 "value" : ["standard_metadata", "egress_spec"]
646 },
647 {
648 "type" : "runtime_data",
649 "value" : 0
650 }
651 ],
652 "source_info" : {
653 "filename" : "mytunnel.p4",
654 "line" : 168,
655 "column" : 8,
656 "source_fragment" : "standard_metadata.egress_spec = port"
657 }
658 },
659 {
660 "op" : "assign",
661 "parameters" : [
662 {
663 "type" : "field",
664 "value" : ["ethernet", "ether_type"]
665 },
666 {
667 "type" : "field",
668 "value" : ["my_tunnel", "proto_id"]
669 }
670 ],
671 "source_info" : {
672 "filename" : "mytunnel.p4",
673 "line" : 169,
674 "column" : 8,
675 "source_fragment" : "hdr.ethernet.ether_type = hdr.my_tunnel.proto_id"
676 }
677 },
678 {
679 "op" : "remove_header",
680 "parameters" : [
681 {
682 "type" : "header",
683 "value" : "my_tunnel"
684 }
685 ],
686 "source_info" : {
687 "filename" : "mytunnel.p4",
688 "line" : 170,
689 "column" : 8,
690 "source_fragment" : "hdr.my_tunnel.setInvalid()"
691 }
692 }
693 ]
694 },
695 {
696 "name" : "act",
697 "id" : 9,
698 "runtime_data" : [],
699 "primitives" : [
700 {
701 "op" : "assign",
702 "parameters" : [
703 {
704 "type" : "field",
705 "value" : ["standard_metadata", "egress_spec"]
706 },
707 {
708 "type" : "field",
709 "value" : ["packet_out", "egress_port"]
710 }
711 ],
712 "source_info" : {
713 "filename" : "mytunnel.p4",
714 "line" : 222,
715 "column" : 12,
716 "source_fragment" : "standard_metadata.egress_spec = hdr.packet_out.egress_port"
717 }
718 },
719 {
720 "op" : "remove_header",
721 "parameters" : [
722 {
723 "type" : "header",
724 "value" : "packet_out"
725 }
726 ],
727 "source_info" : {
728 "filename" : "mytunnel.p4",
729 "line" : 223,
730 "column" : 12,
731 "source_fragment" : "hdr.packet_out.setInvalid()"
732 }
733 }
734 ]
735 },
736 {
737 "name" : "act_0",
738 "id" : 10,
739 "runtime_data" : [],
740 "primitives" : [
741 {
742 "op" : "assign",
743 "parameters" : [
744 {
745 "type" : "field",
746 "value" : ["scalars", "tmp_0"]
747 },
748 {
749 "type" : "expression",
750 "value" : {
751 "type" : "expression",
752 "value" : {
753 "op" : "b2d",
754 "left" : null,
755 "right" : {
756 "type" : "bool",
757 "value" : true
758 }
759 }
760 }
761 }
762 ]
763 }
764 ]
765 },
766 {
767 "name" : "act_1",
768 "id" : 11,
769 "runtime_data" : [],
770 "primitives" : [
771 {
772 "op" : "assign",
773 "parameters" : [
774 {
775 "type" : "field",
776 "value" : ["scalars", "tmp_0"]
777 },
778 {
779 "type" : "expression",
780 "value" : {
781 "type" : "expression",
782 "value" : {
783 "op" : "b2d",
784 "left" : null,
785 "right" : {
786 "type" : "bool",
787 "value" : false
788 }
789 }
790 }
791 }
792 ]
793 }
794 ]
795 },
796 {
797 "name" : "act_2",
798 "id" : 12,
799 "runtime_data" : [],
800 "primitives" : [
801 {
802 "op" : "assign",
803 "parameters" : [
804 {
805 "type" : "field",
806 "value" : ["scalars", "hasReturned_0"]
807 },
808 {
809 "type" : "expression",
810 "value" : {
811 "type" : "expression",
812 "value" : {
813 "op" : "b2d",
814 "left" : null,
815 "right" : {
816 "type" : "bool",
817 "value" : true
818 }
819 }
820 }
821 }
822 ],
823 "source_info" : {
824 "filename" : "mytunnel.p4",
825 "line" : 230,
826 "column" : 16,
827 "source_fragment" : "return"
828 }
829 }
830 ]
831 },
832 {
833 "name" : "act_3",
834 "id" : 13,
835 "runtime_data" : [],
836 "primitives" : [
837 {
838 "op" : "assign",
839 "parameters" : [
840 {
841 "type" : "field",
842 "value" : ["scalars", "hasReturned_0"]
843 },
844 {
845 "type" : "expression",
846 "value" : {
847 "type" : "expression",
848 "value" : {
849 "op" : "b2d",
850 "left" : null,
851 "right" : {
852 "type" : "bool",
853 "value" : false
854 }
855 }
856 }
857 }
858 ]
859 }
860 ]
861 },
862 {
863 "name" : "act_4",
864 "id" : 14,
865 "runtime_data" : [],
866 "primitives" : [
867 {
868 "op" : "assign",
869 "parameters" : [
870 {
871 "type" : "field",
872 "value" : ["scalars", "tmp"]
873 },
874 {
875 "type" : "expression",
876 "value" : {
877 "type" : "expression",
878 "value" : {
879 "op" : "&",
880 "left" : {
881 "type" : "field",
882 "value" : ["standard_metadata", "egress_spec"]
883 },
884 "right" : {
885 "type" : "hexstr",
886 "value" : "0xffffffff"
887 }
888 }
889 }
890 }
891 ]
892 },
893 {
894 "op" : "count",
895 "parameters" : [
896 {
897 "type" : "counter_array",
898 "value" : "c_ingress.tx_port_counter"
899 },
900 {
901 "type" : "field",
902 "value" : ["scalars", "tmp"]
903 }
904 ],
905 "source_info" : {
906 "filename" : "mytunnel.p4",
907 "line" : 246,
908 "column" : 12,
909 "source_fragment" : "tx_port_counter.count((bit<32>) standard_metadata.egress_spec)"
910 }
911 }
912 ]
913 },
914 {
915 "name" : "act_5",
916 "id" : 15,
917 "runtime_data" : [],
918 "primitives" : [
919 {
920 "op" : "assign",
921 "parameters" : [
922 {
923 "type" : "field",
924 "value" : ["scalars", "tmp_1"]
925 },
926 {
927 "type" : "expression",
928 "value" : {
929 "type" : "expression",
930 "value" : {
931 "op" : "&",
932 "left" : {
933 "type" : "field",
934 "value" : ["standard_metadata", "ingress_port"]
935 },
936 "right" : {
937 "type" : "hexstr",
938 "value" : "0xffffffff"
939 }
940 }
941 }
942 }
943 ]
944 },
945 {
946 "op" : "count",
947 "parameters" : [
948 {
949 "type" : "counter_array",
950 "value" : "c_ingress.rx_port_counter"
951 },
952 {
953 "type" : "field",
954 "value" : ["scalars", "tmp_1"]
955 }
956 ],
957 "source_info" : {
958 "filename" : "mytunnel.p4",
959 "line" : 249,
960 "column" : 12,
961 "source_fragment" : "rx_port_counter.count((bit<32>) standard_metadata.ingress_port)"
962 }
963 }
964 ]
965 }
966 ],
967 "pipelines" : [
968 {
969 "name" : "ingress",
970 "id" : 0,
971 "source_info" : {
972 "filename" : "mytunnel.p4",
973 "line" : 134,
974 "column" : 8,
975 "source_fragment" : "c_ingress"
976 },
977 "init_table" : "tbl_act",
978 "tables" : [
979 {
980 "name" : "tbl_act",
981 "id" : 0,
982 "key" : [],
983 "match_type" : "exact",
984 "type" : "simple",
985 "max_size" : 1024,
986 "with_counters" : false,
987 "support_timeout" : false,
988 "direct_meters" : null,
989 "action_ids" : [13],
990 "actions" : ["act_3"],
991 "base_default_next" : "node_3",
992 "next_tables" : {
993 "act_3" : "node_3"
994 },
995 "default_entry" : {
996 "action_id" : 13,
997 "action_const" : true,
998 "action_data" : [],
999 "action_entry_const" : true
1000 }
1001 },
1002 {
1003 "name" : "tbl_act_0",
1004 "id" : 1,
1005 "key" : [],
1006 "match_type" : "exact",
1007 "type" : "simple",
1008 "max_size" : 1024,
1009 "with_counters" : false,
1010 "support_timeout" : false,
1011 "direct_meters" : null,
1012 "action_ids" : [9],
1013 "actions" : ["act"],
1014 "base_default_next" : "node_15",
1015 "next_tables" : {
1016 "act" : "node_15"
1017 },
1018 "default_entry" : {
1019 "action_id" : 9,
1020 "action_const" : true,
1021 "action_data" : [],
1022 "action_entry_const" : true
1023 }
1024 },
1025 {
1026 "name" : "c_ingress.t_l2_fwd",
1027 "id" : 2,
1028 "source_info" : {
1029 "filename" : "mytunnel.p4",
1030 "line" : 175,
1031 "column" : 10,
1032 "source_fragment" : "t_l2_fwd"
1033 },
1034 "key" : [
1035 {
1036 "match_type" : "ternary",
1037 "name" : "standard_metadata.ingress_port",
1038 "target" : ["standard_metadata", "ingress_port"],
1039 "mask" : null
1040 },
1041 {
1042 "match_type" : "ternary",
1043 "name" : "hdr.ethernet.dst_addr",
1044 "target" : ["ethernet", "dst_addr"],
1045 "mask" : null
1046 },
1047 {
1048 "match_type" : "ternary",
1049 "name" : "hdr.ethernet.src_addr",
1050 "target" : ["ethernet", "src_addr"],
1051 "mask" : null
1052 },
1053 {
1054 "match_type" : "ternary",
1055 "name" : "hdr.ethernet.ether_type",
1056 "target" : ["ethernet", "ether_type"],
1057 "mask" : null
1058 }
1059 ],
1060 "match_type" : "ternary",
1061 "type" : "simple",
1062 "max_size" : 1024,
1063 "with_counters" : true,
1064 "support_timeout" : false,
1065 "direct_meters" : null,
1066 "action_ids" : [2, 1, 4, 0],
1067 "actions" : ["c_ingress.set_out_port", "c_ingress.send_to_cpu", "c_ingress._drop", "NoAction"],
1068 "base_default_next" : null,
1069 "next_tables" : {
1070 "__HIT__" : "tbl_act_1",
1071 "__MISS__" : "tbl_act_2"
1072 },
1073 "default_entry" : {
1074 "action_id" : 0,
1075 "action_const" : false,
1076 "action_data" : [],
1077 "action_entry_const" : false
1078 }
1079 },
1080 {
1081 "name" : "tbl_act_1",
1082 "id" : 3,
1083 "key" : [],
1084 "match_type" : "exact",
1085 "type" : "simple",
1086 "max_size" : 1024,
1087 "with_counters" : false,
1088 "support_timeout" : false,
1089 "direct_meters" : null,
1090 "action_ids" : [10],
1091 "actions" : ["act_0"],
1092 "base_default_next" : "node_8",
1093 "next_tables" : {
1094 "act_0" : "node_8"
1095 },
1096 "default_entry" : {
1097 "action_id" : 10,
1098 "action_const" : true,
1099 "action_data" : [],
1100 "action_entry_const" : true
1101 }
1102 },
1103 {
1104 "name" : "tbl_act_2",
1105 "id" : 4,
1106 "key" : [],
1107 "match_type" : "exact",
1108 "type" : "simple",
1109 "max_size" : 1024,
1110 "with_counters" : false,
1111 "support_timeout" : false,
1112 "direct_meters" : null,
1113 "action_ids" : [11],
1114 "actions" : ["act_1"],
1115 "base_default_next" : "node_8",
1116 "next_tables" : {
1117 "act_1" : "node_8"
1118 },
1119 "default_entry" : {
1120 "action_id" : 11,
1121 "action_const" : true,
1122 "action_data" : [],
1123 "action_entry_const" : true
1124 }
1125 },
1126 {
1127 "name" : "tbl_act_3",
1128 "id" : 5,
1129 "key" : [],
1130 "match_type" : "exact",
1131 "type" : "simple",
1132 "max_size" : 1024,
1133 "with_counters" : false,
1134 "support_timeout" : false,
1135 "direct_meters" : null,
1136 "action_ids" : [12],
1137 "actions" : ["act_2"],
1138 "base_default_next" : "node_10",
1139 "next_tables" : {
1140 "act_2" : "node_10"
1141 },
1142 "default_entry" : {
1143 "action_id" : 12,
1144 "action_const" : true,
1145 "action_data" : [],
1146 "action_entry_const" : true
1147 }
1148 },
1149 {
1150 "name" : "c_ingress.t_tunnel_ingress",
1151 "id" : 6,
1152 "source_info" : {
1153 "filename" : "mytunnel.p4",
1154 "line" : 192,
1155 "column" : 10,
1156 "source_fragment" : "t_tunnel_ingress"
1157 },
1158 "key" : [
1159 {
1160 "match_type" : "lpm",
1161 "name" : "hdr.ipv4.dst_addr",
1162 "target" : ["ipv4", "dst_addr"],
1163 "mask" : null
1164 }
1165 ],
1166 "match_type" : "lpm",
1167 "type" : "simple",
1168 "max_size" : 1024,
1169 "with_counters" : false,
1170 "support_timeout" : false,
1171 "direct_meters" : null,
1172 "action_ids" : [7, 5],
1173 "actions" : ["c_ingress.my_tunnel_ingress", "c_ingress._drop"],
1174 "base_default_next" : "node_13",
1175 "next_tables" : {
1176 "c_ingress.my_tunnel_ingress" : "node_13",
1177 "c_ingress._drop" : "node_13"
1178 },
1179 "default_entry" : {
1180 "action_id" : 5,
1181 "action_const" : false,
1182 "action_data" : [],
1183 "action_entry_const" : false
1184 }
1185 },
1186 {
1187 "name" : "c_ingress.t_tunnel_fwd",
1188 "id" : 7,
1189 "source_info" : {
1190 "filename" : "mytunnel.p4",
1191 "line" : 203,
1192 "column" : 10,
1193 "source_fragment" : "t_tunnel_fwd"
1194 },
1195 "key" : [
1196 {
1197 "match_type" : "exact",
1198 "name" : "hdr.my_tunnel.tun_id",
1199 "target" : ["my_tunnel", "tun_id"],
1200 "mask" : null
1201 }
1202 ],
1203 "match_type" : "exact",
1204 "type" : "simple",
1205 "max_size" : 1024,
1206 "with_counters" : false,
1207 "support_timeout" : false,
1208 "direct_meters" : null,
1209 "action_ids" : [3, 8, 6],
1210 "actions" : ["c_ingress.set_out_port", "c_ingress.my_tunnel_egress", "c_ingress._drop"],
1211 "base_default_next" : "node_15",
1212 "next_tables" : {
1213 "c_ingress.set_out_port" : "node_15",
1214 "c_ingress.my_tunnel_egress" : "node_15",
1215 "c_ingress._drop" : "node_15"
1216 },
1217 "default_entry" : {
1218 "action_id" : 6,
1219 "action_const" : false,
1220 "action_data" : [],
1221 "action_entry_const" : false
1222 }
1223 },
1224 {
1225 "name" : "tbl_act_4",
1226 "id" : 8,
1227 "key" : [],
1228 "match_type" : "exact",
1229 "type" : "simple",
1230 "max_size" : 1024,
1231 "with_counters" : false,
1232 "support_timeout" : false,
1233 "direct_meters" : null,
1234 "action_ids" : [14],
1235 "actions" : ["act_4"],
1236 "base_default_next" : "node_18",
1237 "next_tables" : {
1238 "act_4" : "node_18"
1239 },
1240 "default_entry" : {
1241 "action_id" : 14,
1242 "action_const" : true,
1243 "action_data" : [],
1244 "action_entry_const" : true
1245 }
1246 },
1247 {
1248 "name" : "tbl_act_5",
1249 "id" : 9,
1250 "key" : [],
1251 "match_type" : "exact",
1252 "type" : "simple",
1253 "max_size" : 1024,
1254 "with_counters" : false,
1255 "support_timeout" : false,
1256 "direct_meters" : null,
1257 "action_ids" : [15],
1258 "actions" : ["act_5"],
1259 "base_default_next" : null,
1260 "next_tables" : {
1261 "act_5" : null
1262 },
1263 "default_entry" : {
1264 "action_id" : 15,
1265 "action_const" : true,
1266 "action_data" : [],
1267 "action_entry_const" : true
1268 }
1269 }
1270 ],
1271 "action_profiles" : [],
1272 "conditionals" : [
1273 {
1274 "name" : "node_3",
1275 "id" : 0,
1276 "source_info" : {
1277 "filename" : "mytunnel.p4",
1278 "line" : 217,
1279 "column" : 12,
1280 "source_fragment" : "standard_metadata.ingress_port == CPU_PORT"
1281 },
1282 "expression" : {
1283 "type" : "expression",
1284 "value" : {
1285 "op" : "==",
1286 "left" : {
1287 "type" : "field",
1288 "value" : ["standard_metadata", "ingress_port"]
1289 },
1290 "right" : {
1291 "type" : "hexstr",
1292 "value" : "0x00ff"
1293 }
1294 }
1295 },
1296 "true_next" : "tbl_act_0",
1297 "false_next" : "c_ingress.t_l2_fwd"
1298 },
1299 {
1300 "name" : "node_8",
1301 "id" : 1,
1302 "expression" : {
1303 "type" : "expression",
1304 "value" : {
1305 "op" : "d2b",
1306 "left" : null,
1307 "right" : {
1308 "type" : "field",
1309 "value" : ["scalars", "tmp_0"]
1310 }
1311 }
1312 },
1313 "true_next" : "tbl_act_3",
1314 "false_next" : "node_10"
1315 },
1316 {
1317 "name" : "node_10",
1318 "id" : 2,
1319 "expression" : {
1320 "type" : "expression",
1321 "value" : {
1322 "op" : "not",
1323 "left" : null,
1324 "right" : {
1325 "type" : "expression",
1326 "value" : {
1327 "op" : "d2b",
1328 "left" : null,
1329 "right" : {
1330 "type" : "field",
1331 "value" : ["scalars", "hasReturned_0"]
1332 }
1333 }
1334 }
1335 }
1336 },
1337 "true_next" : "node_11",
1338 "false_next" : "node_15"
1339 },
1340 {
1341 "name" : "node_11",
1342 "id" : 3,
1343 "source_info" : {
1344 "filename" : "mytunnel.p4",
1345 "line" : 233,
1346 "column" : 16,
1347 "source_fragment" : "hdr.ipv4.isValid() && !hdr.my_tunnel.isValid()"
1348 },
1349 "expression" : {
1350 "type" : "expression",
1351 "value" : {
1352 "op" : "and",
1353 "left" : {
1354 "type" : "expression",
1355 "value" : {
1356 "op" : "d2b",
1357 "left" : null,
1358 "right" : {
1359 "type" : "field",
1360 "value" : ["ipv4", "$valid$"]
1361 }
1362 }
1363 },
1364 "right" : {
1365 "type" : "expression",
1366 "value" : {
1367 "op" : "not",
1368 "left" : null,
1369 "right" : {
1370 "type" : "expression",
1371 "value" : {
1372 "op" : "d2b",
1373 "left" : null,
1374 "right" : {
1375 "type" : "field",
1376 "value" : ["my_tunnel", "$valid$"]
1377 }
1378 }
1379 }
1380 }
1381 }
1382 }
1383 },
1384 "true_next" : "c_ingress.t_tunnel_ingress",
1385 "false_next" : "node_13"
1386 },
1387 {
1388 "name" : "node_13",
1389 "id" : 4,
1390 "source_info" : {
1391 "filename" : "mytunnel.p4",
1392 "line" : 238,
1393 "column" : 16,
1394 "source_fragment" : "hdr.my_tunnel.isValid()"
1395 },
1396 "expression" : {
1397 "type" : "expression",
1398 "value" : {
1399 "op" : "d2b",
1400 "left" : null,
1401 "right" : {
1402 "type" : "field",
1403 "value" : ["my_tunnel", "$valid$"]
1404 }
1405 }
1406 },
1407 "true_next" : "c_ingress.t_tunnel_fwd",
1408 "false_next" : "node_15"
1409 },
1410 {
1411 "name" : "node_15",
1412 "id" : 5,
1413 "expression" : {
1414 "type" : "expression",
1415 "value" : {
1416 "op" : "not",
1417 "left" : null,
1418 "right" : {
1419 "type" : "expression",
1420 "value" : {
1421 "op" : "d2b",
1422 "left" : null,
1423 "right" : {
1424 "type" : "field",
1425 "value" : ["scalars", "hasReturned_0"]
1426 }
1427 }
1428 }
1429 }
1430 },
1431 "false_next" : null,
1432 "true_next" : "node_16"
1433 },
1434 {
1435 "name" : "node_16",
1436 "id" : 6,
1437 "source_info" : {
1438 "filename" : "mytunnel.p4",
1439 "line" : 245,
1440 "column" : 12,
1441 "source_fragment" : "standard_metadata.egress_spec < 255"
1442 },
1443 "expression" : {
1444 "type" : "expression",
1445 "value" : {
1446 "op" : "<",
1447 "left" : {
1448 "type" : "field",
1449 "value" : ["standard_metadata", "egress_spec"]
1450 },
1451 "right" : {
1452 "type" : "hexstr",
1453 "value" : "0x00ff"
1454 }
1455 }
1456 },
1457 "true_next" : "tbl_act_4",
1458 "false_next" : "node_18"
1459 },
1460 {
1461 "name" : "node_18",
1462 "id" : 7,
1463 "source_info" : {
1464 "filename" : "mytunnel.p4",
1465 "line" : 248,
1466 "column" : 12,
1467 "source_fragment" : "standard_metadata.ingress_port < 255"
1468 },
1469 "expression" : {
1470 "type" : "expression",
1471 "value" : {
1472 "op" : "<",
1473 "left" : {
1474 "type" : "field",
1475 "value" : ["standard_metadata", "ingress_port"]
1476 },
1477 "right" : {
1478 "type" : "hexstr",
1479 "value" : "0x00ff"
1480 }
1481 }
1482 },
1483 "false_next" : null,
1484 "true_next" : "tbl_act_5"
1485 }
1486 ]
1487 },
1488 {
1489 "name" : "egress",
1490 "id" : 1,
1491 "source_info" : {
1492 "filename" : "mytunnel.p4",
1493 "line" : 258,
1494 "column" : 8,
1495 "source_fragment" : "c_egress"
1496 },
1497 "init_table" : null,
1498 "tables" : [],
1499 "action_profiles" : [],
1500 "conditionals" : []
1501 }
1502 ],
1503 "checksums" : [],
1504 "force_arith" : [],
1505 "extern_instances" : [],
1506 "field_aliases" : [
1507 [
1508 "queueing_metadata.enq_timestamp",
1509 ["standard_metadata", "enq_timestamp"]
1510 ],
1511 [
1512 "queueing_metadata.enq_qdepth",
1513 ["standard_metadata", "enq_qdepth"]
1514 ],
1515 [
1516 "queueing_metadata.deq_timedelta",
1517 ["standard_metadata", "deq_timedelta"]
1518 ],
1519 [
1520 "queueing_metadata.deq_qdepth",
1521 ["standard_metadata", "deq_qdepth"]
1522 ],
1523 [
1524 "intrinsic_metadata.ingress_global_timestamp",
1525 ["standard_metadata", "ingress_global_timestamp"]
1526 ],
1527 [
1528 "intrinsic_metadata.egress_global_timestamp",
1529 ["standard_metadata", "egress_global_timestamp"]
1530 ],
1531 [
1532 "intrinsic_metadata.lf_field_list",
1533 ["standard_metadata", "lf_field_list"]
1534 ],
1535 [
1536 "intrinsic_metadata.mcast_grp",
1537 ["standard_metadata", "mcast_grp"]
1538 ],
1539 [
1540 "intrinsic_metadata.resubmit_flag",
1541 ["standard_metadata", "resubmit_flag"]
1542 ],
1543 [
1544 "intrinsic_metadata.egress_rid",
1545 ["standard_metadata", "egress_rid"]
1546 ],
1547 [
1548 "intrinsic_metadata.recirculate_flag",
1549 ["standard_metadata", "recirculate_flag"]
1550 ]
1551 ]
1552}