blob: 500bf47a122d63aa3ecced6de8985efb2ed3a37b [file] [log] [blame]
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001{
2 "program" : "ecmp.p4",
3 "__meta__" : {
4 "version" : [2, 7],
5 "compiler" : "https://github.com/p4lang/p4c"
6 },
7 "header_types" : [
8 {
9 "name" : "scalars_0",
10 "id" : 0,
11 "fields" : [
Carmelo Casconef2ac7202017-09-08 00:57:44 +020012 ["tmp_0", 112, false],
13 ["tmp", 16, false],
Carmelo Cascone16de6db2017-08-22 00:27:57 +020014 ["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 {
89 "name" : "ecmp_metadata_t",
Carmelo Cascone16de6db2017-08-22 00:27:57 +020090 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +020091 "fields" : [
92 ["groupId", 16, false],
Carmelo Cascone16de6db2017-08-22 00:27:57 +020093 ["selector", 16, false]
Carmelo Casconefc3776d2017-08-21 23:17:22 +020094 ]
95 },
96 {
97 "name" : "standard_metadata",
Carmelo Cascone16de6db2017-08-22 00:27:57 +020098 "id" : 8,
Carmelo Casconefc3776d2017-08-21 23:17:22 +020099 "fields" : [
100 ["ingress_port", 9, false],
101 ["egress_spec", 9, false],
102 ["egress_port", 9, false],
103 ["clone_spec", 32, false],
104 ["instance_type", 32, false],
105 ["drop", 1, false],
106 ["recirculate_port", 16, false],
107 ["packet_length", 32, false],
108 ["enq_timestamp", 32, false],
109 ["enq_qdepth", 19, false],
110 ["deq_timedelta", 32, false],
111 ["deq_qdepth", 19, false],
112 ["ingress_global_timestamp", 48, false],
113 ["lf_field_list", 32, false],
114 ["mcast_grp", 16, false],
115 ["resubmit_flag", 1, false],
116 ["egress_rid", 16, false],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200117 ["_padding_1", 5, false]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200118 ]
119 }
120 ],
121 "headers" : [
122 {
123 "name" : "scalars",
124 "id" : 0,
125 "header_type" : "scalars_0",
126 "metadata" : true,
127 "pi_omit" : true
128 },
129 {
130 "name" : "standard_metadata",
131 "id" : 1,
132 "header_type" : "standard_metadata",
133 "metadata" : true,
134 "pi_omit" : true
135 },
136 {
137 "name" : "ethernet",
138 "id" : 2,
139 "header_type" : "ethernet_t",
140 "metadata" : false,
141 "pi_omit" : true
142 },
143 {
144 "name" : "ipv4",
145 "id" : 3,
146 "header_type" : "ipv4_t",
147 "metadata" : false,
148 "pi_omit" : true
149 },
150 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200151 "name" : "packet_in_hdr",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200152 "id" : 4,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200153 "header_type" : "packet_in_t",
154 "metadata" : false,
155 "pi_omit" : true
156 },
157 {
158 "name" : "packet_out_hdr",
159 "id" : 5,
160 "header_type" : "packet_out_t",
161 "metadata" : false,
162 "pi_omit" : true
163 },
164 {
165 "name" : "tcp",
166 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200167 "header_type" : "tcp_t",
168 "metadata" : false,
169 "pi_omit" : true
170 },
171 {
172 "name" : "udp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200173 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200174 "header_type" : "udp_t",
175 "metadata" : false,
176 "pi_omit" : true
177 },
178 {
179 "name" : "ecmp_metadata",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200180 "id" : 8,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200181 "header_type" : "ecmp_metadata_t",
182 "metadata" : true,
183 "pi_omit" : true
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200184 }
185 ],
186 "header_stacks" : [],
187 "header_union_types" : [],
188 "header_unions" : [],
189 "header_union_stacks" : [],
190 "field_lists" : [],
191 "errors" : [
192 ["NoError", 1],
193 ["PacketTooShort", 2],
194 ["NoMatch", 3],
195 ["StackOutOfBounds", 4],
196 ["HeaderTooShort", 5],
197 ["ParserTimeout", 6]
198 ],
199 "enums" : [],
200 "parsers" : [
201 {
202 "name" : "parser",
203 "id" : 0,
204 "init_state" : "start",
205 "parse_states" : [
206 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200207 "name" : "default_parser",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200208 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200209 "parser_ops" : [],
210 "transitions" : [
211 {
212 "value" : "0x00ff",
213 "mask" : null,
214 "next_state" : "parse_pkt_out"
215 },
216 {
217 "value" : "default",
218 "mask" : null,
219 "next_state" : "parse_ethernet"
220 }
221 ],
222 "transition_key" : [
223 {
224 "type" : "field",
225 "value" : ["standard_metadata", "ingress_port"]
226 }
227 ]
228 },
229 {
230 "name" : "parse_ethernet",
231 "id" : 1,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200232 "parser_ops" : [
233 {
234 "parameters" : [
235 {
236 "type" : "regular",
237 "value" : "ethernet"
238 }
239 ],
240 "op" : "extract"
241 }
242 ],
243 "transitions" : [
244 {
245 "value" : "0x0800",
246 "mask" : null,
247 "next_state" : "parse_ipv4"
248 },
249 {
250 "value" : "default",
251 "mask" : null,
252 "next_state" : null
253 }
254 ],
255 "transition_key" : [
256 {
257 "type" : "field",
258 "value" : ["ethernet", "etherType"]
259 }
260 ]
261 },
262 {
263 "name" : "parse_ipv4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200264 "id" : 2,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200265 "parser_ops" : [
266 {
267 "parameters" : [
268 {
269 "type" : "regular",
270 "value" : "ipv4"
271 }
272 ],
273 "op" : "extract"
274 }
275 ],
276 "transitions" : [
277 {
278 "value" : "0x000006",
279 "mask" : null,
280 "next_state" : "parse_tcp"
281 },
282 {
283 "value" : "0x000011",
284 "mask" : null,
285 "next_state" : "parse_udp"
286 },
287 {
288 "value" : "default",
289 "mask" : null,
290 "next_state" : null
291 }
292 ],
293 "transition_key" : [
294 {
295 "type" : "field",
296 "value" : ["ipv4", "fragOffset"]
297 },
298 {
299 "type" : "field",
300 "value" : ["ipv4", "protocol"]
301 }
302 ]
303 },
304 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200305 "name" : "parse_pkt_in",
306 "id" : 3,
307 "parser_ops" : [
308 {
309 "parameters" : [
310 {
311 "type" : "regular",
312 "value" : "packet_in_hdr"
313 }
314 ],
315 "op" : "extract"
316 }
317 ],
318 "transitions" : [
319 {
320 "value" : "default",
321 "mask" : null,
322 "next_state" : "parse_ethernet"
323 }
324 ],
325 "transition_key" : []
326 },
327 {
328 "name" : "parse_pkt_out",
329 "id" : 4,
330 "parser_ops" : [
331 {
332 "parameters" : [
333 {
334 "type" : "regular",
335 "value" : "packet_out_hdr"
336 }
337 ],
338 "op" : "extract"
339 }
340 ],
341 "transitions" : [
342 {
343 "value" : "default",
344 "mask" : null,
345 "next_state" : "parse_ethernet"
346 }
347 ],
348 "transition_key" : []
349 },
350 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200351 "name" : "parse_tcp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200352 "id" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200353 "parser_ops" : [
354 {
355 "parameters" : [
356 {
357 "type" : "regular",
358 "value" : "tcp"
359 }
360 ],
361 "op" : "extract"
362 }
363 ],
364 "transitions" : [
365 {
366 "value" : "default",
367 "mask" : null,
368 "next_state" : null
369 }
370 ],
371 "transition_key" : []
372 },
373 {
374 "name" : "parse_udp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200375 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200376 "parser_ops" : [
377 {
378 "parameters" : [
379 {
380 "type" : "regular",
381 "value" : "udp"
382 }
383 ],
384 "op" : "extract"
385 }
386 ],
387 "transitions" : [
388 {
389 "value" : "default",
390 "mask" : null,
391 "next_state" : null
392 }
393 ],
394 "transition_key" : []
395 },
396 {
397 "name" : "start",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200398 "id" : 7,
399 "parser_ops" : [
400 {
401 "parameters" : [
402 {
403 "type" : "field",
404 "value" : ["scalars", "tmp_0"]
405 },
406 {
407 "type" : "lookahead",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200408 "value" : [0, 112]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200409 }
410 ],
411 "op" : "set"
412 },
413 {
414 "parameters" : [
415 {
416 "type" : "field",
417 "value" : ["scalars", "tmp"]
418 },
419 {
420 "type" : "expression",
421 "value" : {
422 "type" : "expression",
423 "value" : {
424 "op" : "&",
425 "left" : {
426 "type" : "field",
427 "value" : ["scalars", "tmp_0"]
428 },
429 "right" : {
430 "type" : "hexstr",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200431 "value" : "0xffff"
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200432 }
433 }
434 }
435 }
436 ],
437 "op" : "set"
438 }
439 ],
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200440 "transitions" : [
441 {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200442 "value" : "0x0000",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200443 "mask" : null,
444 "next_state" : "parse_pkt_in"
445 },
446 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200447 "value" : "default",
448 "mask" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200449 "next_state" : "default_parser"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200450 }
451 ],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200452 "transition_key" : [
453 {
454 "type" : "field",
455 "value" : ["scalars", "tmp"]
456 }
457 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200458 }
459 ]
460 }
461 ],
462 "deparsers" : [
463 {
464 "name" : "deparser",
465 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200466 "order" : ["packet_out_hdr", "packet_in_hdr", "ethernet", "ipv4", "udp", "tcp"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200467 }
468 ],
469 "meter_arrays" : [],
470 "counter_arrays" : [
471 {
472 "name" : "table0_counter",
473 "id" : 0,
474 "is_direct" : true,
475 "binding" : "table0"
476 },
477 {
478 "name" : "ecmp_group_table_counter",
479 "id" : 1,
480 "is_direct" : true,
481 "binding" : "ecmp_group_table"
482 },
483 {
484 "name" : "egress_port_counter",
485 "id" : 2,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200486 "size" : 511,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200487 "is_direct" : false
488 },
489 {
490 "name" : "ingress_port_counter",
491 "id" : 3,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200492 "size" : 511,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200493 "is_direct" : false
494 }
495 ],
496 "register_arrays" : [],
497 "calculations" : [
498 {
499 "name" : "calc",
500 "id" : 0,
501 "algo" : "crc32",
502 "input" : [
503 {
504 "type" : "field",
505 "value" : ["ipv4", "srcAddr"]
506 },
507 {
508 "type" : "field",
509 "value" : ["ipv4", "dstAddr"]
510 },
511 {
512 "type" : "field",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200513 "value" : ["udp", "srcPort"]
514 },
515 {
516 "type" : "field",
517 "value" : ["udp", "dstPort"]
518 }
519 ]
520 }
521 ],
522 "learn_lists" : [],
523 "actions" : [
524 {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200525 "name" : "NoAction",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200526 "id" : 0,
527 "runtime_data" : [],
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200528 "primitives" : []
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200529 },
530 {
531 "name" : "NoAction",
532 "id" : 1,
533 "runtime_data" : [],
534 "primitives" : []
535 },
536 {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200537 "name" : "set_egress_port",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200538 "id" : 2,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200539 "runtime_data" : [
540 {
541 "name" : "port",
542 "bitwidth" : 9
543 }
544 ],
545 "primitives" : [
546 {
547 "op" : "assign",
548 "parameters" : [
549 {
550 "type" : "field",
551 "value" : ["standard_metadata", "egress_spec"]
552 },
553 {
554 "type" : "runtime_data",
555 "value" : 0
556 }
557 ],
558 "source_info" : {
559 "filename" : "include/actions.p4",
560 "line" : 5,
561 "column" : 23,
562 "source_fragment" : "port) { ..."
563 }
564 }
565 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200566 },
567 {
568 "name" : "set_egress_port",
569 "id" : 3,
570 "runtime_data" : [
571 {
572 "name" : "port",
573 "bitwidth" : 9
574 }
575 ],
576 "primitives" : [
577 {
578 "op" : "assign",
579 "parameters" : [
580 {
581 "type" : "field",
582 "value" : ["standard_metadata", "egress_spec"]
583 },
584 {
585 "type" : "runtime_data",
586 "value" : 0
587 }
588 ],
589 "source_info" : {
590 "filename" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200591 "line" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200592 "column" : 23,
593 "source_fragment" : "port) { ..."
594 }
595 }
596 ]
597 },
598 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200599 "name" : "ecmp_group",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200600 "id" : 4,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200601 "runtime_data" : [
602 {
603 "name" : "groupId",
604 "bitwidth" : 16
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200605 }
606 ],
607 "primitives" : [
608 {
609 "op" : "assign",
610 "parameters" : [
611 {
612 "type" : "field",
613 "value" : ["ecmp_metadata", "groupId"]
614 },
615 {
616 "type" : "runtime_data",
617 "value" : 0
618 }
619 ],
620 "source_info" : {
621 "filename" : "ecmp.p4",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200622 "line" : 39,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200623 "column" : 18,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200624 "source_fragment" : "groupId) { ..."
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200625 }
626 },
627 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200628 "op" : "modify_field_with_hash_based_offset",
629 "parameters" : [
630 {
631 "type" : "field",
632 "value" : ["ecmp_metadata", "selector"]
633 },
634 {
635 "type" : "hexstr",
636 "value" : "0x00000000"
637 },
638 {
639 "type" : "calculation",
640 "value" : "calc"
641 },
642 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200643 "type" : "hexstr",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200644 "value" : "0x0000000000000002"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200645 }
646 ],
647 "source_info" : {
648 "filename" : "ecmp.p4",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200649 "line" : 41,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200650 "column" : 4,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200651 "source_fragment" : "modify_field_with_hash_based_offset(ecmp_metadata.selector, 0, ecmp_hash, 2)"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200652 }
653 }
654 ]
655 },
656 {
657 "name" : "send_to_cpu",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200658 "id" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200659 "runtime_data" : [],
660 "primitives" : [
661 {
662 "op" : "assign",
663 "parameters" : [
664 {
665 "type" : "field",
666 "value" : ["standard_metadata", "egress_spec"]
667 },
668 {
669 "type" : "hexstr",
670 "value" : "0x00ff"
671 }
672 ],
673 "source_info" : {
674 "filename" : "include/actions.p4",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200675 "line" : 18,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200676 "column" : 4,
677 "source_fragment" : "modify_field(standard_metadata.egress_spec, 255)"
678 }
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200679 },
680 {
681 "op" : "add_header",
682 "parameters" : [
683 {
684 "type" : "header",
685 "value" : "packet_in_hdr"
686 }
687 ],
688 "source_info" : {
689 "filename" : "include/actions.p4",
690 "line" : 19,
691 "column" : 4,
692 "source_fragment" : "add_header(packet_in_hdr)"
693 }
694 },
695 {
696 "op" : "assign",
697 "parameters" : [
698 {
699 "type" : "field",
700 "value" : ["packet_in_hdr", "ingress_port"]
701 },
702 {
703 "type" : "field",
704 "value" : ["standard_metadata", "ingress_port"]
705 }
706 ],
707 "source_info" : {
708 "filename" : "include/actions.p4",
709 "line" : 20,
710 "column" : 4,
711 "source_fragment" : "modify_field(packet_in_hdr.ingress_port, standard_metadata.ingress_port)"
712 }
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200713 }
714 ]
715 },
716 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200717 "name" : "_drop",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200718 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200719 "runtime_data" : [],
720 "primitives" : [
721 {
722 "op" : "assign",
723 "parameters" : [
724 {
725 "type" : "field",
726 "value" : ["standard_metadata", "egress_spec"]
727 },
728 {
729 "type" : "hexstr",
730 "value" : "0x01ff"
731 }
732 ],
733 "source_info" : {
734 "filename" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200735 "line" : 13,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200736 "column" : 4,
737 "source_fragment" : "modify_field(standard_metadata.egress_spec, 511)"
738 }
739 }
740 ]
741 },
742 {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200743 "name" : "_process_packet_out",
744 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200745 "runtime_data" : [],
746 "primitives" : [
747 {
748 "op" : "assign",
749 "parameters" : [
750 {
751 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200752 "value" : ["standard_metadata", "egress_spec"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200753 },
754 {
755 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200756 "value" : ["packet_out_hdr", "egress_port"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200757 }
758 ],
759 "source_info" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200760 "filename" : "include/packet_io.p4",
761 "line" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200762 "column" : 4,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200763 "source_fragment" : "modify_field(standard_metadata.egress_spec, packet_out_hdr.egress_port)"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200764 }
765 },
766 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200767 "op" : "remove_header",
768 "parameters" : [
769 {
770 "type" : "header",
771 "value" : "packet_out_hdr"
772 }
773 ],
774 "source_info" : {
775 "filename" : "include/packet_io.p4",
776 "line" : 8,
777 "column" : 4,
778 "source_fragment" : "remove_header(packet_out_hdr)"
779 }
780 }
781 ]
782 },
783 {
784 "name" : "count_egress",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200785 "id" : 8,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200786 "runtime_data" : [],
787 "primitives" : [
788 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200789 "op" : "assign",
790 "parameters" : [
791 {
792 "type" : "field",
793 "value" : ["scalars", "tmp_1"]
794 },
795 {
796 "type" : "expression",
797 "value" : {
798 "type" : "expression",
799 "value" : {
800 "op" : "&",
801 "left" : {
802 "type" : "field",
803 "value" : ["standard_metadata", "egress_spec"]
804 },
805 "right" : {
806 "type" : "hexstr",
807 "value" : "0xffffffff"
808 }
809 }
810 }
811 }
812 ]
813 },
814 {
815 "op" : "count",
816 "parameters" : [
817 {
818 "type" : "counter_array",
819 "value" : "egress_port_counter"
820 },
821 {
822 "type" : "field",
823 "value" : ["scalars", "tmp_1"]
824 }
825 ],
826 "source_info" : {
827 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200828 "line" : 22,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200829 "column" : 4,
830 "source_fragment" : "count(egress_port_counter, standard_metadata.egress_spec)"
831 }
832 }
833 ]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200834 },
835 {
836 "name" : "count_ingress",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200837 "id" : 9,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200838 "runtime_data" : [],
839 "primitives" : [
840 {
841 "op" : "assign",
842 "parameters" : [
843 {
844 "type" : "field",
845 "value" : ["scalars", "tmp_2"]
846 },
847 {
848 "type" : "expression",
849 "value" : {
850 "type" : "expression",
851 "value" : {
852 "op" : "&",
853 "left" : {
854 "type" : "field",
855 "value" : ["standard_metadata", "ingress_port"]
856 },
857 "right" : {
858 "type" : "hexstr",
859 "value" : "0xffffffff"
860 }
861 }
862 }
863 }
864 ]
865 },
866 {
867 "op" : "count",
868 "parameters" : [
869 {
870 "type" : "counter_array",
871 "value" : "ingress_port_counter"
872 },
873 {
874 "type" : "field",
875 "value" : ["scalars", "tmp_2"]
876 }
877 ],
878 "source_info" : {
879 "filename" : "include/port_counters.p4",
880 "line" : 18,
881 "column" : 4,
882 "source_fragment" : "count(ingress_port_counter, standard_metadata.ingress_port)"
883 }
884 }
885 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200886 }
887 ],
888 "pipelines" : [
889 {
890 "name" : "ingress",
891 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200892 "init_table" : "node_2",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200893 "tables" : [
894 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200895 "name" : "table0",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200896 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200897 "source_info" : {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200898 "filename" : "ecmp.p4",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200899 "line" : 47,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200900 "column" : 0,
901 "source_fragment" : "table table0 { ..."
902 },
903 "key" : [
904 {
905 "match_type" : "ternary",
906 "target" : ["standard_metadata", "ingress_port"],
907 "mask" : null
908 },
909 {
910 "match_type" : "ternary",
911 "target" : ["ethernet", "dstAddr"],
912 "mask" : null
913 },
914 {
915 "match_type" : "ternary",
916 "target" : ["ethernet", "srcAddr"],
917 "mask" : null
918 },
919 {
920 "match_type" : "ternary",
921 "target" : ["ethernet", "etherType"],
922 "mask" : null
923 }
924 ],
925 "match_type" : "ternary",
926 "type" : "simple",
927 "max_size" : 1024,
928 "with_counters" : true,
929 "support_timeout" : false,
930 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200931 "action_ids" : [3, 4, 5, 6, 1],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200932 "actions" : ["set_egress_port", "ecmp_group", "send_to_cpu", "_drop", "NoAction"],
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200933 "base_default_next" : "node_5",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200934 "next_tables" : {
935 "ecmp_group" : "ecmp_group_table",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200936 "set_egress_port" : "node_5",
937 "send_to_cpu" : "node_5",
938 "_drop" : "node_5",
939 "NoAction" : "node_5"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200940 },
941 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200942 "action_id" : 1,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200943 "action_const" : false,
944 "action_data" : [],
945 "action_entry_const" : false
946 }
947 },
948 {
949 "name" : "ecmp_group_table",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200950 "id" : 1,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200951 "source_info" : {
952 "filename" : "ecmp.p4",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200953 "line" : 63,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200954 "column" : 0,
955 "source_fragment" : "table ecmp_group_table { ..."
956 },
957 "key" : [
958 {
959 "match_type" : "exact",
960 "target" : ["ecmp_metadata", "groupId"],
961 "mask" : null
962 },
963 {
964 "match_type" : "exact",
965 "target" : ["ecmp_metadata", "selector"],
966 "mask" : null
967 }
968 ],
969 "match_type" : "exact",
970 "type" : "simple",
971 "max_size" : 1024,
972 "with_counters" : true,
973 "support_timeout" : false,
974 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200975 "action_ids" : [2, 0],
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200976 "actions" : ["set_egress_port", "NoAction"],
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200977 "base_default_next" : "node_5",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200978 "next_tables" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200979 "set_egress_port" : "node_5",
980 "NoAction" : "node_5"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200981 },
982 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200983 "action_id" : 0,
984 "action_const" : false,
985 "action_data" : [],
986 "action_entry_const" : false
987 }
988 },
989 {
990 "name" : "process_packet_out_table",
991 "id" : 2,
992 "source_info" : {
993 "filename" : "include/packet_io.p4",
994 "line" : 11,
995 "column" : 0,
996 "source_fragment" : "table process_packet_out_table { ..."
997 },
998 "key" : [],
999 "match_type" : "exact",
1000 "type" : "simple",
1001 "max_size" : 1024,
1002 "with_counters" : false,
1003 "support_timeout" : false,
1004 "direct_meters" : null,
1005 "action_ids" : [7],
1006 "actions" : ["_process_packet_out"],
1007 "base_default_next" : "node_7",
1008 "next_tables" : {
1009 "_process_packet_out" : "node_7"
1010 },
1011 "default_entry" : {
1012 "action_id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001013 "action_const" : false,
1014 "action_data" : [],
1015 "action_entry_const" : false
1016 }
1017 },
1018 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001019 "name" : "ingress_port_count_table",
1020 "id" : 3,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001021 "source_info" : {
1022 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001023 "line" : 25,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001024 "column" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001025 "source_fragment" : "table ingress_port_count_table { ..."
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001026 },
1027 "key" : [],
1028 "match_type" : "exact",
1029 "type" : "simple",
1030 "max_size" : 1024,
1031 "with_counters" : false,
1032 "support_timeout" : false,
1033 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001034 "action_ids" : [9],
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001035 "actions" : ["count_ingress"],
1036 "base_default_next" : "egress_port_count_table",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001037 "next_tables" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001038 "count_ingress" : "egress_port_count_table"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001039 },
1040 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001041 "action_id" : 9,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001042 "action_const" : false,
1043 "action_data" : [],
1044 "action_entry_const" : false
1045 }
1046 },
1047 {
1048 "name" : "egress_port_count_table",
1049 "id" : 4,
1050 "source_info" : {
1051 "filename" : "include/port_counters.p4",
1052 "line" : 30,
1053 "column" : 0,
1054 "source_fragment" : "table egress_port_count_table { ..."
1055 },
1056 "key" : [],
1057 "match_type" : "exact",
1058 "type" : "simple",
1059 "max_size" : 1024,
1060 "with_counters" : false,
1061 "support_timeout" : false,
1062 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001063 "action_ids" : [8],
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001064 "actions" : ["count_egress"],
1065 "base_default_next" : null,
1066 "next_tables" : {
1067 "count_egress" : null
1068 },
1069 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001070 "action_id" : 8,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001071 "action_const" : false,
1072 "action_data" : [],
1073 "action_entry_const" : false
1074 }
1075 }
1076 ],
1077 "action_profiles" : [],
1078 "conditionals" : [
1079 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001080 "name" : "node_2",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001081 "id" : 0,
1082 "source_info" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001083 "filename" : "ecmp.p4",
1084 "line" : 86,
1085 "column" : 12,
1086 "source_fragment" : "valid(packet_out_hdr)"
1087 },
1088 "expression" : {
1089 "type" : "expression",
1090 "value" : {
1091 "op" : "!=",
1092 "left" : {
1093 "type" : "field",
1094 "value" : ["packet_out_hdr", "$valid$"]
1095 },
1096 "right" : {
1097 "type" : "hexstr",
1098 "value" : "0x01"
1099 }
1100 }
1101 },
1102 "true_next" : "table0",
1103 "false_next" : "node_5"
1104 },
1105 {
1106 "name" : "node_5",
1107 "id" : 1,
1108 "source_info" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001109 "filename" : "include/packet_io.p4",
1110 "line" : 19,
1111 "column" : 8,
1112 "source_fragment" : "valid(packet_out_hdr)"
1113 },
1114 "expression" : {
1115 "type" : "expression",
1116 "value" : {
1117 "op" : "==",
1118 "left" : {
1119 "type" : "field",
1120 "value" : ["packet_out_hdr", "$valid$"]
1121 },
1122 "right" : {
1123 "type" : "hexstr",
1124 "value" : "0x01"
1125 }
1126 }
1127 },
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001128 "true_next" : "process_packet_out_table",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001129 "false_next" : "node_7"
1130 },
1131 {
1132 "name" : "node_7",
1133 "id" : 2,
1134 "source_info" : {
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001135 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001136 "line" : 36,
1137 "column" : 38,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001138 "source_fragment" : "<"
1139 },
1140 "expression" : {
1141 "type" : "expression",
1142 "value" : {
1143 "op" : "<",
1144 "left" : {
1145 "type" : "field",
1146 "value" : ["standard_metadata", "egress_spec"]
1147 },
1148 "right" : {
1149 "type" : "hexstr",
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001150 "value" : "0x01ff"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001151 }
1152 }
1153 },
1154 "false_next" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001155 "true_next" : "ingress_port_count_table"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001156 }
1157 ]
1158 },
1159 {
1160 "name" : "egress",
1161 "id" : 1,
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001162 "init_table" : null,
1163 "tables" : [],
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001164 "action_profiles" : [],
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001165 "conditionals" : []
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001166 }
1167 ],
1168 "checksums" : [],
1169 "force_arith" : [],
1170 "extern_instances" : [],
1171 "field_aliases" : [
1172 [
1173 "queueing_metadata.enq_timestamp",
1174 ["standard_metadata", "enq_timestamp"]
1175 ],
1176 [
1177 "queueing_metadata.enq_qdepth",
1178 ["standard_metadata", "enq_qdepth"]
1179 ],
1180 [
1181 "queueing_metadata.deq_timedelta",
1182 ["standard_metadata", "deq_timedelta"]
1183 ],
1184 [
1185 "queueing_metadata.deq_qdepth",
1186 ["standard_metadata", "deq_qdepth"]
1187 ],
1188 [
1189 "intrinsic_metadata.ingress_global_timestamp",
1190 ["standard_metadata", "ingress_global_timestamp"]
1191 ],
1192 [
1193 "intrinsic_metadata.lf_field_list",
1194 ["standard_metadata", "lf_field_list"]
1195 ],
1196 [
1197 "intrinsic_metadata.mcast_grp",
1198 ["standard_metadata", "mcast_grp"]
1199 ],
1200 [
1201 "intrinsic_metadata.resubmit_flag",
1202 ["standard_metadata", "resubmit_flag"]
1203 ],
1204 [
1205 "intrinsic_metadata.egress_rid",
1206 ["standard_metadata", "egress_rid"]
1207 ]
1208 ]
1209}