blob: be2bdec9137ae627bf0c4edfdbc354734aa10a19 [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 Cascone465ec2c2017-09-12 19:54:43 +020012 ["tmp", 32, false],
13 ["tmp_0", 32, false]
Carmelo Casconefc3776d2017-08-21 23:17:22 +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 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +020044 "name" : "packet_in_t",
Carmelo Casconefc3776d2017-08-21 23:17:22 +020045 "id" : 3,
46 "fields" : [
Carmelo Cascone16de6db2017-08-22 00:27:57 +020047 ["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" : [
Carmelo Casconefc3776d2017-08-21 23:17:22 +020063 ["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",
Carmelo Cascone16de6db2017-08-22 00:27:57 +020078 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +020079 "fields" : [
80 ["srcPort", 16, false],
81 ["dstPort", 16, false],
82 ["length_", 16, false],
83 ["checksum", 16, false]
84 ]
85 },
86 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +020087 "name" : "wcmp_meta_t",
Carmelo Cascone16de6db2017-08-22 00:27:57 +020088 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +020089 "fields" : [
90 ["groupId", 16, false],
91 ["numBits", 8, false],
92 ["selector", 32, false]
93 ]
94 },
95 {
96 "name" : "standard_metadata",
Carmelo Cascone16de6db2017-08-22 00:27:57 +020097 "id" : 8,
Carmelo Casconefc3776d2017-08-21 23:17:22 +020098 "fields" : [
99 ["ingress_port", 9, false],
100 ["egress_spec", 9, false],
101 ["egress_port", 9, false],
102 ["clone_spec", 32, false],
103 ["instance_type", 32, false],
104 ["drop", 1, false],
105 ["recirculate_port", 16, false],
106 ["packet_length", 32, false],
107 ["enq_timestamp", 32, false],
108 ["enq_qdepth", 19, false],
109 ["deq_timedelta", 32, false],
110 ["deq_qdepth", 19, false],
111 ["ingress_global_timestamp", 48, false],
112 ["lf_field_list", 32, false],
113 ["mcast_grp", 16, false],
114 ["resubmit_flag", 1, false],
115 ["egress_rid", 16, false],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200116 ["_padding_1", 5, false]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200117 ]
118 }
119 ],
120 "headers" : [
121 {
122 "name" : "scalars",
123 "id" : 0,
124 "header_type" : "scalars_0",
125 "metadata" : true,
126 "pi_omit" : true
127 },
128 {
129 "name" : "standard_metadata",
130 "id" : 1,
131 "header_type" : "standard_metadata",
132 "metadata" : true,
133 "pi_omit" : true
134 },
135 {
136 "name" : "ethernet",
137 "id" : 2,
138 "header_type" : "ethernet_t",
139 "metadata" : false,
140 "pi_omit" : true
141 },
142 {
143 "name" : "ipv4",
144 "id" : 3,
145 "header_type" : "ipv4_t",
146 "metadata" : false,
147 "pi_omit" : true
148 },
149 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200150 "name" : "packet_in_hdr",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200151 "id" : 4,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200152 "header_type" : "packet_in_t",
153 "metadata" : false,
154 "pi_omit" : true
155 },
156 {
157 "name" : "packet_out_hdr",
158 "id" : 5,
159 "header_type" : "packet_out_t",
160 "metadata" : false,
161 "pi_omit" : true
162 },
163 {
164 "name" : "tcp",
165 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200166 "header_type" : "tcp_t",
167 "metadata" : false,
168 "pi_omit" : true
169 },
170 {
171 "name" : "udp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200172 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200173 "header_type" : "udp_t",
174 "metadata" : false,
175 "pi_omit" : true
176 },
177 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200178 "name" : "wcmp_meta",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200179 "id" : 8,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200180 "header_type" : "wcmp_meta_t",
181 "metadata" : true,
182 "pi_omit" : true
183 }
184 ],
185 "header_stacks" : [],
186 "header_union_types" : [],
187 "header_unions" : [],
188 "header_union_stacks" : [],
189 "field_lists" : [],
190 "errors" : [
191 ["NoError", 1],
192 ["PacketTooShort", 2],
193 ["NoMatch", 3],
194 ["StackOutOfBounds", 4],
195 ["HeaderTooShort", 5],
196 ["ParserTimeout", 6]
197 ],
198 "enums" : [],
199 "parsers" : [
200 {
201 "name" : "parser",
202 "id" : 0,
203 "init_state" : "start",
204 "parse_states" : [
205 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200206 "name" : "default_parser",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200207 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200208 "parser_ops" : [],
209 "transitions" : [
210 {
211 "value" : "0x00ff",
212 "mask" : null,
213 "next_state" : "parse_pkt_out"
214 },
215 {
216 "value" : "default",
217 "mask" : null,
218 "next_state" : "parse_ethernet"
219 }
220 ],
221 "transition_key" : [
222 {
223 "type" : "field",
224 "value" : ["standard_metadata", "ingress_port"]
225 }
226 ]
227 },
228 {
229 "name" : "parse_ethernet",
230 "id" : 1,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200231 "parser_ops" : [
232 {
233 "parameters" : [
234 {
235 "type" : "regular",
236 "value" : "ethernet"
237 }
238 ],
239 "op" : "extract"
240 }
241 ],
242 "transitions" : [
243 {
244 "value" : "0x0800",
245 "mask" : null,
246 "next_state" : "parse_ipv4"
247 },
248 {
249 "value" : "default",
250 "mask" : null,
251 "next_state" : null
252 }
253 ],
254 "transition_key" : [
255 {
256 "type" : "field",
257 "value" : ["ethernet", "etherType"]
258 }
259 ]
260 },
261 {
262 "name" : "parse_ipv4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200263 "id" : 2,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200264 "parser_ops" : [
265 {
266 "parameters" : [
267 {
268 "type" : "regular",
269 "value" : "ipv4"
270 }
271 ],
272 "op" : "extract"
273 }
274 ],
275 "transitions" : [
276 {
277 "value" : "0x000006",
278 "mask" : null,
279 "next_state" : "parse_tcp"
280 },
281 {
282 "value" : "0x000011",
283 "mask" : null,
284 "next_state" : "parse_udp"
285 },
286 {
287 "value" : "default",
288 "mask" : null,
289 "next_state" : null
290 }
291 ],
292 "transition_key" : [
293 {
294 "type" : "field",
295 "value" : ["ipv4", "fragOffset"]
296 },
297 {
298 "type" : "field",
299 "value" : ["ipv4", "protocol"]
300 }
301 ]
302 },
303 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200304 "name" : "parse_pkt_in",
305 "id" : 3,
306 "parser_ops" : [
307 {
308 "parameters" : [
309 {
310 "type" : "regular",
311 "value" : "packet_in_hdr"
312 }
313 ],
314 "op" : "extract"
315 }
316 ],
317 "transitions" : [
318 {
319 "value" : "default",
320 "mask" : null,
321 "next_state" : "parse_ethernet"
322 }
323 ],
324 "transition_key" : []
325 },
326 {
327 "name" : "parse_pkt_out",
328 "id" : 4,
329 "parser_ops" : [
330 {
331 "parameters" : [
332 {
333 "type" : "regular",
334 "value" : "packet_out_hdr"
335 }
336 ],
337 "op" : "extract"
338 }
339 ],
340 "transitions" : [
341 {
342 "value" : "default",
343 "mask" : null,
344 "next_state" : "parse_ethernet"
345 }
346 ],
347 "transition_key" : []
348 },
349 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200350 "name" : "parse_tcp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200351 "id" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200352 "parser_ops" : [
353 {
354 "parameters" : [
355 {
356 "type" : "regular",
357 "value" : "tcp"
358 }
359 ],
360 "op" : "extract"
361 }
362 ],
363 "transitions" : [
364 {
365 "value" : "default",
366 "mask" : null,
367 "next_state" : null
368 }
369 ],
370 "transition_key" : []
371 },
372 {
373 "name" : "parse_udp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200374 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200375 "parser_ops" : [
376 {
377 "parameters" : [
378 {
379 "type" : "regular",
380 "value" : "udp"
381 }
382 ],
383 "op" : "extract"
384 }
385 ],
386 "transitions" : [
387 {
388 "value" : "default",
389 "mask" : null,
390 "next_state" : null
391 }
392 ],
393 "transition_key" : []
394 },
395 {
396 "name" : "start",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200397 "id" : 7,
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200398 "parser_ops" : [],
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200399 "transitions" : [
400 {
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200401 "value" : "0x00ff",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200402 "mask" : null,
403 "next_state" : "parse_pkt_in"
404 },
405 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200406 "value" : "default",
407 "mask" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200408 "next_state" : "default_parser"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200409 }
410 ],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200411 "transition_key" : [
412 {
413 "type" : "field",
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200414 "value" : ["standard_metadata", "egress_spec"]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200415 }
416 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200417 }
418 ]
419 }
420 ],
421 "deparsers" : [
422 {
423 "name" : "deparser",
424 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200425 "order" : ["packet_out_hdr", "packet_in_hdr", "ethernet", "ipv4", "udp", "tcp"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200426 }
427 ],
428 "meter_arrays" : [],
429 "counter_arrays" : [
430 {
431 "name" : "table0_counter",
432 "id" : 0,
433 "is_direct" : true,
434 "binding" : "table0"
435 },
436 {
437 "name" : "wcmp_group_table_counter",
438 "id" : 1,
439 "is_direct" : true,
440 "binding" : "wcmp_group_table"
441 },
442 {
443 "name" : "egress_port_counter",
444 "id" : 2,
Brian O'Connora6862e02017-09-08 01:17:39 -0700445 "size" : 254,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200446 "is_direct" : false
447 },
448 {
449 "name" : "ingress_port_counter",
450 "id" : 3,
Brian O'Connora6862e02017-09-08 01:17:39 -0700451 "size" : 254,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200452 "is_direct" : false
453 }
454 ],
455 "register_arrays" : [],
456 "calculations" : [
457 {
458 "name" : "calc",
459 "id" : 0,
460 "algo" : "crc32",
461 "input" : [
462 {
463 "type" : "field",
464 "value" : ["ipv4", "srcAddr"]
465 },
466 {
467 "type" : "field",
468 "value" : ["ipv4", "dstAddr"]
469 },
470 {
471 "type" : "field",
472 "value" : ["ipv4", "protocol"]
473 },
474 {
475 "type" : "field",
476 "value" : ["tcp", "srcPort"]
477 },
478 {
479 "type" : "field",
480 "value" : ["tcp", "dstPort"]
481 },
482 {
483 "type" : "field",
484 "value" : ["udp", "srcPort"]
485 },
486 {
487 "type" : "field",
488 "value" : ["udp", "dstPort"]
489 }
490 ]
491 }
492 ],
493 "learn_lists" : [],
494 "actions" : [
495 {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200496 "name" : "NoAction",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200497 "id" : 0,
498 "runtime_data" : [],
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200499 "primitives" : []
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200500 },
501 {
502 "name" : "NoAction",
503 "id" : 1,
504 "runtime_data" : [],
505 "primitives" : []
506 },
507 {
508 "name" : "NoAction",
509 "id" : 2,
510 "runtime_data" : [],
511 "primitives" : []
512 },
513 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200514 "name" : "wcmp_set_selector",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200515 "id" : 3,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200516 "runtime_data" : [],
517 "primitives" : [
518 {
519 "op" : "assign",
520 "parameters" : [
521 {
522 "type" : "field",
523 "value" : ["wcmp_meta", "selector"]
524 },
525 {
526 "type" : "expression",
527 "value" : {
528 "type" : "expression",
529 "value" : {
530 "op" : "&",
531 "left" : {
532 "type" : "expression",
533 "value" : {
534 "op" : "&",
535 "left" : {
536 "type" : "expression",
537 "value" : {
538 "op" : "<<",
539 "left" : {
540 "type" : "expression",
541 "value" : {
542 "op" : "&",
543 "left" : {
544 "type" : "expression",
545 "value" : {
546 "op" : "+",
547 "left" : {
548 "type" : "expression",
549 "value" : {
550 "op" : "&",
551 "left" : {
552 "type" : "expression",
553 "value" : {
554 "op" : "<<",
555 "left" : {
556 "type" : "hexstr",
557 "value" : "0x01"
558 },
559 "right" : {
560 "type" : "field",
561 "value" : ["wcmp_meta", "numBits"]
562 }
563 }
564 },
565 "right" : {
566 "type" : "hexstr",
567 "value" : "0xff"
568 }
569 }
570 },
571 "right" : {
572 "type" : "hexstr",
573 "value" : "0xff"
574 }
575 }
576 },
577 "right" : {
578 "type" : "hexstr",
579 "value" : "0xff"
580 }
581 }
582 },
583 "right" : {
584 "type" : "expression",
585 "value" : {
586 "op" : "&",
587 "left" : {
588 "type" : "expression",
589 "value" : {
590 "op" : "-",
591 "left" : {
592 "type" : "hexstr",
593 "value" : "0x20"
594 },
595 "right" : {
596 "type" : "field",
597 "value" : ["wcmp_meta", "numBits"]
598 }
599 }
600 },
601 "right" : {
602 "type" : "hexstr",
603 "value" : "0xff"
604 }
605 }
606 }
607 }
608 },
609 "right" : {
610 "type" : "hexstr",
611 "value" : "0xff"
612 }
613 }
614 },
615 "right" : {
616 "type" : "hexstr",
617 "value" : "0xffffffff"
618 }
619 }
620 }
621 }
622 ],
623 "source_info" : {
624 "filename" : "wcmp.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200625 "line" : 44,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200626 "column" : 4,
627 "source_fragment" : "modify_field(wcmp_meta.selector, ..."
628 }
629 }
630 ]
631 },
632 {
633 "name" : "set_egress_port",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200634 "id" : 4,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200635 "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" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200656 "line" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200657 "column" : 23,
658 "source_fragment" : "port) { ..."
659 }
660 }
661 ]
662 },
663 {
664 "name" : "wcmp_group",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200665 "id" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200666 "runtime_data" : [
667 {
668 "name" : "groupId",
669 "bitwidth" : 16
670 }
671 ],
672 "primitives" : [
673 {
674 "op" : "assign",
675 "parameters" : [
676 {
677 "type" : "field",
678 "value" : ["wcmp_meta", "groupId"]
679 },
680 {
681 "type" : "runtime_data",
682 "value" : 0
683 }
684 ],
685 "source_info" : {
686 "filename" : "wcmp.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200687 "line" : 38,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200688 "column" : 18,
689 "source_fragment" : "groupId) { ..."
690 }
691 },
692 {
693 "op" : "modify_field_with_hash_based_offset",
694 "parameters" : [
695 {
696 "type" : "field",
697 "value" : ["wcmp_meta", "numBits"]
698 },
699 {
700 "type" : "hexstr",
701 "value" : "0x00000002"
702 },
703 {
704 "type" : "calculation",
705 "value" : "calc"
706 },
707 {
708 "type" : "hexstr",
709 "value" : "0x000000000000001e"
710 }
711 ],
712 "source_info" : {
713 "filename" : "wcmp.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200714 "line" : 40,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200715 "column" : 4,
716 "source_fragment" : "modify_field_with_hash_based_offset(wcmp_meta.numBits, 2, wcmp_hash, (32 - 2))"
717 }
718 }
719 ]
720 },
721 {
722 "name" : "send_to_cpu",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200723 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200724 "runtime_data" : [],
725 "primitives" : [
726 {
727 "op" : "assign",
728 "parameters" : [
729 {
730 "type" : "field",
731 "value" : ["standard_metadata", "egress_spec"]
732 },
733 {
734 "type" : "hexstr",
735 "value" : "0x00ff"
736 }
737 ],
738 "source_info" : {
739 "filename" : "include/actions.p4",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200740 "line" : 18,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200741 "column" : 4,
742 "source_fragment" : "modify_field(standard_metadata.egress_spec, 255)"
743 }
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200744 },
745 {
746 "op" : "add_header",
747 "parameters" : [
748 {
749 "type" : "header",
750 "value" : "packet_in_hdr"
751 }
752 ],
753 "source_info" : {
754 "filename" : "include/actions.p4",
755 "line" : 19,
756 "column" : 4,
757 "source_fragment" : "add_header(packet_in_hdr)"
758 }
759 },
760 {
761 "op" : "assign",
762 "parameters" : [
763 {
764 "type" : "field",
765 "value" : ["packet_in_hdr", "ingress_port"]
766 },
767 {
768 "type" : "field",
769 "value" : ["standard_metadata", "ingress_port"]
770 }
771 ],
772 "source_info" : {
773 "filename" : "include/actions.p4",
774 "line" : 20,
775 "column" : 4,
776 "source_fragment" : "modify_field(packet_in_hdr.ingress_port, standard_metadata.ingress_port)"
777 }
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200778 }
779 ]
780 },
781 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200782 "name" : "_drop",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200783 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200784 "runtime_data" : [],
785 "primitives" : [
786 {
787 "op" : "assign",
788 "parameters" : [
789 {
790 "type" : "field",
791 "value" : ["standard_metadata", "egress_spec"]
792 },
793 {
794 "type" : "hexstr",
795 "value" : "0x01ff"
796 }
797 ],
798 "source_info" : {
799 "filename" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200800 "line" : 13,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200801 "column" : 4,
802 "source_fragment" : "modify_field(standard_metadata.egress_spec, 511)"
803 }
804 }
805 ]
806 },
807 {
808 "name" : "set_egress_port",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200809 "id" : 8,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200810 "runtime_data" : [
811 {
812 "name" : "port",
813 "bitwidth" : 9
814 }
815 ],
816 "primitives" : [
817 {
818 "op" : "assign",
819 "parameters" : [
820 {
821 "type" : "field",
822 "value" : ["standard_metadata", "egress_spec"]
823 },
824 {
825 "type" : "runtime_data",
826 "value" : 0
827 }
828 ],
829 "source_info" : {
830 "filename" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200831 "line" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200832 "column" : 23,
833 "source_fragment" : "port) { ..."
834 }
835 }
836 ]
837 },
838 {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200839 "name" : "_process_packet_out",
840 "id" : 9,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200841 "runtime_data" : [],
842 "primitives" : [
843 {
844 "op" : "assign",
845 "parameters" : [
846 {
847 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200848 "value" : ["standard_metadata", "egress_spec"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200849 },
850 {
851 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200852 "value" : ["packet_out_hdr", "egress_port"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200853 }
854 ],
855 "source_info" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200856 "filename" : "include/packet_io.p4",
857 "line" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200858 "column" : 4,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200859 "source_fragment" : "modify_field(standard_metadata.egress_spec, packet_out_hdr.egress_port)"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200860 }
861 },
862 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200863 "op" : "remove_header",
864 "parameters" : [
865 {
866 "type" : "header",
867 "value" : "packet_out_hdr"
868 }
869 ],
870 "source_info" : {
871 "filename" : "include/packet_io.p4",
872 "line" : 8,
873 "column" : 4,
874 "source_fragment" : "remove_header(packet_out_hdr)"
875 }
876 }
877 ]
878 },
879 {
880 "name" : "count_egress",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200881 "id" : 10,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200882 "runtime_data" : [],
883 "primitives" : [
884 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200885 "op" : "assign",
886 "parameters" : [
887 {
888 "type" : "field",
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200889 "value" : ["scalars", "tmp"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200890 },
891 {
892 "type" : "expression",
893 "value" : {
894 "type" : "expression",
895 "value" : {
896 "op" : "&",
897 "left" : {
898 "type" : "field",
899 "value" : ["standard_metadata", "egress_spec"]
900 },
901 "right" : {
902 "type" : "hexstr",
903 "value" : "0xffffffff"
904 }
905 }
906 }
907 }
908 ]
909 },
910 {
911 "op" : "count",
912 "parameters" : [
913 {
914 "type" : "counter_array",
915 "value" : "egress_port_counter"
916 },
917 {
918 "type" : "field",
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200919 "value" : ["scalars", "tmp"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200920 }
921 ],
922 "source_info" : {
923 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200924 "line" : 22,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200925 "column" : 4,
926 "source_fragment" : "count(egress_port_counter, standard_metadata.egress_spec)"
927 }
928 }
929 ]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200930 },
931 {
932 "name" : "count_ingress",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200933 "id" : 11,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200934 "runtime_data" : [],
935 "primitives" : [
936 {
937 "op" : "assign",
938 "parameters" : [
939 {
940 "type" : "field",
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200941 "value" : ["scalars", "tmp_0"]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200942 },
943 {
944 "type" : "expression",
945 "value" : {
946 "type" : "expression",
947 "value" : {
948 "op" : "&",
949 "left" : {
950 "type" : "field",
951 "value" : ["standard_metadata", "ingress_port"]
952 },
953 "right" : {
954 "type" : "hexstr",
955 "value" : "0xffffffff"
956 }
957 }
958 }
959 }
960 ]
961 },
962 {
963 "op" : "count",
964 "parameters" : [
965 {
966 "type" : "counter_array",
967 "value" : "ingress_port_counter"
968 },
969 {
970 "type" : "field",
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200971 "value" : ["scalars", "tmp_0"]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200972 }
973 ],
974 "source_info" : {
975 "filename" : "include/port_counters.p4",
976 "line" : 18,
977 "column" : 4,
978 "source_fragment" : "count(ingress_port_counter, standard_metadata.ingress_port)"
979 }
980 }
981 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200982 }
983 ],
984 "pipelines" : [
985 {
986 "name" : "ingress",
987 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200988 "init_table" : "node_2",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200989 "tables" : [
990 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200991 "name" : "table0",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200992 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200993 "source_info" : {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200994 "filename" : "wcmp.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200995 "line" : 48,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200996 "column" : 0,
997 "source_fragment" : "table table0 { ..."
998 },
999 "key" : [
1000 {
1001 "match_type" : "ternary",
1002 "target" : ["standard_metadata", "ingress_port"],
1003 "mask" : null
1004 },
1005 {
1006 "match_type" : "ternary",
1007 "target" : ["ethernet", "dstAddr"],
1008 "mask" : null
1009 },
1010 {
1011 "match_type" : "ternary",
1012 "target" : ["ethernet", "srcAddr"],
1013 "mask" : null
1014 },
1015 {
1016 "match_type" : "ternary",
1017 "target" : ["ethernet", "etherType"],
1018 "mask" : null
1019 }
1020 ],
1021 "match_type" : "ternary",
1022 "type" : "simple",
1023 "max_size" : 1024,
1024 "with_counters" : true,
1025 "support_timeout" : false,
1026 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001027 "action_ids" : [4, 5, 6, 7, 0],
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001028 "actions" : ["set_egress_port", "wcmp_group", "send_to_cpu", "_drop", "NoAction"],
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001029 "base_default_next" : "node_6",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001030 "next_tables" : {
1031 "wcmp_group" : "wcmp_set_selector_table",
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001032 "set_egress_port" : "node_6",
1033 "send_to_cpu" : "node_6",
1034 "_drop" : "node_6",
1035 "NoAction" : "node_6"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001036 },
1037 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001038 "action_id" : 0,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001039 "action_const" : false,
1040 "action_data" : [],
1041 "action_entry_const" : false
1042 }
1043 },
1044 {
1045 "name" : "wcmp_set_selector_table",
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001046 "id" : 1,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001047 "source_info" : {
1048 "filename" : "wcmp.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001049 "line" : 64,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001050 "column" : 0,
1051 "source_fragment" : "table wcmp_set_selector_table { ..."
1052 },
1053 "key" : [],
1054 "match_type" : "exact",
1055 "type" : "simple",
1056 "max_size" : 1024,
1057 "with_counters" : false,
1058 "support_timeout" : false,
1059 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001060 "action_ids" : [3, 2],
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001061 "actions" : ["wcmp_set_selector", "NoAction"],
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001062 "base_default_next" : "node_6",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001063 "next_tables" : {
1064 "wcmp_set_selector" : "wcmp_group_table",
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001065 "NoAction" : "node_6"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001066 },
1067 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001068 "action_id" : 2,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001069 "action_const" : false,
1070 "action_data" : [],
1071 "action_entry_const" : false
1072 }
1073 },
1074 {
1075 "name" : "wcmp_group_table",
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001076 "id" : 2,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001077 "source_info" : {
1078 "filename" : "wcmp.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001079 "line" : 70,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001080 "column" : 0,
1081 "source_fragment" : "table wcmp_group_table { ..."
1082 },
1083 "key" : [
1084 {
1085 "match_type" : "exact",
1086 "target" : ["wcmp_meta", "groupId"],
1087 "mask" : null
1088 },
1089 {
1090 "match_type" : "lpm",
1091 "target" : ["wcmp_meta", "selector"],
1092 "mask" : null
1093 }
1094 ],
1095 "match_type" : "lpm",
1096 "type" : "simple",
1097 "max_size" : 1024,
1098 "with_counters" : true,
1099 "support_timeout" : false,
1100 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001101 "action_ids" : [8, 1],
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001102 "actions" : ["set_egress_port", "NoAction"],
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001103 "base_default_next" : "node_6",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001104 "next_tables" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001105 "set_egress_port" : "node_6",
1106 "NoAction" : "node_6"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001107 },
1108 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001109 "action_id" : 1,
1110 "action_const" : false,
1111 "action_data" : [],
1112 "action_entry_const" : false
1113 }
1114 },
1115 {
1116 "name" : "process_packet_out_table",
1117 "id" : 3,
1118 "source_info" : {
1119 "filename" : "include/packet_io.p4",
1120 "line" : 11,
1121 "column" : 0,
1122 "source_fragment" : "table process_packet_out_table { ..."
1123 },
1124 "key" : [],
1125 "match_type" : "exact",
1126 "type" : "simple",
1127 "max_size" : 1024,
1128 "with_counters" : false,
1129 "support_timeout" : false,
1130 "direct_meters" : null,
1131 "action_ids" : [9],
1132 "actions" : ["_process_packet_out"],
1133 "base_default_next" : "node_8",
1134 "next_tables" : {
1135 "_process_packet_out" : "node_8"
1136 },
1137 "default_entry" : {
1138 "action_id" : 9,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001139 "action_const" : false,
1140 "action_data" : [],
1141 "action_entry_const" : false
1142 }
1143 },
1144 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001145 "name" : "ingress_port_count_table",
1146 "id" : 4,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001147 "source_info" : {
1148 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001149 "line" : 25,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001150 "column" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001151 "source_fragment" : "table ingress_port_count_table { ..."
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001152 },
1153 "key" : [],
1154 "match_type" : "exact",
1155 "type" : "simple",
1156 "max_size" : 1024,
1157 "with_counters" : false,
1158 "support_timeout" : false,
1159 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001160 "action_ids" : [11],
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001161 "actions" : ["count_ingress"],
1162 "base_default_next" : "egress_port_count_table",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001163 "next_tables" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001164 "count_ingress" : "egress_port_count_table"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001165 },
1166 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001167 "action_id" : 11,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001168 "action_const" : false,
1169 "action_data" : [],
1170 "action_entry_const" : false
1171 }
1172 },
1173 {
1174 "name" : "egress_port_count_table",
1175 "id" : 5,
1176 "source_info" : {
1177 "filename" : "include/port_counters.p4",
1178 "line" : 30,
1179 "column" : 0,
1180 "source_fragment" : "table egress_port_count_table { ..."
1181 },
1182 "key" : [],
1183 "match_type" : "exact",
1184 "type" : "simple",
1185 "max_size" : 1024,
1186 "with_counters" : false,
1187 "support_timeout" : false,
1188 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001189 "action_ids" : [10],
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001190 "actions" : ["count_egress"],
1191 "base_default_next" : null,
1192 "next_tables" : {
1193 "count_egress" : null
1194 },
1195 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001196 "action_id" : 10,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001197 "action_const" : false,
1198 "action_data" : [],
1199 "action_entry_const" : false
1200 }
1201 }
1202 ],
1203 "action_profiles" : [],
1204 "conditionals" : [
1205 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001206 "name" : "node_2",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001207 "id" : 0,
1208 "source_info" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001209 "filename" : "wcmp.p4",
1210 "line" : 93,
1211 "column" : 12,
1212 "source_fragment" : "valid(packet_out_hdr)"
1213 },
1214 "expression" : {
1215 "type" : "expression",
1216 "value" : {
1217 "op" : "!=",
1218 "left" : {
1219 "type" : "field",
1220 "value" : ["packet_out_hdr", "$valid$"]
1221 },
1222 "right" : {
1223 "type" : "hexstr",
1224 "value" : "0x01"
1225 }
1226 }
1227 },
1228 "true_next" : "table0",
1229 "false_next" : "node_6"
1230 },
1231 {
1232 "name" : "node_6",
1233 "id" : 1,
1234 "source_info" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001235 "filename" : "include/packet_io.p4",
1236 "line" : 19,
1237 "column" : 8,
1238 "source_fragment" : "valid(packet_out_hdr)"
1239 },
1240 "expression" : {
1241 "type" : "expression",
1242 "value" : {
1243 "op" : "==",
1244 "left" : {
1245 "type" : "field",
1246 "value" : ["packet_out_hdr", "$valid$"]
1247 },
1248 "right" : {
1249 "type" : "hexstr",
1250 "value" : "0x01"
1251 }
1252 }
1253 },
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001254 "true_next" : "process_packet_out_table",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001255 "false_next" : "node_8"
1256 },
1257 {
1258 "name" : "node_8",
1259 "id" : 2,
1260 "source_info" : {
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001261 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001262 "line" : 36,
1263 "column" : 38,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001264 "source_fragment" : "<"
1265 },
1266 "expression" : {
1267 "type" : "expression",
1268 "value" : {
1269 "op" : "<",
1270 "left" : {
1271 "type" : "field",
1272 "value" : ["standard_metadata", "egress_spec"]
1273 },
1274 "right" : {
1275 "type" : "hexstr",
Brian O'Connora6862e02017-09-08 01:17:39 -07001276 "value" : "0x00fe"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001277 }
1278 }
1279 },
1280 "false_next" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001281 "true_next" : "ingress_port_count_table"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001282 }
1283 ]
1284 },
1285 {
1286 "name" : "egress",
1287 "id" : 1,
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001288 "init_table" : null,
1289 "tables" : [],
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001290 "action_profiles" : [],
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001291 "conditionals" : []
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001292 }
1293 ],
1294 "checksums" : [],
1295 "force_arith" : [],
1296 "extern_instances" : [],
1297 "field_aliases" : [
1298 [
1299 "queueing_metadata.enq_timestamp",
1300 ["standard_metadata", "enq_timestamp"]
1301 ],
1302 [
1303 "queueing_metadata.enq_qdepth",
1304 ["standard_metadata", "enq_qdepth"]
1305 ],
1306 [
1307 "queueing_metadata.deq_timedelta",
1308 ["standard_metadata", "deq_timedelta"]
1309 ],
1310 [
1311 "queueing_metadata.deq_qdepth",
1312 ["standard_metadata", "deq_qdepth"]
1313 ],
1314 [
1315 "intrinsic_metadata.ingress_global_timestamp",
1316 ["standard_metadata", "ingress_global_timestamp"]
1317 ],
1318 [
1319 "intrinsic_metadata.lf_field_list",
1320 ["standard_metadata", "lf_field_list"]
1321 ],
1322 [
1323 "intrinsic_metadata.mcast_grp",
1324 ["standard_metadata", "mcast_grp"]
1325 ],
1326 [
1327 "intrinsic_metadata.resubmit_flag",
1328 ["standard_metadata", "resubmit_flag"]
1329 ],
1330 [
1331 "intrinsic_metadata.egress_rid",
1332 ["standard_metadata", "egress_rid"]
1333 ]
1334 ]
1335}