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