blob: ac7b4f2269523136893d76f06dd58a8b8449f743 [file] [log] [blame]
Carmelo Casconeca94bcf2017-10-27 14:16:59 -07001{
2 "program" : "basic.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_0", 32, false],
14 ["local_metadata_t.l4_src_port", 16, false],
15 ["local_metadata_t.l4_dst_port", 16, false],
Carmelo Cascone5167f322017-11-21 21:58:50 -080016 ["local_metadata_t.next_hop_id", 16, false]
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070017 ]
18 },
19 {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -080020 "name" : "packet_out_header_t",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070021 "id" : 1,
22 "fields" : [
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -080023 ["egress_port", 9, false],
24 ["_padding", 7, false]
25 ]
26 },
27 {
28 "name" : "packet_in_header_t",
29 "id" : 2,
30 "fields" : [
31 ["ingress_port", 9, false],
32 ["_padding_0", 7, false]
33 ]
34 },
35 {
36 "name" : "ethernet_t",
37 "id" : 3,
38 "fields" : [
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070039 ["dst_addr", 48, false],
40 ["src_addr", 48, false],
41 ["ether_type", 16, false]
42 ]
43 },
44 {
45 "name" : "ipv4_t",
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -080046 "id" : 4,
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070047 "fields" : [
48 ["version", 4, false],
49 ["ihl", 4, false],
Jonghwan Hyun8be03392017-12-04 15:48:44 -080050 ["dscp", 6, false],
51 ["ecn", 2, false],
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070052 ["len", 16, false],
53 ["identification", 16, false],
54 ["flags", 3, false],
55 ["frag_offset", 13, false],
56 ["ttl", 8, false],
57 ["protocol", 8, false],
58 ["hdr_checksum", 16, false],
59 ["src_addr", 32, false],
60 ["dst_addr", 32, false]
61 ]
62 },
63 {
64 "name" : "tcp_t",
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -080065 "id" : 5,
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070066 "fields" : [
67 ["src_port", 16, false],
68 ["dst_port", 16, false],
69 ["seq_no", 32, false],
70 ["ack_no", 32, false],
71 ["data_offset", 4, false],
72 ["res", 3, false],
73 ["ecn", 3, false],
74 ["ctrl", 6, false],
75 ["window", 16, false],
76 ["checksum", 16, false],
77 ["urgent_ptr", 16, false]
78 ]
79 },
80 {
81 "name" : "udp_t",
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -080082 "id" : 6,
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070083 "fields" : [
84 ["src_port", 16, false],
85 ["dst_port", 16, false],
86 ["length_", 16, false],
87 ["checksum", 16, false]
88 ]
89 },
90 {
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070091 "name" : "standard_metadata",
92 "id" : 7,
93 "fields" : [
94 ["ingress_port", 9, false],
95 ["egress_spec", 9, false],
96 ["egress_port", 9, false],
97 ["clone_spec", 32, false],
98 ["instance_type", 32, false],
99 ["drop", 1, false],
100 ["recirculate_port", 16, false],
101 ["packet_length", 32, false],
102 ["enq_timestamp", 32, false],
103 ["enq_qdepth", 19, false],
104 ["deq_timedelta", 32, false],
105 ["deq_qdepth", 19, false],
106 ["ingress_global_timestamp", 48, false],
107 ["lf_field_list", 32, false],
108 ["mcast_grp", 16, false],
109 ["resubmit_flag", 1, false],
110 ["egress_rid", 16, false],
111 ["checksum_error", 1, false],
112 ["_padding_1", 4, false]
113 ]
114 }
115 ],
116 "headers" : [
117 {
118 "name" : "scalars",
119 "id" : 0,
120 "header_type" : "scalars_0",
121 "metadata" : true,
122 "pi_omit" : true
123 },
124 {
125 "name" : "standard_metadata",
126 "id" : 1,
127 "header_type" : "standard_metadata",
128 "metadata" : true,
129 "pi_omit" : true
130 },
131 {
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700132 "name" : "packet_out",
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800133 "id" : 2,
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700134 "header_type" : "packet_out_header_t",
135 "metadata" : false,
136 "pi_omit" : true
137 },
138 {
139 "name" : "packet_in",
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800140 "id" : 3,
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700141 "header_type" : "packet_in_header_t",
142 "metadata" : false,
143 "pi_omit" : true
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800144 },
145 {
146 "name" : "ethernet",
147 "id" : 4,
148 "header_type" : "ethernet_t",
149 "metadata" : false,
150 "pi_omit" : true
151 },
152 {
153 "name" : "ipv4",
154 "id" : 5,
155 "header_type" : "ipv4_t",
156 "metadata" : false,
157 "pi_omit" : true
158 },
159 {
160 "name" : "tcp",
161 "id" : 6,
162 "header_type" : "tcp_t",
163 "metadata" : false,
164 "pi_omit" : true
165 },
166 {
167 "name" : "udp",
168 "id" : 7,
169 "header_type" : "udp_t",
170 "metadata" : false,
171 "pi_omit" : true
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700172 }
173 ],
174 "header_stacks" : [],
175 "header_union_types" : [],
176 "header_unions" : [],
177 "header_union_stacks" : [],
178 "field_lists" : [],
179 "errors" : [
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800180 ["NoError", 0],
181 ["PacketTooShort", 1],
182 ["NoMatch", 2],
183 ["StackOutOfBounds", 3],
184 ["HeaderTooShort", 4],
185 ["ParserTimeout", 5]
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700186 ],
187 "enums" : [],
188 "parsers" : [
189 {
190 "name" : "parser",
191 "id" : 0,
192 "init_state" : "start",
193 "parse_states" : [
194 {
195 "name" : "start",
196 "id" : 0,
197 "parser_ops" : [],
198 "transitions" : [
199 {
200 "value" : "0x00ff",
201 "mask" : null,
202 "next_state" : "parse_packet_out"
203 },
204 {
205 "value" : "default",
206 "mask" : null,
207 "next_state" : "parse_ethernet"
208 }
209 ],
210 "transition_key" : [
211 {
212 "type" : "field",
213 "value" : ["standard_metadata", "ingress_port"]
214 }
215 ]
216 },
217 {
218 "name" : "parse_packet_out",
219 "id" : 1,
220 "parser_ops" : [
221 {
222 "parameters" : [
223 {
224 "type" : "regular",
225 "value" : "packet_out"
226 }
227 ],
228 "op" : "extract"
229 }
230 ],
231 "transitions" : [
232 {
233 "value" : "default",
234 "mask" : null,
235 "next_state" : "parse_ethernet"
236 }
237 ],
238 "transition_key" : []
239 },
240 {
241 "name" : "parse_ethernet",
242 "id" : 2,
243 "parser_ops" : [
244 {
245 "parameters" : [
246 {
247 "type" : "regular",
248 "value" : "ethernet"
249 }
250 ],
251 "op" : "extract"
252 }
253 ],
254 "transitions" : [
255 {
256 "value" : "0x0800",
257 "mask" : null,
258 "next_state" : "parse_ipv4"
259 },
260 {
261 "value" : "default",
262 "mask" : null,
263 "next_state" : null
264 }
265 ],
266 "transition_key" : [
267 {
268 "type" : "field",
269 "value" : ["ethernet", "ether_type"]
270 }
271 ]
272 },
273 {
274 "name" : "parse_ipv4",
275 "id" : 3,
276 "parser_ops" : [
277 {
278 "parameters" : [
279 {
280 "type" : "regular",
281 "value" : "ipv4"
282 }
283 ],
284 "op" : "extract"
285 }
286 ],
287 "transitions" : [
288 {
289 "value" : "0x06",
290 "mask" : null,
291 "next_state" : "parse_tcp"
292 },
293 {
294 "value" : "0x11",
295 "mask" : null,
296 "next_state" : "parse_udp"
297 },
298 {
299 "value" : "default",
300 "mask" : null,
301 "next_state" : null
302 }
303 ],
304 "transition_key" : [
305 {
306 "type" : "field",
307 "value" : ["ipv4", "protocol"]
308 }
309 ]
310 },
311 {
312 "name" : "parse_tcp",
313 "id" : 4,
314 "parser_ops" : [
315 {
316 "parameters" : [
317 {
318 "type" : "regular",
319 "value" : "tcp"
320 }
321 ],
322 "op" : "extract"
323 },
324 {
325 "parameters" : [
326 {
327 "type" : "field",
328 "value" : ["scalars", "local_metadata_t.l4_src_port"]
329 },
330 {
331 "type" : "field",
332 "value" : ["tcp", "src_port"]
333 }
334 ],
335 "op" : "set"
336 },
337 {
338 "parameters" : [
339 {
340 "type" : "field",
341 "value" : ["scalars", "local_metadata_t.l4_dst_port"]
342 },
343 {
344 "type" : "field",
345 "value" : ["tcp", "dst_port"]
346 }
347 ],
348 "op" : "set"
349 }
350 ],
351 "transitions" : [
352 {
353 "value" : "default",
354 "mask" : null,
355 "next_state" : null
356 }
357 ],
358 "transition_key" : []
359 },
360 {
361 "name" : "parse_udp",
362 "id" : 5,
363 "parser_ops" : [
364 {
365 "parameters" : [
366 {
367 "type" : "regular",
368 "value" : "udp"
369 }
370 ],
371 "op" : "extract"
372 },
373 {
374 "parameters" : [
375 {
376 "type" : "field",
377 "value" : ["scalars", "local_metadata_t.l4_src_port"]
378 },
379 {
380 "type" : "field",
381 "value" : ["udp", "src_port"]
382 }
383 ],
384 "op" : "set"
385 },
386 {
387 "parameters" : [
388 {
389 "type" : "field",
390 "value" : ["scalars", "local_metadata_t.l4_dst_port"]
391 },
392 {
393 "type" : "field",
394 "value" : ["udp", "dst_port"]
395 }
396 ],
397 "op" : "set"
398 }
399 ],
400 "transitions" : [
401 {
402 "value" : "default",
403 "mask" : null,
404 "next_state" : null
405 }
406 ],
407 "transition_key" : []
408 }
409 ]
410 }
411 ],
412 "deparsers" : [
413 {
414 "name" : "deparser",
415 "id" : 0,
416 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800417 "filename" : "./include/parsers.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700418 "line" : 72,
419 "column" : 8,
420 "source_fragment" : "deparser"
421 },
422 "order" : ["packet_in", "ethernet", "ipv4", "tcp", "udp"]
423 }
424 ],
425 "meter_arrays" : [],
426 "counter_arrays" : [
427 {
428 "name" : "port_counters_ingress.ingress_port_counter",
429 "id" : 0,
430 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800431 "filename" : "./include/port_counters.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700432 "line" : 26,
433 "column" : 38,
434 "source_fragment" : "ingress_port_counter"
435 },
436 "size" : 511,
437 "is_direct" : false
438 },
439 {
440 "name" : "table0_control.table0_counter",
441 "id" : 1,
442 "is_direct" : true,
443 "binding" : "table0_control.table0"
444 },
445 {
446 "name" : "wcmp_control.wcmp_table_counter",
447 "id" : 2,
448 "is_direct" : true,
449 "binding" : "wcmp_control.wcmp_table"
450 },
451 {
452 "name" : "port_counters_egress.egress_port_counter",
453 "id" : 3,
454 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800455 "filename" : "./include/port_counters.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700456 "line" : 36,
457 "column" : 38,
458 "source_fragment" : "egress_port_counter"
459 },
460 "size" : 511,
461 "is_direct" : false
462 }
463 ],
464 "register_arrays" : [],
465 "calculations" : [],
466 "learn_lists" : [],
467 "actions" : [
468 {
469 "name" : "set_egress_port",
470 "id" : 0,
471 "runtime_data" : [
472 {
473 "name" : "port",
474 "bitwidth" : 9
475 }
476 ],
477 "primitives" : [
478 {
479 "op" : "assign",
480 "parameters" : [
481 {
482 "type" : "field",
483 "value" : ["standard_metadata", "egress_spec"]
484 },
485 {
486 "type" : "runtime_data",
487 "value" : 0
488 }
489 ],
490 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800491 "filename" : "./include/actions.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700492 "line" : 28,
493 "column" : 36,
494 "source_fragment" : "port; ..."
495 }
496 }
497 ]
498 },
499 {
500 "name" : "set_egress_port",
501 "id" : 1,
502 "runtime_data" : [
503 {
504 "name" : "port",
505 "bitwidth" : 9
506 }
507 ],
508 "primitives" : [
509 {
510 "op" : "assign",
511 "parameters" : [
512 {
513 "type" : "field",
514 "value" : ["standard_metadata", "egress_spec"]
515 },
516 {
517 "type" : "runtime_data",
518 "value" : 0
519 }
520 ],
521 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800522 "filename" : "./include/actions.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700523 "line" : 28,
524 "column" : 36,
525 "source_fragment" : "port; ..."
526 }
527 }
528 ]
529 },
530 {
531 "name" : "send_to_cpu",
532 "id" : 2,
533 "runtime_data" : [],
534 "primitives" : [
535 {
536 "op" : "assign",
537 "parameters" : [
538 {
539 "type" : "field",
540 "value" : ["standard_metadata", "egress_spec"]
541 },
542 {
543 "type" : "hexstr",
544 "value" : "0x00ff"
545 }
546 ],
547 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800548 "filename" : "./include/headers.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700549 "line" : 19,
550 "column" : 24,
551 "source_fragment" : "255; ..."
552 }
553 }
554 ]
555 },
556 {
557 "name" : "_drop",
558 "id" : 3,
559 "runtime_data" : [],
560 "primitives" : [
561 {
562 "op" : "drop",
563 "parameters" : [],
564 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800565 "filename" : "./include/actions.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700566 "line" : 32,
567 "column" : 4,
568 "source_fragment" : "mark_to_drop()"
569 }
570 }
571 ]
572 },
573 {
574 "name" : "NoAction",
575 "id" : 4,
576 "runtime_data" : [],
577 "primitives" : []
578 },
579 {
580 "name" : "table0_control.set_next_hop_id",
581 "id" : 5,
582 "runtime_data" : [
583 {
584 "name" : "next_hop_id",
585 "bitwidth" : 16
586 }
587 ],
588 "primitives" : [
589 {
590 "op" : "assign",
591 "parameters" : [
592 {
593 "type" : "field",
594 "value" : ["scalars", "local_metadata_t.next_hop_id"]
595 },
596 {
597 "type" : "runtime_data",
598 "value" : 0
599 }
600 ],
601 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800602 "filename" : "./include/table0.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700603 "line" : 30,
604 "column" : 8,
605 "source_fragment" : "local_metadata.next_hop_id = next_hop_id"
606 }
607 }
608 ]
609 },
610 {
611 "name" : "act",
612 "id" : 6,
613 "runtime_data" : [],
614 "primitives" : [
615 {
616 "op" : "assign",
617 "parameters" : [
618 {
619 "type" : "field",
620 "value" : ["standard_metadata", "egress_spec"]
621 },
622 {
623 "type" : "field",
624 "value" : ["packet_out", "egress_port"]
625 }
626 ],
627 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800628 "filename" : "./include/packet_io.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700629 "line" : 27,
630 "column" : 12,
631 "source_fragment" : "standard_metadata.egress_spec = hdr.packet_out.egress_port"
632 }
633 },
634 {
635 "op" : "remove_header",
636 "parameters" : [
637 {
638 "type" : "header",
639 "value" : "packet_out"
640 }
641 ],
642 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800643 "filename" : "./include/packet_io.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700644 "line" : 28,
645 "column" : 12,
646 "source_fragment" : "hdr.packet_out.setInvalid()"
647 }
648 }
649 ]
650 },
651 {
652 "name" : "act_0",
653 "id" : 7,
654 "runtime_data" : [],
655 "primitives" : [
656 {
657 "op" : "assign",
658 "parameters" : [
659 {
660 "type" : "field",
661 "value" : ["scalars", "tmp"]
662 },
663 {
664 "type" : "expression",
665 "value" : {
666 "type" : "expression",
667 "value" : {
668 "op" : "&",
669 "left" : {
670 "type" : "field",
671 "value" : ["standard_metadata", "ingress_port"]
672 },
673 "right" : {
674 "type" : "hexstr",
675 "value" : "0xffffffff"
676 }
677 }
678 }
679 }
680 ]
681 },
682 {
683 "op" : "count",
684 "parameters" : [
685 {
686 "type" : "counter_array",
687 "value" : "port_counters_ingress.ingress_port_counter"
688 },
689 {
690 "type" : "field",
691 "value" : ["scalars", "tmp"]
692 }
693 ],
694 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800695 "filename" : "./include/port_counters.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700696 "line" : 29,
697 "column" : 8,
698 "source_fragment" : "ingress_port_counter.count((bit<32>) standard_metadata.ingress_port)"
699 }
700 }
701 ]
702 },
703 {
704 "name" : "act_1",
705 "id" : 8,
706 "runtime_data" : [],
707 "primitives" : [
708 {
709 "op" : "add_header",
710 "parameters" : [
711 {
712 "type" : "header",
713 "value" : "packet_in"
714 }
715 ],
716 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800717 "filename" : "./include/packet_io.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700718 "line" : 38,
719 "column" : 12,
720 "source_fragment" : "hdr.packet_in.setValid()"
721 }
722 },
723 {
724 "op" : "assign",
725 "parameters" : [
726 {
727 "type" : "field",
728 "value" : ["packet_in", "ingress_port"]
729 },
730 {
731 "type" : "field",
732 "value" : ["standard_metadata", "ingress_port"]
733 }
734 ],
735 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800736 "filename" : "./include/packet_io.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700737 "line" : 39,
738 "column" : 12,
739 "source_fragment" : "hdr.packet_in.ingress_port = standard_metadata.ingress_port"
740 }
741 }
742 ]
743 },
744 {
745 "name" : "act_2",
746 "id" : 9,
747 "runtime_data" : [],
748 "primitives" : [
749 {
750 "op" : "assign",
751 "parameters" : [
752 {
753 "type" : "field",
754 "value" : ["scalars", "tmp_0"]
755 },
756 {
757 "type" : "expression",
758 "value" : {
759 "type" : "expression",
760 "value" : {
761 "op" : "&",
762 "left" : {
763 "type" : "field",
764 "value" : ["standard_metadata", "egress_port"]
765 },
766 "right" : {
767 "type" : "hexstr",
768 "value" : "0xffffffff"
769 }
770 }
771 }
772 }
773 ]
774 },
775 {
776 "op" : "count",
777 "parameters" : [
778 {
779 "type" : "counter_array",
780 "value" : "port_counters_egress.egress_port_counter"
781 },
782 {
783 "type" : "field",
784 "value" : ["scalars", "tmp_0"]
785 }
786 ],
787 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800788 "filename" : "./include/port_counters.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700789 "line" : 39,
790 "column" : 8,
791 "source_fragment" : "egress_port_counter.count((bit<32>) standard_metadata.egress_port)"
792 }
793 }
794 ]
795 }
796 ],
797 "pipelines" : [
798 {
799 "name" : "ingress",
800 "id" : 0,
801 "source_info" : {
802 "filename" : "basic.p4",
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800803 "line" : 35,
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700804 "column" : 8,
805 "source_fragment" : "ingress"
806 },
807 "init_table" : "tbl_act",
808 "tables" : [
809 {
810 "name" : "tbl_act",
811 "id" : 0,
812 "key" : [],
813 "match_type" : "exact",
814 "type" : "simple",
815 "max_size" : 1024,
816 "with_counters" : false,
817 "support_timeout" : false,
818 "direct_meters" : null,
819 "action_ids" : [7],
820 "actions" : ["act_0"],
821 "base_default_next" : "node_3",
822 "next_tables" : {
823 "act_0" : "node_3"
824 },
825 "default_entry" : {
826 "action_id" : 7,
827 "action_const" : true,
828 "action_data" : [],
829 "action_entry_const" : true
830 }
831 },
832 {
833 "name" : "tbl_act_0",
834 "id" : 1,
835 "key" : [],
836 "match_type" : "exact",
837 "type" : "simple",
838 "max_size" : 1024,
839 "with_counters" : false,
840 "support_timeout" : false,
841 "direct_meters" : null,
842 "action_ids" : [6],
843 "actions" : ["act"],
844 "base_default_next" : null,
845 "next_tables" : {
846 "act" : null
847 },
848 "default_entry" : {
849 "action_id" : 6,
850 "action_const" : true,
851 "action_data" : [],
852 "action_entry_const" : true
853 }
854 },
855 {
856 "name" : "table0_control.table0",
857 "id" : 2,
858 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800859 "filename" : "./include/table0.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700860 "line" : 33,
861 "column" : 10,
862 "source_fragment" : "table0"
863 },
864 "key" : [
865 {
866 "match_type" : "ternary",
867 "target" : ["standard_metadata", "ingress_port"],
868 "mask" : null
869 },
870 {
871 "match_type" : "ternary",
872 "target" : ["ethernet", "src_addr"],
873 "mask" : null
874 },
875 {
876 "match_type" : "ternary",
877 "target" : ["ethernet", "dst_addr"],
878 "mask" : null
879 },
880 {
881 "match_type" : "ternary",
882 "target" : ["ethernet", "ether_type"],
883 "mask" : null
884 },
885 {
886 "match_type" : "ternary",
887 "target" : ["ipv4", "src_addr"],
888 "mask" : null
889 },
890 {
891 "match_type" : "ternary",
892 "target" : ["ipv4", "dst_addr"],
893 "mask" : null
894 },
895 {
896 "match_type" : "ternary",
897 "target" : ["ipv4", "protocol"],
898 "mask" : null
899 },
900 {
901 "match_type" : "ternary",
902 "target" : ["scalars", "local_metadata_t.l4_src_port"],
903 "mask" : null
904 },
905 {
906 "match_type" : "ternary",
907 "target" : ["scalars", "local_metadata_t.l4_dst_port"],
908 "mask" : null
909 }
910 ],
911 "match_type" : "ternary",
912 "type" : "simple",
913 "max_size" : 1024,
914 "support_timeout" : false,
915 "direct_meters" : null,
916 "action_ids" : [0, 2, 5, 3],
917 "actions" : ["set_egress_port", "send_to_cpu", "table0_control.set_next_hop_id", "_drop"],
918 "base_default_next" : "node_6",
919 "next_tables" : {
920 "set_egress_port" : "node_6",
921 "send_to_cpu" : "node_6",
922 "table0_control.set_next_hop_id" : "node_6",
923 "_drop" : "node_6"
924 },
925 "default_entry" : {
926 "action_id" : 3,
927 "action_const" : true,
928 "action_data" : [],
929 "action_entry_const" : true
930 }
931 },
932 {
933 "name" : "wcmp_control.wcmp_table",
934 "id" : 3,
935 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -0800936 "filename" : "./include/wcmp.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700937 "line" : 30,
938 "column" : 10,
939 "source_fragment" : "wcmp_table"
940 },
941 "key" : [
942 {
943 "match_type" : "exact",
944 "target" : ["scalars", "local_metadata_t.next_hop_id"],
945 "mask" : null
946 }
947 ],
948 "match_type" : "exact",
949 "type" : "indirect_ws",
950 "action_profile" : "wcmp_control.wcmp_selector",
951 "max_size" : 1024,
952 "support_timeout" : false,
953 "direct_meters" : null,
954 "action_ids" : [1, 4],
955 "actions" : ["set_egress_port", "NoAction"],
956 "base_default_next" : null,
957 "next_tables" : {
958 "set_egress_port" : null,
959 "NoAction" : null
960 }
961 }
962 ],
963 "action_profiles" : [
964 {
965 "name" : "wcmp_control.wcmp_selector",
966 "id" : 0,
967 "max_size" : 64,
968 "selector" : {
969 "algo" : "crc16",
970 "input" : [
971 {
972 "type" : "field",
973 "value" : ["ipv4", "src_addr"]
974 },
975 {
976 "type" : "field",
977 "value" : ["ipv4", "dst_addr"]
978 },
979 {
980 "type" : "field",
981 "value" : ["ipv4", "protocol"]
982 },
983 {
984 "type" : "field",
985 "value" : ["scalars", "local_metadata_t.l4_src_port"]
986 },
987 {
988 "type" : "field",
989 "value" : ["scalars", "local_metadata_t.l4_dst_port"]
990 }
991 ]
992 }
993 }
994 ],
995 "conditionals" : [
996 {
997 "name" : "node_3",
998 "id" : 0,
999 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -08001000 "filename" : "./include/packet_io.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -07001001 "line" : 26,
1002 "column" : 12,
1003 "source_fragment" : "standard_metadata.ingress_port == CPU_PORT"
1004 },
1005 "expression" : {
1006 "type" : "expression",
1007 "value" : {
1008 "op" : "==",
1009 "left" : {
1010 "type" : "field",
1011 "value" : ["standard_metadata", "ingress_port"]
1012 },
1013 "right" : {
1014 "type" : "hexstr",
1015 "value" : "0x00ff"
1016 }
1017 }
1018 },
1019 "true_next" : "tbl_act_0",
1020 "false_next" : "table0_control.table0"
1021 },
1022 {
1023 "name" : "node_6",
1024 "id" : 1,
1025 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -08001026 "filename" : "./include/wcmp.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -07001027 "line" : 48,
1028 "column" : 12,
1029 "source_fragment" : "local_metadata.next_hop_id != 0"
1030 },
1031 "expression" : {
1032 "type" : "expression",
1033 "value" : {
1034 "op" : "!=",
1035 "left" : {
1036 "type" : "field",
1037 "value" : ["scalars", "local_metadata_t.next_hop_id"]
1038 },
1039 "right" : {
1040 "type" : "hexstr",
1041 "value" : "0x0000"
1042 }
1043 }
1044 },
1045 "false_next" : null,
1046 "true_next" : "wcmp_control.wcmp_table"
1047 }
1048 ]
1049 },
1050 {
1051 "name" : "egress",
1052 "id" : 1,
1053 "source_info" : {
1054 "filename" : "basic.p4",
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -08001055 "line" : 51,
Carmelo Casconeca94bcf2017-10-27 14:16:59 -07001056 "column" : 8,
1057 "source_fragment" : "egress"
1058 },
1059 "init_table" : "tbl_act_1",
1060 "tables" : [
1061 {
1062 "name" : "tbl_act_1",
1063 "id" : 4,
1064 "key" : [],
1065 "match_type" : "exact",
1066 "type" : "simple",
1067 "max_size" : 1024,
1068 "with_counters" : false,
1069 "support_timeout" : false,
1070 "direct_meters" : null,
1071 "action_ids" : [9],
1072 "actions" : ["act_2"],
1073 "base_default_next" : "node_11",
1074 "next_tables" : {
1075 "act_2" : "node_11"
1076 },
1077 "default_entry" : {
1078 "action_id" : 9,
1079 "action_const" : true,
1080 "action_data" : [],
1081 "action_entry_const" : true
1082 }
1083 },
1084 {
1085 "name" : "tbl_act_2",
1086 "id" : 5,
1087 "key" : [],
1088 "match_type" : "exact",
1089 "type" : "simple",
1090 "max_size" : 1024,
1091 "with_counters" : false,
1092 "support_timeout" : false,
1093 "direct_meters" : null,
1094 "action_ids" : [8],
1095 "actions" : ["act_1"],
1096 "base_default_next" : null,
1097 "next_tables" : {
1098 "act_1" : null
1099 },
1100 "default_entry" : {
1101 "action_id" : 8,
1102 "action_const" : true,
1103 "action_data" : [],
1104 "action_entry_const" : true
1105 }
1106 }
1107 ],
1108 "action_profiles" : [],
1109 "conditionals" : [
1110 {
1111 "name" : "node_11",
1112 "id" : 2,
1113 "source_info" : {
Jonghwan Hyun4a9a6712017-11-13 14:43:55 -08001114 "filename" : "./include/packet_io.p4",
Carmelo Casconeca94bcf2017-10-27 14:16:59 -07001115 "line" : 37,
1116 "column" : 12,
1117 "source_fragment" : "standard_metadata.egress_port == CPU_PORT"
1118 },
1119 "expression" : {
1120 "type" : "expression",
1121 "value" : {
1122 "op" : "==",
1123 "left" : {
1124 "type" : "field",
1125 "value" : ["standard_metadata", "egress_port"]
1126 },
1127 "right" : {
1128 "type" : "hexstr",
1129 "value" : "0x00ff"
1130 }
1131 }
1132 },
1133 "false_next" : null,
1134 "true_next" : "tbl_act_2"
1135 }
1136 ]
1137 }
1138 ],
1139 "checksums" : [],
1140 "force_arith" : [],
1141 "extern_instances" : [],
1142 "field_aliases" : [
1143 [
1144 "queueing_metadata.enq_timestamp",
1145 ["standard_metadata", "enq_timestamp"]
1146 ],
1147 [
1148 "queueing_metadata.enq_qdepth",
1149 ["standard_metadata", "enq_qdepth"]
1150 ],
1151 [
1152 "queueing_metadata.deq_timedelta",
1153 ["standard_metadata", "deq_timedelta"]
1154 ],
1155 [
1156 "queueing_metadata.deq_qdepth",
1157 ["standard_metadata", "deq_qdepth"]
1158 ],
1159 [
1160 "intrinsic_metadata.ingress_global_timestamp",
1161 ["standard_metadata", "ingress_global_timestamp"]
1162 ],
1163 [
1164 "intrinsic_metadata.lf_field_list",
1165 ["standard_metadata", "lf_field_list"]
1166 ],
1167 [
1168 "intrinsic_metadata.mcast_grp",
1169 ["standard_metadata", "mcast_grp"]
1170 ],
1171 [
1172 "intrinsic_metadata.resubmit_flag",
1173 ["standard_metadata", "resubmit_flag"]
1174 ],
1175 [
1176 "intrinsic_metadata.egress_rid",
1177 ["standard_metadata", "egress_rid"]
1178 ]
1179 ]
1180}