blob: 6313d0db95111f90ced80360da3830f2b8281ccd [file] [log] [blame]
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001{
2 "program" : "wcmp.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 Cascone16de6db2017-08-22 00:27:57 +020012 ["tmp_0", 104, false],
13 ["tmp", 8, false],
14 ["tmp_1", 32, false],
15 ["tmp_2", 32, false]
Carmelo Casconefc3776d2017-08-21 23:17:22 +020016 ]
17 },
18 {
19 "name" : "ethernet_t",
20 "id" : 1,
21 "fields" : [
22 ["dstAddr", 48, false],
23 ["srcAddr", 48, false],
24 ["etherType", 16, false]
25 ]
26 },
27 {
28 "name" : "ipv4_t",
29 "id" : 2,
30 "fields" : [
31 ["version", 4, false],
32 ["ihl", 4, false],
33 ["diffserv", 8, false],
34 ["totalLen", 16, false],
35 ["identification", 16, false],
36 ["flags", 3, false],
37 ["fragOffset", 13, false],
38 ["ttl", 8, false],
39 ["protocol", 8, false],
40 ["hdrChecksum", 16, false],
41 ["srcAddr", 32, false],
42 ["dstAddr", 32, false]
43 ]
44 },
45 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +020046 "name" : "packet_in_t",
Carmelo Casconefc3776d2017-08-21 23:17:22 +020047 "id" : 3,
48 "fields" : [
Carmelo Cascone16de6db2017-08-22 00:27:57 +020049 ["ingress_port", 9, false],
50 ["_padding", 7, false]
51 ]
52 },
53 {
54 "name" : "packet_out_t",
55 "id" : 4,
56 "fields" : [
57 ["egress_port", 9, false],
58 ["_padding_0", 7, false]
59 ]
60 },
61 {
62 "name" : "tcp_t",
63 "id" : 5,
64 "fields" : [
Carmelo Casconefc3776d2017-08-21 23:17:22 +020065 ["srcPort", 16, false],
66 ["dstPort", 16, false],
67 ["seqNo", 32, false],
68 ["ackNo", 32, false],
69 ["dataOffset", 4, false],
70 ["res", 3, false],
71 ["ecn", 3, false],
72 ["ctrl", 6, false],
73 ["window", 16, false],
74 ["checksum", 16, false],
75 ["urgentPtr", 16, false]
76 ]
77 },
78 {
79 "name" : "udp_t",
Carmelo Cascone16de6db2017-08-22 00:27:57 +020080 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +020081 "fields" : [
82 ["srcPort", 16, false],
83 ["dstPort", 16, false],
84 ["length_", 16, false],
85 ["checksum", 16, false]
86 ]
87 },
88 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +020089 "name" : "wcmp_meta_t",
Carmelo Cascone16de6db2017-08-22 00:27:57 +020090 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +020091 "fields" : [
92 ["groupId", 16, false],
93 ["numBits", 8, false],
94 ["selector", 32, false]
95 ]
96 },
97 {
98 "name" : "standard_metadata",
Carmelo Cascone16de6db2017-08-22 00:27:57 +020099 "id" : 8,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200100 "fields" : [
101 ["ingress_port", 9, false],
102 ["egress_spec", 9, false],
103 ["egress_port", 9, false],
104 ["clone_spec", 32, false],
105 ["instance_type", 32, false],
106 ["drop", 1, false],
107 ["recirculate_port", 16, false],
108 ["packet_length", 32, false],
109 ["enq_timestamp", 32, false],
110 ["enq_qdepth", 19, false],
111 ["deq_timedelta", 32, false],
112 ["deq_qdepth", 19, false],
113 ["ingress_global_timestamp", 48, false],
114 ["lf_field_list", 32, false],
115 ["mcast_grp", 16, false],
116 ["resubmit_flag", 1, false],
117 ["egress_rid", 16, false],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200118 ["_padding_1", 5, false]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200119 ]
120 }
121 ],
122 "headers" : [
123 {
124 "name" : "scalars",
125 "id" : 0,
126 "header_type" : "scalars_0",
127 "metadata" : true,
128 "pi_omit" : true
129 },
130 {
131 "name" : "standard_metadata",
132 "id" : 1,
133 "header_type" : "standard_metadata",
134 "metadata" : true,
135 "pi_omit" : true
136 },
137 {
138 "name" : "ethernet",
139 "id" : 2,
140 "header_type" : "ethernet_t",
141 "metadata" : false,
142 "pi_omit" : true
143 },
144 {
145 "name" : "ipv4",
146 "id" : 3,
147 "header_type" : "ipv4_t",
148 "metadata" : false,
149 "pi_omit" : true
150 },
151 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200152 "name" : "packet_in_hdr",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200153 "id" : 4,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200154 "header_type" : "packet_in_t",
155 "metadata" : false,
156 "pi_omit" : true
157 },
158 {
159 "name" : "packet_out_hdr",
160 "id" : 5,
161 "header_type" : "packet_out_t",
162 "metadata" : false,
163 "pi_omit" : true
164 },
165 {
166 "name" : "tcp",
167 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200168 "header_type" : "tcp_t",
169 "metadata" : false,
170 "pi_omit" : true
171 },
172 {
173 "name" : "udp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200174 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200175 "header_type" : "udp_t",
176 "metadata" : false,
177 "pi_omit" : true
178 },
179 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200180 "name" : "wcmp_meta",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200181 "id" : 8,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200182 "header_type" : "wcmp_meta_t",
183 "metadata" : true,
184 "pi_omit" : true
185 }
186 ],
187 "header_stacks" : [],
188 "header_union_types" : [],
189 "header_unions" : [],
190 "header_union_stacks" : [],
191 "field_lists" : [],
192 "errors" : [
193 ["NoError", 1],
194 ["PacketTooShort", 2],
195 ["NoMatch", 3],
196 ["StackOutOfBounds", 4],
197 ["HeaderTooShort", 5],
198 ["ParserTimeout", 6]
199 ],
200 "enums" : [],
201 "parsers" : [
202 {
203 "name" : "parser",
204 "id" : 0,
205 "init_state" : "start",
206 "parse_states" : [
207 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200208 "name" : "default_parser",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200209 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200210 "parser_ops" : [],
211 "transitions" : [
212 {
213 "value" : "0x00ff",
214 "mask" : null,
215 "next_state" : "parse_pkt_out"
216 },
217 {
218 "value" : "default",
219 "mask" : null,
220 "next_state" : "parse_ethernet"
221 }
222 ],
223 "transition_key" : [
224 {
225 "type" : "field",
226 "value" : ["standard_metadata", "ingress_port"]
227 }
228 ]
229 },
230 {
231 "name" : "parse_ethernet",
232 "id" : 1,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200233 "parser_ops" : [
234 {
235 "parameters" : [
236 {
237 "type" : "regular",
238 "value" : "ethernet"
239 }
240 ],
241 "op" : "extract"
242 }
243 ],
244 "transitions" : [
245 {
246 "value" : "0x0800",
247 "mask" : null,
248 "next_state" : "parse_ipv4"
249 },
250 {
251 "value" : "default",
252 "mask" : null,
253 "next_state" : null
254 }
255 ],
256 "transition_key" : [
257 {
258 "type" : "field",
259 "value" : ["ethernet", "etherType"]
260 }
261 ]
262 },
263 {
264 "name" : "parse_ipv4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200265 "id" : 2,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200266 "parser_ops" : [
267 {
268 "parameters" : [
269 {
270 "type" : "regular",
271 "value" : "ipv4"
272 }
273 ],
274 "op" : "extract"
275 }
276 ],
277 "transitions" : [
278 {
279 "value" : "0x000006",
280 "mask" : null,
281 "next_state" : "parse_tcp"
282 },
283 {
284 "value" : "0x000011",
285 "mask" : null,
286 "next_state" : "parse_udp"
287 },
288 {
289 "value" : "default",
290 "mask" : null,
291 "next_state" : null
292 }
293 ],
294 "transition_key" : [
295 {
296 "type" : "field",
297 "value" : ["ipv4", "fragOffset"]
298 },
299 {
300 "type" : "field",
301 "value" : ["ipv4", "protocol"]
302 }
303 ]
304 },
305 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200306 "name" : "parse_pkt_in",
307 "id" : 3,
308 "parser_ops" : [
309 {
310 "parameters" : [
311 {
312 "type" : "regular",
313 "value" : "packet_in_hdr"
314 }
315 ],
316 "op" : "extract"
317 }
318 ],
319 "transitions" : [
320 {
321 "value" : "default",
322 "mask" : null,
323 "next_state" : "parse_ethernet"
324 }
325 ],
326 "transition_key" : []
327 },
328 {
329 "name" : "parse_pkt_out",
330 "id" : 4,
331 "parser_ops" : [
332 {
333 "parameters" : [
334 {
335 "type" : "regular",
336 "value" : "packet_out_hdr"
337 }
338 ],
339 "op" : "extract"
340 }
341 ],
342 "transitions" : [
343 {
344 "value" : "default",
345 "mask" : null,
346 "next_state" : "parse_ethernet"
347 }
348 ],
349 "transition_key" : []
350 },
351 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200352 "name" : "parse_tcp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200353 "id" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200354 "parser_ops" : [
355 {
356 "parameters" : [
357 {
358 "type" : "regular",
359 "value" : "tcp"
360 }
361 ],
362 "op" : "extract"
363 }
364 ],
365 "transitions" : [
366 {
367 "value" : "default",
368 "mask" : null,
369 "next_state" : null
370 }
371 ],
372 "transition_key" : []
373 },
374 {
375 "name" : "parse_udp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200376 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200377 "parser_ops" : [
378 {
379 "parameters" : [
380 {
381 "type" : "regular",
382 "value" : "udp"
383 }
384 ],
385 "op" : "extract"
386 }
387 ],
388 "transitions" : [
389 {
390 "value" : "default",
391 "mask" : null,
392 "next_state" : null
393 }
394 ],
395 "transition_key" : []
396 },
397 {
398 "name" : "start",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200399 "id" : 7,
400 "parser_ops" : [
401 {
402 "parameters" : [
403 {
404 "type" : "field",
405 "value" : ["scalars", "tmp_0"]
406 },
407 {
408 "type" : "lookahead",
409 "value" : [0, 104]
410 }
411 ],
412 "op" : "set"
413 },
414 {
415 "parameters" : [
416 {
417 "type" : "field",
418 "value" : ["scalars", "tmp"]
419 },
420 {
421 "type" : "expression",
422 "value" : {
423 "type" : "expression",
424 "value" : {
425 "op" : "&",
426 "left" : {
427 "type" : "field",
428 "value" : ["scalars", "tmp_0"]
429 },
430 "right" : {
431 "type" : "hexstr",
432 "value" : "0xff"
433 }
434 }
435 }
436 }
437 ],
438 "op" : "set"
439 }
440 ],
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200441 "transitions" : [
442 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200443 "value" : "0x00",
444 "mask" : null,
445 "next_state" : "parse_pkt_in"
446 },
447 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200448 "value" : "default",
449 "mask" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200450 "next_state" : "default_parser"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200451 }
452 ],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200453 "transition_key" : [
454 {
455 "type" : "field",
456 "value" : ["scalars", "tmp"]
457 }
458 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200459 }
460 ]
461 }
462 ],
463 "deparsers" : [
464 {
465 "name" : "deparser",
466 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200467 "order" : ["packet_out_hdr", "packet_in_hdr", "ethernet", "ipv4", "udp", "tcp"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200468 }
469 ],
470 "meter_arrays" : [],
471 "counter_arrays" : [
472 {
473 "name" : "table0_counter",
474 "id" : 0,
475 "is_direct" : true,
476 "binding" : "table0"
477 },
478 {
479 "name" : "wcmp_group_table_counter",
480 "id" : 1,
481 "is_direct" : true,
482 "binding" : "wcmp_group_table"
483 },
484 {
485 "name" : "egress_port_counter",
486 "id" : 2,
487 "size" : 254,
488 "is_direct" : false
489 },
490 {
491 "name" : "ingress_port_counter",
492 "id" : 3,
493 "size" : 254,
494 "is_direct" : false
495 }
496 ],
497 "register_arrays" : [],
498 "calculations" : [
499 {
500 "name" : "calc",
501 "id" : 0,
502 "algo" : "crc32",
503 "input" : [
504 {
505 "type" : "field",
506 "value" : ["ipv4", "srcAddr"]
507 },
508 {
509 "type" : "field",
510 "value" : ["ipv4", "dstAddr"]
511 },
512 {
513 "type" : "field",
514 "value" : ["ipv4", "protocol"]
515 },
516 {
517 "type" : "field",
518 "value" : ["tcp", "srcPort"]
519 },
520 {
521 "type" : "field",
522 "value" : ["tcp", "dstPort"]
523 },
524 {
525 "type" : "field",
526 "value" : ["udp", "srcPort"]
527 },
528 {
529 "type" : "field",
530 "value" : ["udp", "dstPort"]
531 }
532 ]
533 }
534 ],
535 "learn_lists" : [],
536 "actions" : [
537 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200538 "name" : "add_packet_in_hdr",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200539 "id" : 0,
540 "runtime_data" : [],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200541 "primitives" : [
542 {
543 "op" : "add_header",
544 "parameters" : [
545 {
546 "type" : "header",
547 "value" : "packet_in_hdr"
548 }
549 ],
550 "source_info" : {
551 "filename" : "include/packet_io.p4",
552 "line" : 25,
553 "column" : 4,
554 "source_fragment" : "add_header(packet_in_hdr)"
555 }
556 },
557 {
558 "op" : "assign",
559 "parameters" : [
560 {
561 "type" : "field",
562 "value" : ["packet_in_hdr", "ingress_port"]
563 },
564 {
565 "type" : "field",
566 "value" : ["standard_metadata", "ingress_port"]
567 }
568 ],
569 "source_info" : {
570 "filename" : "include/packet_io.p4",
571 "line" : 26,
572 "column" : 4,
573 "source_fragment" : "modify_field(packet_in_hdr.ingress_port, standard_metadata.ingress_port)"
574 }
575 }
576 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200577 },
578 {
579 "name" : "NoAction",
580 "id" : 1,
581 "runtime_data" : [],
582 "primitives" : []
583 },
584 {
585 "name" : "NoAction",
586 "id" : 2,
587 "runtime_data" : [],
588 "primitives" : []
589 },
590 {
591 "name" : "NoAction",
592 "id" : 3,
593 "runtime_data" : [],
594 "primitives" : []
595 },
596 {
597 "name" : "wcmp_set_selector",
598 "id" : 4,
599 "runtime_data" : [],
600 "primitives" : [
601 {
602 "op" : "assign",
603 "parameters" : [
604 {
605 "type" : "field",
606 "value" : ["wcmp_meta", "selector"]
607 },
608 {
609 "type" : "expression",
610 "value" : {
611 "type" : "expression",
612 "value" : {
613 "op" : "&",
614 "left" : {
615 "type" : "expression",
616 "value" : {
617 "op" : "&",
618 "left" : {
619 "type" : "expression",
620 "value" : {
621 "op" : "<<",
622 "left" : {
623 "type" : "expression",
624 "value" : {
625 "op" : "&",
626 "left" : {
627 "type" : "expression",
628 "value" : {
629 "op" : "+",
630 "left" : {
631 "type" : "expression",
632 "value" : {
633 "op" : "&",
634 "left" : {
635 "type" : "expression",
636 "value" : {
637 "op" : "<<",
638 "left" : {
639 "type" : "hexstr",
640 "value" : "0x01"
641 },
642 "right" : {
643 "type" : "field",
644 "value" : ["wcmp_meta", "numBits"]
645 }
646 }
647 },
648 "right" : {
649 "type" : "hexstr",
650 "value" : "0xff"
651 }
652 }
653 },
654 "right" : {
655 "type" : "hexstr",
656 "value" : "0xff"
657 }
658 }
659 },
660 "right" : {
661 "type" : "hexstr",
662 "value" : "0xff"
663 }
664 }
665 },
666 "right" : {
667 "type" : "expression",
668 "value" : {
669 "op" : "&",
670 "left" : {
671 "type" : "expression",
672 "value" : {
673 "op" : "-",
674 "left" : {
675 "type" : "hexstr",
676 "value" : "0x20"
677 },
678 "right" : {
679 "type" : "field",
680 "value" : ["wcmp_meta", "numBits"]
681 }
682 }
683 },
684 "right" : {
685 "type" : "hexstr",
686 "value" : "0xff"
687 }
688 }
689 }
690 }
691 },
692 "right" : {
693 "type" : "hexstr",
694 "value" : "0xff"
695 }
696 }
697 },
698 "right" : {
699 "type" : "hexstr",
700 "value" : "0xffffffff"
701 }
702 }
703 }
704 }
705 ],
706 "source_info" : {
707 "filename" : "wcmp.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200708 "line" : 44,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200709 "column" : 4,
710 "source_fragment" : "modify_field(wcmp_meta.selector, ..."
711 }
712 }
713 ]
714 },
715 {
716 "name" : "set_egress_port",
717 "id" : 5,
718 "runtime_data" : [
719 {
720 "name" : "port",
721 "bitwidth" : 9
722 }
723 ],
724 "primitives" : [
725 {
726 "op" : "assign",
727 "parameters" : [
728 {
729 "type" : "field",
730 "value" : ["standard_metadata", "egress_spec"]
731 },
732 {
733 "type" : "runtime_data",
734 "value" : 0
735 }
736 ],
737 "source_info" : {
738 "filename" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200739 "line" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200740 "column" : 23,
741 "source_fragment" : "port) { ..."
742 }
743 }
744 ]
745 },
746 {
747 "name" : "wcmp_group",
748 "id" : 6,
749 "runtime_data" : [
750 {
751 "name" : "groupId",
752 "bitwidth" : 16
753 }
754 ],
755 "primitives" : [
756 {
757 "op" : "assign",
758 "parameters" : [
759 {
760 "type" : "field",
761 "value" : ["wcmp_meta", "groupId"]
762 },
763 {
764 "type" : "runtime_data",
765 "value" : 0
766 }
767 ],
768 "source_info" : {
769 "filename" : "wcmp.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200770 "line" : 38,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200771 "column" : 18,
772 "source_fragment" : "groupId) { ..."
773 }
774 },
775 {
776 "op" : "modify_field_with_hash_based_offset",
777 "parameters" : [
778 {
779 "type" : "field",
780 "value" : ["wcmp_meta", "numBits"]
781 },
782 {
783 "type" : "hexstr",
784 "value" : "0x00000002"
785 },
786 {
787 "type" : "calculation",
788 "value" : "calc"
789 },
790 {
791 "type" : "hexstr",
792 "value" : "0x000000000000001e"
793 }
794 ],
795 "source_info" : {
796 "filename" : "wcmp.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200797 "line" : 40,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200798 "column" : 4,
799 "source_fragment" : "modify_field_with_hash_based_offset(wcmp_meta.numBits, 2, wcmp_hash, (32 - 2))"
800 }
801 }
802 ]
803 },
804 {
805 "name" : "send_to_cpu",
806 "id" : 7,
807 "runtime_data" : [],
808 "primitives" : [
809 {
810 "op" : "assign",
811 "parameters" : [
812 {
813 "type" : "field",
814 "value" : ["standard_metadata", "egress_spec"]
815 },
816 {
817 "type" : "hexstr",
818 "value" : "0x00ff"
819 }
820 ],
821 "source_info" : {
822 "filename" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200823 "line" : 21,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200824 "column" : 4,
825 "source_fragment" : "modify_field(standard_metadata.egress_spec, 255)"
826 }
827 }
828 ]
829 },
830 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200831 "name" : "_drop",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200832 "id" : 8,
833 "runtime_data" : [],
834 "primitives" : [
835 {
836 "op" : "assign",
837 "parameters" : [
838 {
839 "type" : "field",
840 "value" : ["standard_metadata", "egress_spec"]
841 },
842 {
843 "type" : "hexstr",
844 "value" : "0x01ff"
845 }
846 ],
847 "source_info" : {
848 "filename" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200849 "line" : 13,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200850 "column" : 4,
851 "source_fragment" : "modify_field(standard_metadata.egress_spec, 511)"
852 }
853 }
854 ]
855 },
856 {
857 "name" : "set_egress_port",
858 "id" : 9,
859 "runtime_data" : [
860 {
861 "name" : "port",
862 "bitwidth" : 9
863 }
864 ],
865 "primitives" : [
866 {
867 "op" : "assign",
868 "parameters" : [
869 {
870 "type" : "field",
871 "value" : ["standard_metadata", "egress_spec"]
872 },
873 {
874 "type" : "runtime_data",
875 "value" : 0
876 }
877 ],
878 "source_info" : {
879 "filename" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200880 "line" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200881 "column" : 23,
882 "source_fragment" : "port) { ..."
883 }
884 }
885 ]
886 },
887 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200888 "name" : "_packet_out",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200889 "id" : 10,
890 "runtime_data" : [],
891 "primitives" : [
892 {
893 "op" : "assign",
894 "parameters" : [
895 {
896 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200897 "value" : ["standard_metadata", "egress_spec"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200898 },
899 {
900 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200901 "value" : ["packet_out_hdr", "egress_port"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200902 }
903 ],
904 "source_info" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200905 "filename" : "include/packet_io.p4",
906 "line" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200907 "column" : 4,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200908 "source_fragment" : "modify_field(standard_metadata.egress_spec, packet_out_hdr.egress_port)"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200909 }
910 },
911 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200912 "op" : "remove_header",
913 "parameters" : [
914 {
915 "type" : "header",
916 "value" : "packet_out_hdr"
917 }
918 ],
919 "source_info" : {
920 "filename" : "include/packet_io.p4",
921 "line" : 8,
922 "column" : 4,
923 "source_fragment" : "remove_header(packet_out_hdr)"
924 }
925 }
926 ]
927 },
928 {
929 "name" : "count_egress",
930 "id" : 11,
931 "runtime_data" : [],
932 "primitives" : [
933 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200934 "op" : "assign",
935 "parameters" : [
936 {
937 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200938 "value" : ["scalars", "tmp_1"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200939 },
940 {
941 "type" : "expression",
942 "value" : {
943 "type" : "expression",
944 "value" : {
945 "op" : "&",
946 "left" : {
947 "type" : "field",
948 "value" : ["standard_metadata", "egress_spec"]
949 },
950 "right" : {
951 "type" : "hexstr",
952 "value" : "0xffffffff"
953 }
954 }
955 }
956 }
957 ]
958 },
959 {
960 "op" : "count",
961 "parameters" : [
962 {
963 "type" : "counter_array",
964 "value" : "egress_port_counter"
965 },
966 {
967 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200968 "value" : ["scalars", "tmp_1"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200969 }
970 ],
971 "source_info" : {
972 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200973 "line" : 22,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200974 "column" : 4,
975 "source_fragment" : "count(egress_port_counter, standard_metadata.egress_spec)"
976 }
977 }
978 ]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200979 },
980 {
981 "name" : "count_ingress",
982 "id" : 12,
983 "runtime_data" : [],
984 "primitives" : [
985 {
986 "op" : "assign",
987 "parameters" : [
988 {
989 "type" : "field",
990 "value" : ["scalars", "tmp_2"]
991 },
992 {
993 "type" : "expression",
994 "value" : {
995 "type" : "expression",
996 "value" : {
997 "op" : "&",
998 "left" : {
999 "type" : "field",
1000 "value" : ["standard_metadata", "ingress_port"]
1001 },
1002 "right" : {
1003 "type" : "hexstr",
1004 "value" : "0xffffffff"
1005 }
1006 }
1007 }
1008 }
1009 ]
1010 },
1011 {
1012 "op" : "count",
1013 "parameters" : [
1014 {
1015 "type" : "counter_array",
1016 "value" : "ingress_port_counter"
1017 },
1018 {
1019 "type" : "field",
1020 "value" : ["scalars", "tmp_2"]
1021 }
1022 ],
1023 "source_info" : {
1024 "filename" : "include/port_counters.p4",
1025 "line" : 18,
1026 "column" : 4,
1027 "source_fragment" : "count(ingress_port_counter, standard_metadata.ingress_port)"
1028 }
1029 }
1030 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001031 }
1032 ],
1033 "pipelines" : [
1034 {
1035 "name" : "ingress",
1036 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001037 "init_table" : "node_2",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001038 "tables" : [
1039 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001040 "name" : "ingress_pkt",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001041 "id" : 0,
1042 "source_info" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001043 "filename" : "include/packet_io.p4",
1044 "line" : 11,
1045 "column" : 0,
1046 "source_fragment" : "table ingress_pkt { ..."
1047 },
1048 "key" : [],
1049 "match_type" : "exact",
1050 "type" : "simple",
1051 "max_size" : 1024,
1052 "with_counters" : false,
1053 "support_timeout" : false,
1054 "direct_meters" : null,
1055 "action_ids" : [10],
1056 "actions" : ["_packet_out"],
1057 "base_default_next" : "node_4",
1058 "next_tables" : {
1059 "_packet_out" : "node_4"
1060 },
1061 "default_entry" : {
1062 "action_id" : 10,
1063 "action_const" : false,
1064 "action_data" : [],
1065 "action_entry_const" : false
1066 }
1067 },
1068 {
1069 "name" : "table0",
1070 "id" : 1,
1071 "source_info" : {
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001072 "filename" : "wcmp.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001073 "line" : 48,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001074 "column" : 0,
1075 "source_fragment" : "table table0 { ..."
1076 },
1077 "key" : [
1078 {
1079 "match_type" : "ternary",
1080 "target" : ["standard_metadata", "ingress_port"],
1081 "mask" : null
1082 },
1083 {
1084 "match_type" : "ternary",
1085 "target" : ["ethernet", "dstAddr"],
1086 "mask" : null
1087 },
1088 {
1089 "match_type" : "ternary",
1090 "target" : ["ethernet", "srcAddr"],
1091 "mask" : null
1092 },
1093 {
1094 "match_type" : "ternary",
1095 "target" : ["ethernet", "etherType"],
1096 "mask" : null
1097 }
1098 ],
1099 "match_type" : "ternary",
1100 "type" : "simple",
1101 "max_size" : 1024,
1102 "with_counters" : true,
1103 "support_timeout" : false,
1104 "direct_meters" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001105 "action_ids" : [5, 6, 7, 8, 1],
1106 "actions" : ["set_egress_port", "wcmp_group", "send_to_cpu", "_drop", "NoAction"],
1107 "base_default_next" : "node_8",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001108 "next_tables" : {
1109 "wcmp_group" : "wcmp_set_selector_table",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001110 "set_egress_port" : "node_8",
1111 "send_to_cpu" : "node_8",
1112 "_drop" : "node_8",
1113 "NoAction" : "node_8"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001114 },
1115 "default_entry" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001116 "action_id" : 1,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001117 "action_const" : false,
1118 "action_data" : [],
1119 "action_entry_const" : false
1120 }
1121 },
1122 {
1123 "name" : "wcmp_set_selector_table",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001124 "id" : 2,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001125 "source_info" : {
1126 "filename" : "wcmp.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001127 "line" : 64,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001128 "column" : 0,
1129 "source_fragment" : "table wcmp_set_selector_table { ..."
1130 },
1131 "key" : [],
1132 "match_type" : "exact",
1133 "type" : "simple",
1134 "max_size" : 1024,
1135 "with_counters" : false,
1136 "support_timeout" : false,
1137 "direct_meters" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001138 "action_ids" : [4, 3],
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001139 "actions" : ["wcmp_set_selector", "NoAction"],
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001140 "base_default_next" : "node_8",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001141 "next_tables" : {
1142 "wcmp_set_selector" : "wcmp_group_table",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001143 "NoAction" : "node_8"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001144 },
1145 "default_entry" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001146 "action_id" : 3,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001147 "action_const" : false,
1148 "action_data" : [],
1149 "action_entry_const" : false
1150 }
1151 },
1152 {
1153 "name" : "wcmp_group_table",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001154 "id" : 3,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001155 "source_info" : {
1156 "filename" : "wcmp.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001157 "line" : 70,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001158 "column" : 0,
1159 "source_fragment" : "table wcmp_group_table { ..."
1160 },
1161 "key" : [
1162 {
1163 "match_type" : "exact",
1164 "target" : ["wcmp_meta", "groupId"],
1165 "mask" : null
1166 },
1167 {
1168 "match_type" : "lpm",
1169 "target" : ["wcmp_meta", "selector"],
1170 "mask" : null
1171 }
1172 ],
1173 "match_type" : "lpm",
1174 "type" : "simple",
1175 "max_size" : 1024,
1176 "with_counters" : true,
1177 "support_timeout" : false,
1178 "direct_meters" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001179 "action_ids" : [9, 2],
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001180 "actions" : ["set_egress_port", "NoAction"],
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001181 "base_default_next" : "node_8",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001182 "next_tables" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001183 "set_egress_port" : "node_8",
1184 "NoAction" : "node_8"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001185 },
1186 "default_entry" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001187 "action_id" : 2,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001188 "action_const" : false,
1189 "action_data" : [],
1190 "action_entry_const" : false
1191 }
1192 },
1193 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001194 "name" : "ingress_port_count_table",
1195 "id" : 4,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001196 "source_info" : {
1197 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001198 "line" : 25,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001199 "column" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001200 "source_fragment" : "table ingress_port_count_table { ..."
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001201 },
1202 "key" : [],
1203 "match_type" : "exact",
1204 "type" : "simple",
1205 "max_size" : 1024,
1206 "with_counters" : false,
1207 "support_timeout" : false,
1208 "direct_meters" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001209 "action_ids" : [12],
1210 "actions" : ["count_ingress"],
1211 "base_default_next" : "egress_port_count_table",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001212 "next_tables" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001213 "count_ingress" : "egress_port_count_table"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001214 },
1215 "default_entry" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001216 "action_id" : 12,
1217 "action_const" : false,
1218 "action_data" : [],
1219 "action_entry_const" : false
1220 }
1221 },
1222 {
1223 "name" : "egress_port_count_table",
1224 "id" : 5,
1225 "source_info" : {
1226 "filename" : "include/port_counters.p4",
1227 "line" : 30,
1228 "column" : 0,
1229 "source_fragment" : "table egress_port_count_table { ..."
1230 },
1231 "key" : [],
1232 "match_type" : "exact",
1233 "type" : "simple",
1234 "max_size" : 1024,
1235 "with_counters" : false,
1236 "support_timeout" : false,
1237 "direct_meters" : null,
1238 "action_ids" : [11],
1239 "actions" : ["count_egress"],
1240 "base_default_next" : null,
1241 "next_tables" : {
1242 "count_egress" : null
1243 },
1244 "default_entry" : {
1245 "action_id" : 11,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001246 "action_const" : false,
1247 "action_data" : [],
1248 "action_entry_const" : false
1249 }
1250 }
1251 ],
1252 "action_profiles" : [],
1253 "conditionals" : [
1254 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001255 "name" : "node_2",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001256 "id" : 0,
1257 "source_info" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001258 "filename" : "include/packet_io.p4",
1259 "line" : 19,
1260 "column" : 8,
1261 "source_fragment" : "valid(packet_out_hdr)"
1262 },
1263 "expression" : {
1264 "type" : "expression",
1265 "value" : {
1266 "op" : "==",
1267 "left" : {
1268 "type" : "field",
1269 "value" : ["packet_out_hdr", "$valid$"]
1270 },
1271 "right" : {
1272 "type" : "hexstr",
1273 "value" : "0x01"
1274 }
1275 }
1276 },
1277 "true_next" : "ingress_pkt",
1278 "false_next" : "node_4"
1279 },
1280 {
1281 "name" : "node_4",
1282 "id" : 1,
1283 "source_info" : {
1284 "filename" : "wcmp.p4",
1285 "line" : 94,
1286 "column" : 12,
1287 "source_fragment" : "valid(packet_out_hdr)"
1288 },
1289 "expression" : {
1290 "type" : "expression",
1291 "value" : {
1292 "op" : "!=",
1293 "left" : {
1294 "type" : "field",
1295 "value" : ["packet_out_hdr", "$valid$"]
1296 },
1297 "right" : {
1298 "type" : "hexstr",
1299 "value" : "0x01"
1300 }
1301 }
1302 },
1303 "true_next" : "table0",
1304 "false_next" : "node_8"
1305 },
1306 {
1307 "name" : "node_8",
1308 "id" : 2,
1309 "source_info" : {
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001310 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001311 "line" : 36,
1312 "column" : 38,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001313 "source_fragment" : "<"
1314 },
1315 "expression" : {
1316 "type" : "expression",
1317 "value" : {
1318 "op" : "<",
1319 "left" : {
1320 "type" : "field",
1321 "value" : ["standard_metadata", "egress_spec"]
1322 },
1323 "right" : {
1324 "type" : "hexstr",
1325 "value" : "0x00fe"
1326 }
1327 }
1328 },
1329 "false_next" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001330 "true_next" : "ingress_port_count_table"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001331 }
1332 ]
1333 },
1334 {
1335 "name" : "egress",
1336 "id" : 1,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001337 "init_table" : "node_13",
1338 "tables" : [
1339 {
1340 "name" : "egress_pkt",
1341 "id" : 6,
1342 "source_info" : {
1343 "filename" : "include/packet_io.p4",
1344 "line" : 29,
1345 "column" : 0,
1346 "source_fragment" : "table egress_pkt { ..."
1347 },
1348 "key" : [],
1349 "match_type" : "exact",
1350 "type" : "simple",
1351 "max_size" : 1024,
1352 "with_counters" : false,
1353 "support_timeout" : false,
1354 "direct_meters" : null,
1355 "action_ids" : [0],
1356 "actions" : ["add_packet_in_hdr"],
1357 "base_default_next" : null,
1358 "next_tables" : {
1359 "add_packet_in_hdr" : null
1360 },
1361 "default_entry" : {
1362 "action_id" : 0,
1363 "action_const" : false,
1364 "action_data" : [],
1365 "action_entry_const" : false
1366 }
1367 }
1368 ],
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001369 "action_profiles" : [],
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001370 "conditionals" : [
1371 {
1372 "name" : "node_13",
1373 "id" : 3,
1374 "source_info" : {
1375 "filename" : "include/packet_io.p4",
1376 "line" : 40,
1377 "column" : 39,
1378 "source_fragment" : "=="
1379 },
1380 "expression" : {
1381 "type" : "expression",
1382 "value" : {
1383 "op" : "==",
1384 "left" : {
1385 "type" : "field",
1386 "value" : ["standard_metadata", "ingress_port"]
1387 },
1388 "right" : {
1389 "type" : "hexstr",
1390 "value" : "0x00ff"
1391 }
1392 }
1393 },
1394 "false_next" : null,
1395 "true_next" : "egress_pkt"
1396 }
1397 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001398 }
1399 ],
1400 "checksums" : [],
1401 "force_arith" : [],
1402 "extern_instances" : [],
1403 "field_aliases" : [
1404 [
1405 "queueing_metadata.enq_timestamp",
1406 ["standard_metadata", "enq_timestamp"]
1407 ],
1408 [
1409 "queueing_metadata.enq_qdepth",
1410 ["standard_metadata", "enq_qdepth"]
1411 ],
1412 [
1413 "queueing_metadata.deq_timedelta",
1414 ["standard_metadata", "deq_timedelta"]
1415 ],
1416 [
1417 "queueing_metadata.deq_qdepth",
1418 ["standard_metadata", "deq_qdepth"]
1419 ],
1420 [
1421 "intrinsic_metadata.ingress_global_timestamp",
1422 ["standard_metadata", "ingress_global_timestamp"]
1423 ],
1424 [
1425 "intrinsic_metadata.lf_field_list",
1426 ["standard_metadata", "lf_field_list"]
1427 ],
1428 [
1429 "intrinsic_metadata.mcast_grp",
1430 ["standard_metadata", "mcast_grp"]
1431 ],
1432 [
1433 "intrinsic_metadata.resubmit_flag",
1434 ["standard_metadata", "resubmit_flag"]
1435 ],
1436 [
1437 "intrinsic_metadata.egress_rid",
1438 ["standard_metadata", "egress_rid"]
1439 ]
1440 ]
1441}