blob: 053728cd37d49d1fa9272cf0607fe2fc7787257e [file] [log] [blame]
Carmelo Casconef1d0a422017-09-07 17:21:46 +02001{
2 "program" : "ecmp.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" : [
Carmelo Cascone6230a612017-09-13 03:25:41 +020012 ["tmp", 32, false],
13 ["tmp_0", 32, false]
Carmelo Casconef1d0a422017-09-07 17:21:46 +020014 ]
15 },
16 {
17 "name" : "ethernet_t",
18 "id" : 1,
19 "fields" : [
20 ["dstAddr", 48, false],
21 ["srcAddr", 48, false],
22 ["etherType", 16, false]
23 ]
24 },
25 {
26 "name" : "ipv4_t",
27 "id" : 2,
28 "fields" : [
29 ["version", 4, false],
30 ["ihl", 4, false],
31 ["diffserv", 8, false],
32 ["totalLen", 16, false],
33 ["identification", 16, false],
34 ["flags", 3, false],
35 ["fragOffset", 13, false],
36 ["ttl", 8, false],
37 ["protocol", 8, false],
38 ["hdrChecksum", 16, false],
39 ["srcAddr", 32, false],
40 ["dstAddr", 32, false]
41 ]
42 },
43 {
44 "name" : "packet_in_t",
45 "id" : 3,
46 "fields" : [
47 ["ingress_port", 9, false],
48 ["_padding", 7, false]
49 ]
50 },
51 {
52 "name" : "packet_out_t",
53 "id" : 4,
54 "fields" : [
55 ["egress_port", 9, false],
56 ["_padding_0", 7, false]
57 ]
58 },
59 {
60 "name" : "tcp_t",
61 "id" : 5,
62 "fields" : [
63 ["srcPort", 16, false],
64 ["dstPort", 16, false],
65 ["seqNo", 32, false],
66 ["ackNo", 32, false],
67 ["dataOffset", 4, false],
68 ["res", 3, false],
69 ["ecn", 3, false],
70 ["ctrl", 6, false],
71 ["window", 16, false],
72 ["checksum", 16, false],
73 ["urgentPtr", 16, false]
74 ]
75 },
76 {
77 "name" : "udp_t",
78 "id" : 6,
79 "fields" : [
80 ["srcPort", 16, false],
81 ["dstPort", 16, false],
82 ["length_", 16, false],
83 ["checksum", 16, false]
84 ]
85 },
86 {
87 "name" : "ecmp_metadata_t",
88 "id" : 7,
89 "fields" : [
Carmelo Cascone8aa05482017-09-12 13:21:59 +020090 ["group_id", 16, false],
Carmelo Casconef1d0a422017-09-07 17:21:46 +020091 ["selector", 16, false]
92 ]
93 },
94 {
95 "name" : "ig_intr_md",
96 "id" : 8,
97 "fields" : [
98 ["ingress_port", 9, false],
99 ["egress_spec", 9, false],
100 ["egress_port", 9, false],
101 ["clone_spec", 32, false],
102 ["instance_type", 32, false],
103 ["drop", 1, false],
104 ["recirculate_port", 16, false],
105 ["packet_length", 32, false],
106 ["enq_timestamp", 32, false],
107 ["enq_qdepth", 19, false],
108 ["deq_timedelta", 32, false],
109 ["deq_qdepth", 19, false],
110 ["ingress_global_timestamp", 48, false],
111 ["lf_field_list", 32, false],
112 ["mcast_grp", 16, false],
113 ["resubmit_flag", 1, false],
114 ["egress_rid", 16, false],
115 ["_padding_1", 5, false]
116 ]
117 }
118 ],
119 "headers" : [
120 {
121 "name" : "scalars",
122 "id" : 0,
123 "header_type" : "scalars_0",
124 "metadata" : true,
125 "pi_omit" : true
126 },
127 {
128 "name" : "ig_intr_md",
129 "id" : 1,
130 "header_type" : "ig_intr_md",
131 "metadata" : true,
132 "pi_omit" : true
133 },
134 {
135 "name" : "ethernet",
136 "id" : 2,
137 "header_type" : "ethernet_t",
138 "metadata" : false,
139 "pi_omit" : true
140 },
141 {
142 "name" : "ipv4",
143 "id" : 3,
144 "header_type" : "ipv4_t",
145 "metadata" : false,
146 "pi_omit" : true
147 },
148 {
149 "name" : "packet_in_hdr",
150 "id" : 4,
151 "header_type" : "packet_in_t",
152 "metadata" : false,
153 "pi_omit" : true
154 },
155 {
156 "name" : "packet_out_hdr",
157 "id" : 5,
158 "header_type" : "packet_out_t",
159 "metadata" : false,
160 "pi_omit" : true
161 },
162 {
163 "name" : "tcp",
164 "id" : 6,
165 "header_type" : "tcp_t",
166 "metadata" : false,
167 "pi_omit" : true
168 },
169 {
170 "name" : "udp",
171 "id" : 7,
172 "header_type" : "udp_t",
173 "metadata" : false,
174 "pi_omit" : true
175 },
176 {
177 "name" : "ecmp_metadata",
178 "id" : 8,
179 "header_type" : "ecmp_metadata_t",
180 "metadata" : true,
181 "pi_omit" : true
182 }
183 ],
184 "header_stacks" : [],
185 "header_union_types" : [],
186 "header_unions" : [],
187 "header_union_stacks" : [],
188 "field_lists" : [],
189 "errors" : [
190 ["NoError", 1],
191 ["PacketTooShort", 2],
192 ["NoMatch", 3],
193 ["StackOutOfBounds", 4],
194 ["HeaderTooShort", 5],
195 ["ParserTimeout", 6]
196 ],
197 "enums" : [],
198 "parsers" : [
199 {
200 "name" : "parser",
201 "id" : 0,
202 "init_state" : "start",
203 "parse_states" : [
204 {
205 "name" : "default_parser",
206 "id" : 0,
207 "parser_ops" : [],
208 "transitions" : [
209 {
Carmelo Cascone6230a612017-09-13 03:25:41 +0200210 "value" : "0x00ff",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200211 "mask" : null,
212 "next_state" : "parse_pkt_out"
213 },
214 {
215 "value" : "default",
216 "mask" : null,
217 "next_state" : "parse_ethernet"
218 }
219 ],
220 "transition_key" : [
221 {
222 "type" : "field",
223 "value" : ["ig_intr_md", "ingress_port"]
224 }
225 ]
226 },
227 {
228 "name" : "parse_ethernet",
229 "id" : 1,
230 "parser_ops" : [
231 {
232 "parameters" : [
233 {
234 "type" : "regular",
235 "value" : "ethernet"
236 }
237 ],
238 "op" : "extract"
239 }
240 ],
241 "transitions" : [
242 {
243 "value" : "0x0800",
244 "mask" : null,
245 "next_state" : "parse_ipv4"
246 },
247 {
248 "value" : "default",
249 "mask" : null,
250 "next_state" : null
251 }
252 ],
253 "transition_key" : [
254 {
255 "type" : "field",
256 "value" : ["ethernet", "etherType"]
257 }
258 ]
259 },
260 {
261 "name" : "parse_ipv4",
262 "id" : 2,
263 "parser_ops" : [
264 {
265 "parameters" : [
266 {
267 "type" : "regular",
268 "value" : "ipv4"
269 }
270 ],
271 "op" : "extract"
272 }
273 ],
274 "transitions" : [
275 {
276 "value" : "0x000006",
277 "mask" : null,
278 "next_state" : "parse_tcp"
279 },
280 {
281 "value" : "0x000011",
282 "mask" : null,
283 "next_state" : "parse_udp"
284 },
285 {
286 "value" : "default",
287 "mask" : null,
288 "next_state" : null
289 }
290 ],
291 "transition_key" : [
292 {
293 "type" : "field",
294 "value" : ["ipv4", "fragOffset"]
295 },
296 {
297 "type" : "field",
298 "value" : ["ipv4", "protocol"]
299 }
300 ]
301 },
302 {
303 "name" : "parse_pkt_in",
304 "id" : 3,
305 "parser_ops" : [
306 {
307 "parameters" : [
308 {
309 "type" : "regular",
310 "value" : "packet_in_hdr"
311 }
312 ],
313 "op" : "extract"
314 }
315 ],
316 "transitions" : [
317 {
318 "value" : "default",
319 "mask" : null,
320 "next_state" : "parse_ethernet"
321 }
322 ],
323 "transition_key" : []
324 },
325 {
326 "name" : "parse_pkt_out",
327 "id" : 4,
328 "parser_ops" : [
329 {
330 "parameters" : [
331 {
332 "type" : "regular",
333 "value" : "packet_out_hdr"
334 }
335 ],
336 "op" : "extract"
337 }
338 ],
339 "transitions" : [
340 {
341 "value" : "default",
342 "mask" : null,
343 "next_state" : "parse_ethernet"
344 }
345 ],
346 "transition_key" : []
347 },
348 {
349 "name" : "parse_tcp",
350 "id" : 5,
351 "parser_ops" : [
352 {
353 "parameters" : [
354 {
355 "type" : "regular",
356 "value" : "tcp"
357 }
358 ],
359 "op" : "extract"
360 }
361 ],
362 "transitions" : [
363 {
364 "value" : "default",
365 "mask" : null,
366 "next_state" : null
367 }
368 ],
369 "transition_key" : []
370 },
371 {
372 "name" : "parse_udp",
373 "id" : 6,
374 "parser_ops" : [
375 {
376 "parameters" : [
377 {
378 "type" : "regular",
379 "value" : "udp"
380 }
381 ],
382 "op" : "extract"
383 }
384 ],
385 "transitions" : [
386 {
387 "value" : "default",
388 "mask" : null,
389 "next_state" : null
390 }
391 ],
392 "transition_key" : []
393 },
394 {
395 "name" : "start",
396 "id" : 7,
Carmelo Cascone6230a612017-09-13 03:25:41 +0200397 "parser_ops" : [],
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200398 "transitions" : [
399 {
Carmelo Cascone6230a612017-09-13 03:25:41 +0200400 "value" : "0x00ff",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200401 "mask" : null,
402 "next_state" : "parse_pkt_in"
403 },
404 {
405 "value" : "default",
406 "mask" : null,
407 "next_state" : "default_parser"
408 }
409 ],
410 "transition_key" : [
411 {
412 "type" : "field",
Carmelo Cascone6230a612017-09-13 03:25:41 +0200413 "value" : ["ig_intr_md", "egress_spec"]
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200414 }
415 ]
416 }
417 ]
418 }
419 ],
420 "deparsers" : [
421 {
422 "name" : "deparser",
423 "id" : 0,
424 "order" : ["packet_out_hdr", "packet_in_hdr", "ethernet", "ipv4", "udp", "tcp"]
425 }
426 ],
427 "meter_arrays" : [],
428 "counter_arrays" : [
429 {
430 "name" : "table0_counter",
431 "id" : 0,
432 "is_direct" : true,
433 "binding" : "table0"
434 },
435 {
436 "name" : "ecmp_group_table_counter",
437 "id" : 1,
438 "is_direct" : true,
439 "binding" : "ecmp_group_table"
440 },
441 {
442 "name" : "egress_port_counter",
443 "id" : 2,
444 "size" : 254,
445 "is_direct" : false
446 },
447 {
448 "name" : "ingress_port_counter",
449 "id" : 3,
450 "size" : 254,
451 "is_direct" : false
452 }
453 ],
454 "register_arrays" : [],
455 "calculations" : [
456 {
457 "name" : "calc",
458 "id" : 0,
Carmelo Cascone6230a612017-09-13 03:25:41 +0200459 "algo" : "crc16",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200460 "input" : [
461 {
462 "type" : "field",
463 "value" : ["ipv4", "srcAddr"]
464 },
465 {
466 "type" : "field",
467 "value" : ["ipv4", "dstAddr"]
468 },
469 {
470 "type" : "field",
Carmelo Cascone0ce8f5d2017-09-13 03:50:36 +0200471 "value" : ["tcp", "srcPort"]
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200472 },
473 {
474 "type" : "field",
Carmelo Cascone0ce8f5d2017-09-13 03:50:36 +0200475 "value" : ["tcp", "dstPort"]
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200476 }
477 ]
478 }
479 ],
480 "learn_lists" : [],
481 "actions" : [
482 {
Brian O'Connora6862e02017-09-08 01:17:39 -0700483 "name" : "NoAction",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200484 "id" : 0,
485 "runtime_data" : [],
Brian O'Connora6862e02017-09-08 01:17:39 -0700486 "primitives" : []
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200487 },
488 {
489 "name" : "NoAction",
490 "id" : 1,
491 "runtime_data" : [],
492 "primitives" : []
493 },
494 {
Brian O'Connora6862e02017-09-08 01:17:39 -0700495 "name" : "set_egress_port",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200496 "id" : 2,
Brian O'Connora6862e02017-09-08 01:17:39 -0700497 "runtime_data" : [
498 {
499 "name" : "port",
500 "bitwidth" : 9
501 }
502 ],
503 "primitives" : [
504 {
505 "op" : "assign",
506 "parameters" : [
507 {
508 "type" : "field",
509 "value" : ["ig_intr_md", "egress_spec"]
510 },
511 {
512 "type" : "runtime_data",
513 "value" : 0
514 }
515 ],
516 "source_info" : {
517 "filename" : "include/actions.p4",
518 "line" : 5,
519 "column" : 23,
520 "source_fragment" : "port) { ..."
521 }
522 }
523 ]
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200524 },
525 {
526 "name" : "set_egress_port",
527 "id" : 3,
528 "runtime_data" : [
529 {
530 "name" : "port",
531 "bitwidth" : 9
532 }
533 ],
534 "primitives" : [
535 {
536 "op" : "assign",
537 "parameters" : [
538 {
539 "type" : "field",
540 "value" : ["ig_intr_md", "egress_spec"]
541 },
542 {
543 "type" : "runtime_data",
544 "value" : 0
545 }
546 ],
547 "source_info" : {
548 "filename" : "include/actions.p4",
549 "line" : 5,
550 "column" : 23,
551 "source_fragment" : "port) { ..."
552 }
553 }
554 ]
555 },
556 {
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200557 "name" : "ecmp_group",
Brian O'Connora6862e02017-09-08 01:17:39 -0700558 "id" : 4,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200559 "runtime_data" : [
560 {
Carmelo Cascone8aa05482017-09-12 13:21:59 +0200561 "name" : "group_id",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200562 "bitwidth" : 16
563 }
564 ],
565 "primitives" : [
566 {
567 "op" : "assign",
568 "parameters" : [
569 {
570 "type" : "field",
Carmelo Cascone8aa05482017-09-12 13:21:59 +0200571 "value" : ["ecmp_metadata", "group_id"]
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200572 },
573 {
574 "type" : "runtime_data",
575 "value" : 0
576 }
577 ],
578 "source_info" : {
579 "filename" : "ecmp.p4",
580 "line" : 39,
581 "column" : 18,
Carmelo Cascone8aa05482017-09-12 13:21:59 +0200582 "source_fragment" : "group_id) { ..."
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200583 }
584 },
585 {
586 "op" : "modify_field_with_hash_based_offset",
587 "parameters" : [
588 {
589 "type" : "field",
590 "value" : ["ecmp_metadata", "selector"]
591 },
592 {
593 "type" : "hexstr",
Carmelo Cascone6230a612017-09-13 03:25:41 +0200594 "value" : "0x0000"
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200595 },
596 {
597 "type" : "calculation",
598 "value" : "calc"
599 },
600 {
601 "type" : "hexstr",
Carmelo Cascone6230a612017-09-13 03:25:41 +0200602 "value" : "0x00000002"
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200603 }
604 ],
605 "source_info" : {
606 "filename" : "ecmp.p4",
607 "line" : 41,
608 "column" : 4,
609 "source_fragment" : "modify_field_with_hash_based_offset(ecmp_metadata.selector, 0, ecmp_hash, 2)"
610 }
611 }
612 ]
613 },
614 {
615 "name" : "send_to_cpu",
Brian O'Connora6862e02017-09-08 01:17:39 -0700616 "id" : 5,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200617 "runtime_data" : [],
618 "primitives" : [
619 {
620 "op" : "assign",
621 "parameters" : [
622 {
623 "type" : "field",
624 "value" : ["ig_intr_md", "egress_spec"]
625 },
626 {
627 "type" : "hexstr",
628 "value" : "0x00ff"
629 }
630 ],
631 "source_info" : {
632 "filename" : "include/actions.p4",
Brian O'Connora6862e02017-09-08 01:17:39 -0700633 "line" : 18,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200634 "column" : 4,
635 "source_fragment" : "modify_field(ig_intr_md.egress_spec, 255)"
636 }
Brian O'Connora6862e02017-09-08 01:17:39 -0700637 },
638 {
639 "op" : "add_header",
640 "parameters" : [
641 {
642 "type" : "header",
643 "value" : "packet_in_hdr"
644 }
645 ],
646 "source_info" : {
647 "filename" : "include/actions.p4",
648 "line" : 19,
649 "column" : 4,
650 "source_fragment" : "add_header(packet_in_hdr)"
651 }
652 },
653 {
654 "op" : "assign",
655 "parameters" : [
656 {
657 "type" : "field",
658 "value" : ["packet_in_hdr", "ingress_port"]
659 },
660 {
661 "type" : "field",
662 "value" : ["ig_intr_md", "ingress_port"]
663 }
664 ],
665 "source_info" : {
666 "filename" : "include/actions.p4",
667 "line" : 20,
668 "column" : 4,
669 "source_fragment" : "modify_field(packet_in_hdr.ingress_port, ig_intr_md.ingress_port)"
670 }
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200671 }
672 ]
673 },
674 {
675 "name" : "_drop",
Brian O'Connora6862e02017-09-08 01:17:39 -0700676 "id" : 6,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200677 "runtime_data" : [],
678 "primitives" : [
679 {
680 "op" : "assign",
681 "parameters" : [
682 {
683 "type" : "field",
684 "value" : ["ig_intr_md", "egress_spec"]
685 },
686 {
687 "type" : "hexstr",
688 "value" : "0x01ff"
689 }
690 ],
691 "source_info" : {
692 "filename" : "include/actions.p4",
693 "line" : 13,
694 "column" : 4,
695 "source_fragment" : "modify_field(ig_intr_md.egress_spec, 511)"
696 }
697 }
698 ]
699 },
700 {
Brian O'Connora6862e02017-09-08 01:17:39 -0700701 "name" : "_process_packet_out",
702 "id" : 7,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200703 "runtime_data" : [],
704 "primitives" : [
705 {
706 "op" : "assign",
707 "parameters" : [
708 {
709 "type" : "field",
710 "value" : ["ig_intr_md", "egress_spec"]
711 },
712 {
713 "type" : "field",
714 "value" : ["packet_out_hdr", "egress_port"]
715 }
716 ],
717 "source_info" : {
718 "filename" : "include/packet_io.p4",
719 "line" : 7,
720 "column" : 4,
721 "source_fragment" : "modify_field(ig_intr_md.egress_spec, packet_out_hdr.egress_port)"
722 }
723 },
724 {
725 "op" : "remove_header",
726 "parameters" : [
727 {
728 "type" : "header",
729 "value" : "packet_out_hdr"
730 }
731 ],
732 "source_info" : {
733 "filename" : "include/packet_io.p4",
734 "line" : 8,
735 "column" : 4,
736 "source_fragment" : "remove_header(packet_out_hdr)"
737 }
738 }
739 ]
740 },
741 {
742 "name" : "count_egress",
Brian O'Connora6862e02017-09-08 01:17:39 -0700743 "id" : 8,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200744 "runtime_data" : [],
745 "primitives" : [
746 {
747 "op" : "assign",
748 "parameters" : [
749 {
750 "type" : "field",
Carmelo Cascone6230a612017-09-13 03:25:41 +0200751 "value" : ["scalars", "tmp"]
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200752 },
753 {
754 "type" : "expression",
755 "value" : {
756 "type" : "expression",
757 "value" : {
758 "op" : "&",
759 "left" : {
760 "type" : "field",
761 "value" : ["ig_intr_md", "egress_spec"]
762 },
763 "right" : {
764 "type" : "hexstr",
765 "value" : "0xffffffff"
766 }
767 }
768 }
769 }
770 ]
771 },
772 {
773 "op" : "count",
774 "parameters" : [
775 {
776 "type" : "counter_array",
777 "value" : "egress_port_counter"
778 },
779 {
780 "type" : "field",
Carmelo Cascone6230a612017-09-13 03:25:41 +0200781 "value" : ["scalars", "tmp"]
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200782 }
783 ],
784 "source_info" : {
785 "filename" : "include/port_counters.p4",
786 "line" : 22,
787 "column" : 4,
788 "source_fragment" : "count(egress_port_counter, ig_intr_md.egress_spec)"
789 }
790 }
791 ]
792 },
793 {
794 "name" : "count_ingress",
Brian O'Connora6862e02017-09-08 01:17:39 -0700795 "id" : 9,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200796 "runtime_data" : [],
797 "primitives" : [
798 {
799 "op" : "assign",
800 "parameters" : [
801 {
802 "type" : "field",
Carmelo Cascone6230a612017-09-13 03:25:41 +0200803 "value" : ["scalars", "tmp_0"]
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200804 },
805 {
806 "type" : "expression",
807 "value" : {
808 "type" : "expression",
809 "value" : {
810 "op" : "&",
811 "left" : {
812 "type" : "field",
813 "value" : ["ig_intr_md", "ingress_port"]
814 },
815 "right" : {
816 "type" : "hexstr",
817 "value" : "0xffffffff"
818 }
819 }
820 }
821 }
822 ]
823 },
824 {
825 "op" : "count",
826 "parameters" : [
827 {
828 "type" : "counter_array",
829 "value" : "ingress_port_counter"
830 },
831 {
832 "type" : "field",
Carmelo Cascone6230a612017-09-13 03:25:41 +0200833 "value" : ["scalars", "tmp_0"]
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200834 }
835 ],
836 "source_info" : {
837 "filename" : "include/port_counters.p4",
838 "line" : 18,
839 "column" : 4,
840 "source_fragment" : "count(ingress_port_counter, ig_intr_md.ingress_port)"
841 }
842 }
843 ]
844 }
845 ],
846 "pipelines" : [
847 {
848 "name" : "ingress",
849 "id" : 0,
850 "init_table" : "node_2",
851 "tables" : [
852 {
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200853 "name" : "table0",
Brian O'Connora6862e02017-09-08 01:17:39 -0700854 "id" : 0,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200855 "source_info" : {
856 "filename" : "ecmp.p4",
857 "line" : 47,
858 "column" : 0,
859 "source_fragment" : "table table0 { ..."
860 },
861 "key" : [
862 {
863 "match_type" : "ternary",
864 "target" : ["ig_intr_md", "ingress_port"],
865 "mask" : null
866 },
867 {
868 "match_type" : "ternary",
869 "target" : ["ethernet", "dstAddr"],
870 "mask" : null
871 },
872 {
873 "match_type" : "ternary",
874 "target" : ["ethernet", "srcAddr"],
875 "mask" : null
876 },
877 {
878 "match_type" : "ternary",
879 "target" : ["ethernet", "etherType"],
880 "mask" : null
881 }
882 ],
883 "match_type" : "ternary",
884 "type" : "simple",
885 "max_size" : 1024,
886 "with_counters" : true,
887 "support_timeout" : false,
888 "direct_meters" : null,
Brian O'Connora6862e02017-09-08 01:17:39 -0700889 "action_ids" : [3, 4, 5, 6, 1],
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200890 "actions" : ["set_egress_port", "ecmp_group", "send_to_cpu", "_drop", "NoAction"],
Brian O'Connora6862e02017-09-08 01:17:39 -0700891 "base_default_next" : "node_5",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200892 "next_tables" : {
893 "ecmp_group" : "ecmp_group_table",
Brian O'Connora6862e02017-09-08 01:17:39 -0700894 "set_egress_port" : "node_5",
895 "send_to_cpu" : "node_5",
896 "_drop" : "node_5",
897 "NoAction" : "node_5"
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200898 },
899 "default_entry" : {
Brian O'Connora6862e02017-09-08 01:17:39 -0700900 "action_id" : 1,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200901 "action_const" : false,
902 "action_data" : [],
903 "action_entry_const" : false
904 }
905 },
906 {
907 "name" : "ecmp_group_table",
Brian O'Connora6862e02017-09-08 01:17:39 -0700908 "id" : 1,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200909 "source_info" : {
910 "filename" : "ecmp.p4",
911 "line" : 63,
912 "column" : 0,
913 "source_fragment" : "table ecmp_group_table { ..."
914 },
915 "key" : [
916 {
917 "match_type" : "exact",
Carmelo Cascone8aa05482017-09-12 13:21:59 +0200918 "target" : ["ecmp_metadata", "group_id"],
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200919 "mask" : null
920 },
921 {
922 "match_type" : "exact",
923 "target" : ["ecmp_metadata", "selector"],
924 "mask" : null
925 }
926 ],
927 "match_type" : "exact",
928 "type" : "simple",
929 "max_size" : 1024,
930 "with_counters" : true,
931 "support_timeout" : false,
932 "direct_meters" : null,
Brian O'Connora6862e02017-09-08 01:17:39 -0700933 "action_ids" : [2, 0],
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200934 "actions" : ["set_egress_port", "NoAction"],
Brian O'Connora6862e02017-09-08 01:17:39 -0700935 "base_default_next" : "node_5",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200936 "next_tables" : {
Brian O'Connora6862e02017-09-08 01:17:39 -0700937 "set_egress_port" : "node_5",
938 "NoAction" : "node_5"
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200939 },
940 "default_entry" : {
Brian O'Connora6862e02017-09-08 01:17:39 -0700941 "action_id" : 0,
942 "action_const" : false,
943 "action_data" : [],
944 "action_entry_const" : false
945 }
946 },
947 {
948 "name" : "process_packet_out_table",
949 "id" : 2,
950 "source_info" : {
951 "filename" : "include/packet_io.p4",
952 "line" : 11,
953 "column" : 0,
954 "source_fragment" : "table process_packet_out_table { ..."
955 },
956 "key" : [],
957 "match_type" : "exact",
958 "type" : "simple",
959 "max_size" : 1024,
960 "with_counters" : false,
961 "support_timeout" : false,
962 "direct_meters" : null,
963 "action_ids" : [7],
964 "actions" : ["_process_packet_out"],
965 "base_default_next" : "node_7",
966 "next_tables" : {
967 "_process_packet_out" : "node_7"
968 },
969 "default_entry" : {
970 "action_id" : 7,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200971 "action_const" : false,
972 "action_data" : [],
973 "action_entry_const" : false
974 }
975 },
976 {
977 "name" : "ingress_port_count_table",
978 "id" : 3,
979 "source_info" : {
980 "filename" : "include/port_counters.p4",
981 "line" : 25,
982 "column" : 0,
983 "source_fragment" : "table ingress_port_count_table { ..."
984 },
985 "key" : [],
986 "match_type" : "exact",
987 "type" : "simple",
988 "max_size" : 1024,
989 "with_counters" : false,
990 "support_timeout" : false,
991 "direct_meters" : null,
Brian O'Connora6862e02017-09-08 01:17:39 -0700992 "action_ids" : [9],
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200993 "actions" : ["count_ingress"],
994 "base_default_next" : "egress_port_count_table",
995 "next_tables" : {
996 "count_ingress" : "egress_port_count_table"
997 },
998 "default_entry" : {
Brian O'Connora6862e02017-09-08 01:17:39 -0700999 "action_id" : 9,
Carmelo Casconef1d0a422017-09-07 17:21:46 +02001000 "action_const" : false,
1001 "action_data" : [],
1002 "action_entry_const" : false
1003 }
1004 },
1005 {
1006 "name" : "egress_port_count_table",
1007 "id" : 4,
1008 "source_info" : {
1009 "filename" : "include/port_counters.p4",
1010 "line" : 30,
1011 "column" : 0,
1012 "source_fragment" : "table egress_port_count_table { ..."
1013 },
1014 "key" : [],
1015 "match_type" : "exact",
1016 "type" : "simple",
1017 "max_size" : 1024,
1018 "with_counters" : false,
1019 "support_timeout" : false,
1020 "direct_meters" : null,
Brian O'Connora6862e02017-09-08 01:17:39 -07001021 "action_ids" : [8],
Carmelo Casconef1d0a422017-09-07 17:21:46 +02001022 "actions" : ["count_egress"],
1023 "base_default_next" : null,
1024 "next_tables" : {
1025 "count_egress" : null
1026 },
1027 "default_entry" : {
Brian O'Connora6862e02017-09-08 01:17:39 -07001028 "action_id" : 8,
Carmelo Casconef1d0a422017-09-07 17:21:46 +02001029 "action_const" : false,
1030 "action_data" : [],
1031 "action_entry_const" : false
1032 }
1033 }
1034 ],
1035 "action_profiles" : [],
1036 "conditionals" : [
1037 {
1038 "name" : "node_2",
1039 "id" : 0,
1040 "source_info" : {
Brian O'Connora6862e02017-09-08 01:17:39 -07001041 "filename" : "ecmp.p4",
1042 "line" : 86,
1043 "column" : 12,
1044 "source_fragment" : "valid(packet_out_hdr)"
1045 },
1046 "expression" : {
1047 "type" : "expression",
1048 "value" : {
1049 "op" : "!=",
1050 "left" : {
1051 "type" : "field",
1052 "value" : ["packet_out_hdr", "$valid$"]
1053 },
1054 "right" : {
1055 "type" : "hexstr",
1056 "value" : "0x01"
1057 }
1058 }
1059 },
1060 "true_next" : "table0",
1061 "false_next" : "node_5"
1062 },
1063 {
1064 "name" : "node_5",
1065 "id" : 1,
1066 "source_info" : {
Carmelo Casconef1d0a422017-09-07 17:21:46 +02001067 "filename" : "include/packet_io.p4",
1068 "line" : 19,
1069 "column" : 8,
1070 "source_fragment" : "valid(packet_out_hdr)"
1071 },
1072 "expression" : {
1073 "type" : "expression",
1074 "value" : {
1075 "op" : "==",
1076 "left" : {
1077 "type" : "field",
1078 "value" : ["packet_out_hdr", "$valid$"]
1079 },
1080 "right" : {
1081 "type" : "hexstr",
1082 "value" : "0x01"
1083 }
1084 }
1085 },
Brian O'Connora6862e02017-09-08 01:17:39 -07001086 "true_next" : "process_packet_out_table",
Carmelo Casconef1d0a422017-09-07 17:21:46 +02001087 "false_next" : "node_7"
1088 },
1089 {
1090 "name" : "node_7",
1091 "id" : 2,
1092 "source_info" : {
1093 "filename" : "include/port_counters.p4",
1094 "line" : 36,
1095 "column" : 38,
1096 "source_fragment" : "<"
1097 },
1098 "expression" : {
1099 "type" : "expression",
1100 "value" : {
1101 "op" : "<",
1102 "left" : {
1103 "type" : "field",
1104 "value" : ["ig_intr_md", "egress_spec"]
1105 },
1106 "right" : {
1107 "type" : "hexstr",
1108 "value" : "0x00fe"
1109 }
1110 }
1111 },
1112 "false_next" : null,
1113 "true_next" : "ingress_port_count_table"
1114 }
1115 ]
1116 },
1117 {
1118 "name" : "egress",
1119 "id" : 1,
Brian O'Connora6862e02017-09-08 01:17:39 -07001120 "init_table" : null,
1121 "tables" : [],
Carmelo Casconef1d0a422017-09-07 17:21:46 +02001122 "action_profiles" : [],
Brian O'Connora6862e02017-09-08 01:17:39 -07001123 "conditionals" : []
Carmelo Casconef1d0a422017-09-07 17:21:46 +02001124 }
1125 ],
1126 "checksums" : [],
1127 "force_arith" : [],
1128 "extern_instances" : [],
1129 "field_aliases" : [
1130 [
1131 "queueing_metadata.enq_timestamp",
1132 ["ig_intr_md", "enq_timestamp"]
1133 ],
1134 [
1135 "queueing_metadata.enq_qdepth",
1136 ["ig_intr_md", "enq_qdepth"]
1137 ],
1138 [
1139 "queueing_metadata.deq_timedelta",
1140 ["ig_intr_md", "deq_timedelta"]
1141 ],
1142 [
1143 "queueing_metadata.deq_qdepth",
1144 ["ig_intr_md", "deq_qdepth"]
1145 ],
1146 [
1147 "intrinsic_metadata.ingress_global_timestamp",
1148 ["ig_intr_md", "ingress_global_timestamp"]
1149 ],
1150 [
1151 "intrinsic_metadata.lf_field_list",
1152 ["ig_intr_md", "lf_field_list"]
1153 ],
1154 [
1155 "intrinsic_metadata.mcast_grp",
1156 ["ig_intr_md", "mcast_grp"]
1157 ],
1158 [
1159 "intrinsic_metadata.resubmit_flag",
1160 ["ig_intr_md", "resubmit_flag"]
1161 ],
1162 [
1163 "intrinsic_metadata.egress_rid",
1164 ["ig_intr_md", "egress_rid"]
1165 ]
1166 ]
1167}