blob: 12aeec7ca2701e79bceaa3c2daab8aac97172e42 [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 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 {
87 "name" : "ecmp_metadata_t",
Carmelo Cascone16de6db2017-08-22 00:27:57 +020088 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +020089 "fields" : [
Carmelo Cascone8aa05482017-09-12 13:21:59 +020090 ["group_id", 16, false],
Carmelo Cascone16de6db2017-08-22 00:27:57 +020091 ["selector", 16, false]
Carmelo Casconefc3776d2017-08-21 23:17:22 +020092 ]
93 },
94 {
95 "name" : "standard_metadata",
Carmelo Cascone16de6db2017-08-22 00:27:57 +020096 "id" : 8,
Carmelo Casconefc3776d2017-08-21 23:17:22 +020097 "fields" : [
98 ["ingress_port", 9, false],
99 ["egress_spec", 9, false],
100 ["egress_port", 9, false],
101 ["clone_spec", 32, false],
102 ["instance_type", 32, false],
103 ["drop", 1, false],
104 ["recirculate_port", 16, false],
105 ["packet_length", 32, false],
106 ["enq_timestamp", 32, false],
107 ["enq_qdepth", 19, false],
108 ["deq_timedelta", 32, false],
109 ["deq_qdepth", 19, false],
110 ["ingress_global_timestamp", 48, false],
111 ["lf_field_list", 32, false],
112 ["mcast_grp", 16, false],
113 ["resubmit_flag", 1, false],
114 ["egress_rid", 16, false],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200115 ["_padding_1", 5, false]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200116 ]
117 }
118 ],
119 "headers" : [
120 {
121 "name" : "scalars",
122 "id" : 0,
123 "header_type" : "scalars_0",
124 "metadata" : true,
125 "pi_omit" : true
126 },
127 {
128 "name" : "standard_metadata",
129 "id" : 1,
130 "header_type" : "standard_metadata",
131 "metadata" : true,
132 "pi_omit" : true
133 },
134 {
135 "name" : "ethernet",
136 "id" : 2,
137 "header_type" : "ethernet_t",
138 "metadata" : false,
139 "pi_omit" : true
140 },
141 {
142 "name" : "ipv4",
143 "id" : 3,
144 "header_type" : "ipv4_t",
145 "metadata" : false,
146 "pi_omit" : true
147 },
148 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200149 "name" : "packet_in_hdr",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200150 "id" : 4,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200151 "header_type" : "packet_in_t",
152 "metadata" : false,
153 "pi_omit" : true
154 },
155 {
156 "name" : "packet_out_hdr",
157 "id" : 5,
158 "header_type" : "packet_out_t",
159 "metadata" : false,
160 "pi_omit" : true
161 },
162 {
163 "name" : "tcp",
164 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200165 "header_type" : "tcp_t",
166 "metadata" : false,
167 "pi_omit" : true
168 },
169 {
170 "name" : "udp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200171 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200172 "header_type" : "udp_t",
173 "metadata" : false,
174 "pi_omit" : true
175 },
176 {
177 "name" : "ecmp_metadata",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200178 "id" : 8,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200179 "header_type" : "ecmp_metadata_t",
180 "metadata" : true,
181 "pi_omit" : true
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200182 }
183 ],
184 "header_stacks" : [],
185 "header_union_types" : [],
186 "header_unions" : [],
187 "header_union_stacks" : [],
188 "field_lists" : [],
189 "errors" : [
190 ["NoError", 1],
191 ["PacketTooShort", 2],
192 ["NoMatch", 3],
193 ["StackOutOfBounds", 4],
194 ["HeaderTooShort", 5],
195 ["ParserTimeout", 6]
196 ],
197 "enums" : [],
198 "parsers" : [
199 {
200 "name" : "parser",
201 "id" : 0,
202 "init_state" : "start",
203 "parse_states" : [
204 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200205 "name" : "default_parser",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200206 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200207 "parser_ops" : [],
208 "transitions" : [
209 {
210 "value" : "0x00ff",
211 "mask" : null,
212 "next_state" : "parse_pkt_out"
213 },
214 {
215 "value" : "default",
216 "mask" : null,
217 "next_state" : "parse_ethernet"
218 }
219 ],
220 "transition_key" : [
221 {
222 "type" : "field",
223 "value" : ["standard_metadata", "ingress_port"]
224 }
225 ]
226 },
227 {
228 "name" : "parse_ethernet",
229 "id" : 1,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200230 "parser_ops" : [
231 {
232 "parameters" : [
233 {
234 "type" : "regular",
235 "value" : "ethernet"
236 }
237 ],
238 "op" : "extract"
239 }
240 ],
241 "transitions" : [
242 {
243 "value" : "0x0800",
244 "mask" : null,
245 "next_state" : "parse_ipv4"
246 },
247 {
248 "value" : "default",
249 "mask" : null,
250 "next_state" : null
251 }
252 ],
253 "transition_key" : [
254 {
255 "type" : "field",
256 "value" : ["ethernet", "etherType"]
257 }
258 ]
259 },
260 {
261 "name" : "parse_ipv4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200262 "id" : 2,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200263 "parser_ops" : [
264 {
265 "parameters" : [
266 {
267 "type" : "regular",
268 "value" : "ipv4"
269 }
270 ],
271 "op" : "extract"
272 }
273 ],
274 "transitions" : [
275 {
276 "value" : "0x000006",
277 "mask" : null,
278 "next_state" : "parse_tcp"
279 },
280 {
281 "value" : "0x000011",
282 "mask" : null,
283 "next_state" : "parse_udp"
284 },
285 {
286 "value" : "default",
287 "mask" : null,
288 "next_state" : null
289 }
290 ],
291 "transition_key" : [
292 {
293 "type" : "field",
294 "value" : ["ipv4", "fragOffset"]
295 },
296 {
297 "type" : "field",
298 "value" : ["ipv4", "protocol"]
299 }
300 ]
301 },
302 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200303 "name" : "parse_pkt_in",
304 "id" : 3,
305 "parser_ops" : [
306 {
307 "parameters" : [
308 {
309 "type" : "regular",
310 "value" : "packet_in_hdr"
311 }
312 ],
313 "op" : "extract"
314 }
315 ],
316 "transitions" : [
317 {
318 "value" : "default",
319 "mask" : null,
320 "next_state" : "parse_ethernet"
321 }
322 ],
323 "transition_key" : []
324 },
325 {
326 "name" : "parse_pkt_out",
327 "id" : 4,
328 "parser_ops" : [
329 {
330 "parameters" : [
331 {
332 "type" : "regular",
333 "value" : "packet_out_hdr"
334 }
335 ],
336 "op" : "extract"
337 }
338 ],
339 "transitions" : [
340 {
341 "value" : "default",
342 "mask" : null,
343 "next_state" : "parse_ethernet"
344 }
345 ],
346 "transition_key" : []
347 },
348 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200349 "name" : "parse_tcp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200350 "id" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200351 "parser_ops" : [
352 {
353 "parameters" : [
354 {
355 "type" : "regular",
356 "value" : "tcp"
357 }
358 ],
359 "op" : "extract"
360 }
361 ],
362 "transitions" : [
363 {
364 "value" : "default",
365 "mask" : null,
366 "next_state" : null
367 }
368 ],
369 "transition_key" : []
370 },
371 {
372 "name" : "parse_udp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200373 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200374 "parser_ops" : [
375 {
376 "parameters" : [
377 {
378 "type" : "regular",
379 "value" : "udp"
380 }
381 ],
382 "op" : "extract"
383 }
384 ],
385 "transitions" : [
386 {
387 "value" : "default",
388 "mask" : null,
389 "next_state" : null
390 }
391 ],
392 "transition_key" : []
393 },
394 {
395 "name" : "start",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200396 "id" : 7,
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200397 "parser_ops" : [],
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200398 "transitions" : [
399 {
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200400 "value" : "0x00ff",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200401 "mask" : null,
402 "next_state" : "parse_pkt_in"
403 },
404 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200405 "value" : "default",
406 "mask" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200407 "next_state" : "default_parser"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200408 }
409 ],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200410 "transition_key" : [
411 {
412 "type" : "field",
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200413 "value" : ["standard_metadata", "egress_spec"]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200414 }
415 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200416 }
417 ]
418 }
419 ],
420 "deparsers" : [
421 {
422 "name" : "deparser",
423 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200424 "order" : ["packet_out_hdr", "packet_in_hdr", "ethernet", "ipv4", "udp", "tcp"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200425 }
426 ],
427 "meter_arrays" : [],
428 "counter_arrays" : [
429 {
430 "name" : "table0_counter",
431 "id" : 0,
432 "is_direct" : true,
433 "binding" : "table0"
434 },
435 {
436 "name" : "ecmp_group_table_counter",
437 "id" : 1,
438 "is_direct" : true,
439 "binding" : "ecmp_group_table"
440 },
441 {
442 "name" : "egress_port_counter",
443 "id" : 2,
Brian O'Connora6862e02017-09-08 01:17:39 -0700444 "size" : 254,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200445 "is_direct" : false
446 },
447 {
448 "name" : "ingress_port_counter",
449 "id" : 3,
Brian O'Connora6862e02017-09-08 01:17:39 -0700450 "size" : 254,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200451 "is_direct" : false
452 }
453 ],
454 "register_arrays" : [],
455 "calculations" : [
456 {
457 "name" : "calc",
458 "id" : 0,
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200459 "algo" : "crc16",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200460 "input" : [
461 {
462 "type" : "field",
463 "value" : ["ipv4", "srcAddr"]
464 },
465 {
466 "type" : "field",
467 "value" : ["ipv4", "dstAddr"]
468 },
469 {
470 "type" : "field",
Carmelo Cascone0ce8f5d2017-09-13 03:50:36 +0200471 "value" : ["tcp", "srcPort"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200472 },
473 {
474 "type" : "field",
Carmelo Cascone0ce8f5d2017-09-13 03:50:36 +0200475 "value" : ["tcp", "dstPort"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200476 }
477 ]
478 }
479 ],
480 "learn_lists" : [],
481 "actions" : [
482 {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200483 "name" : "NoAction",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200484 "id" : 0,
485 "runtime_data" : [],
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200486 "primitives" : []
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200487 },
488 {
489 "name" : "NoAction",
490 "id" : 1,
491 "runtime_data" : [],
492 "primitives" : []
493 },
494 {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200495 "name" : "set_egress_port",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200496 "id" : 2,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200497 "runtime_data" : [
498 {
499 "name" : "port",
500 "bitwidth" : 9
501 }
502 ],
503 "primitives" : [
504 {
505 "op" : "assign",
506 "parameters" : [
507 {
508 "type" : "field",
509 "value" : ["standard_metadata", "egress_spec"]
510 },
511 {
512 "type" : "runtime_data",
513 "value" : 0
514 }
515 ],
516 "source_info" : {
517 "filename" : "include/actions.p4",
518 "line" : 5,
519 "column" : 23,
520 "source_fragment" : "port) { ..."
521 }
522 }
523 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200524 },
525 {
526 "name" : "set_egress_port",
527 "id" : 3,
528 "runtime_data" : [
529 {
530 "name" : "port",
531 "bitwidth" : 9
532 }
533 ],
534 "primitives" : [
535 {
536 "op" : "assign",
537 "parameters" : [
538 {
539 "type" : "field",
540 "value" : ["standard_metadata", "egress_spec"]
541 },
542 {
543 "type" : "runtime_data",
544 "value" : 0
545 }
546 ],
547 "source_info" : {
548 "filename" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200549 "line" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200550 "column" : 23,
551 "source_fragment" : "port) { ..."
552 }
553 }
554 ]
555 },
556 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200557 "name" : "ecmp_group",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200558 "id" : 4,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200559 "runtime_data" : [
560 {
Carmelo Cascone8aa05482017-09-12 13:21:59 +0200561 "name" : "group_id",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200562 "bitwidth" : 16
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200563 }
564 ],
565 "primitives" : [
566 {
567 "op" : "assign",
568 "parameters" : [
569 {
570 "type" : "field",
Carmelo Cascone8aa05482017-09-12 13:21:59 +0200571 "value" : ["ecmp_metadata", "group_id"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200572 },
573 {
574 "type" : "runtime_data",
575 "value" : 0
576 }
577 ],
578 "source_info" : {
579 "filename" : "ecmp.p4",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200580 "line" : 39,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200581 "column" : 18,
Carmelo Cascone8aa05482017-09-12 13:21:59 +0200582 "source_fragment" : "group_id) { ..."
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200583 }
584 },
585 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200586 "op" : "modify_field_with_hash_based_offset",
587 "parameters" : [
588 {
589 "type" : "field",
590 "value" : ["ecmp_metadata", "selector"]
591 },
592 {
593 "type" : "hexstr",
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200594 "value" : "0x0000"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200595 },
596 {
597 "type" : "calculation",
598 "value" : "calc"
599 },
600 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200601 "type" : "hexstr",
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200602 "value" : "0x00000002"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200603 }
604 ],
605 "source_info" : {
606 "filename" : "ecmp.p4",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200607 "line" : 41,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200608 "column" : 4,
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200609 "source_fragment" : "modify_field_with_hash_based_offset(ecmp_metadata.selector, 0, ecmp_hash, 2)"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200610 }
611 }
612 ]
613 },
614 {
615 "name" : "send_to_cpu",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200616 "id" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200617 "runtime_data" : [],
618 "primitives" : [
619 {
620 "op" : "assign",
621 "parameters" : [
622 {
623 "type" : "field",
624 "value" : ["standard_metadata", "egress_spec"]
625 },
626 {
627 "type" : "hexstr",
628 "value" : "0x00ff"
629 }
630 ],
631 "source_info" : {
632 "filename" : "include/actions.p4",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200633 "line" : 18,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200634 "column" : 4,
635 "source_fragment" : "modify_field(standard_metadata.egress_spec, 255)"
636 }
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200637 },
638 {
639 "op" : "add_header",
640 "parameters" : [
641 {
642 "type" : "header",
643 "value" : "packet_in_hdr"
644 }
645 ],
646 "source_info" : {
647 "filename" : "include/actions.p4",
648 "line" : 19,
649 "column" : 4,
650 "source_fragment" : "add_header(packet_in_hdr)"
651 }
652 },
653 {
654 "op" : "assign",
655 "parameters" : [
656 {
657 "type" : "field",
658 "value" : ["packet_in_hdr", "ingress_port"]
659 },
660 {
661 "type" : "field",
662 "value" : ["standard_metadata", "ingress_port"]
663 }
664 ],
665 "source_info" : {
666 "filename" : "include/actions.p4",
667 "line" : 20,
668 "column" : 4,
669 "source_fragment" : "modify_field(packet_in_hdr.ingress_port, standard_metadata.ingress_port)"
670 }
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200671 }
672 ]
673 },
674 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200675 "name" : "_drop",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200676 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200677 "runtime_data" : [],
678 "primitives" : [
679 {
680 "op" : "assign",
681 "parameters" : [
682 {
683 "type" : "field",
684 "value" : ["standard_metadata", "egress_spec"]
685 },
686 {
687 "type" : "hexstr",
688 "value" : "0x01ff"
689 }
690 ],
691 "source_info" : {
692 "filename" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200693 "line" : 13,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200694 "column" : 4,
695 "source_fragment" : "modify_field(standard_metadata.egress_spec, 511)"
696 }
697 }
698 ]
699 },
700 {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200701 "name" : "_process_packet_out",
702 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200703 "runtime_data" : [],
704 "primitives" : [
705 {
706 "op" : "assign",
707 "parameters" : [
708 {
709 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200710 "value" : ["standard_metadata", "egress_spec"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200711 },
712 {
713 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200714 "value" : ["packet_out_hdr", "egress_port"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200715 }
716 ],
717 "source_info" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200718 "filename" : "include/packet_io.p4",
719 "line" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200720 "column" : 4,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200721 "source_fragment" : "modify_field(standard_metadata.egress_spec, packet_out_hdr.egress_port)"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200722 }
723 },
724 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200725 "op" : "remove_header",
726 "parameters" : [
727 {
728 "type" : "header",
729 "value" : "packet_out_hdr"
730 }
731 ],
732 "source_info" : {
733 "filename" : "include/packet_io.p4",
734 "line" : 8,
735 "column" : 4,
736 "source_fragment" : "remove_header(packet_out_hdr)"
737 }
738 }
739 ]
740 },
741 {
742 "name" : "count_egress",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200743 "id" : 8,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200744 "runtime_data" : [],
745 "primitives" : [
746 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200747 "op" : "assign",
748 "parameters" : [
749 {
750 "type" : "field",
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200751 "value" : ["scalars", "tmp"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200752 },
753 {
754 "type" : "expression",
755 "value" : {
756 "type" : "expression",
757 "value" : {
758 "op" : "&",
759 "left" : {
760 "type" : "field",
761 "value" : ["standard_metadata", "egress_spec"]
762 },
763 "right" : {
764 "type" : "hexstr",
765 "value" : "0xffffffff"
766 }
767 }
768 }
769 }
770 ]
771 },
772 {
773 "op" : "count",
774 "parameters" : [
775 {
776 "type" : "counter_array",
777 "value" : "egress_port_counter"
778 },
779 {
780 "type" : "field",
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200781 "value" : ["scalars", "tmp"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200782 }
783 ],
784 "source_info" : {
785 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200786 "line" : 22,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200787 "column" : 4,
788 "source_fragment" : "count(egress_port_counter, standard_metadata.egress_spec)"
789 }
790 }
791 ]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200792 },
793 {
794 "name" : "count_ingress",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200795 "id" : 9,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200796 "runtime_data" : [],
797 "primitives" : [
798 {
799 "op" : "assign",
800 "parameters" : [
801 {
802 "type" : "field",
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200803 "value" : ["scalars", "tmp_0"]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200804 },
805 {
806 "type" : "expression",
807 "value" : {
808 "type" : "expression",
809 "value" : {
810 "op" : "&",
811 "left" : {
812 "type" : "field",
813 "value" : ["standard_metadata", "ingress_port"]
814 },
815 "right" : {
816 "type" : "hexstr",
817 "value" : "0xffffffff"
818 }
819 }
820 }
821 }
822 ]
823 },
824 {
825 "op" : "count",
826 "parameters" : [
827 {
828 "type" : "counter_array",
829 "value" : "ingress_port_counter"
830 },
831 {
832 "type" : "field",
Carmelo Cascone465ec2c2017-09-12 19:54:43 +0200833 "value" : ["scalars", "tmp_0"]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200834 }
835 ],
836 "source_info" : {
837 "filename" : "include/port_counters.p4",
838 "line" : 18,
839 "column" : 4,
840 "source_fragment" : "count(ingress_port_counter, standard_metadata.ingress_port)"
841 }
842 }
843 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200844 }
845 ],
846 "pipelines" : [
847 {
848 "name" : "ingress",
849 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200850 "init_table" : "node_2",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200851 "tables" : [
852 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200853 "name" : "table0",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200854 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200855 "source_info" : {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200856 "filename" : "ecmp.p4",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200857 "line" : 47,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200858 "column" : 0,
859 "source_fragment" : "table table0 { ..."
860 },
861 "key" : [
862 {
863 "match_type" : "ternary",
864 "target" : ["standard_metadata", "ingress_port"],
865 "mask" : null
866 },
867 {
868 "match_type" : "ternary",
869 "target" : ["ethernet", "dstAddr"],
870 "mask" : null
871 },
872 {
873 "match_type" : "ternary",
874 "target" : ["ethernet", "srcAddr"],
875 "mask" : null
876 },
877 {
878 "match_type" : "ternary",
879 "target" : ["ethernet", "etherType"],
880 "mask" : null
881 }
882 ],
883 "match_type" : "ternary",
884 "type" : "simple",
885 "max_size" : 1024,
886 "with_counters" : true,
887 "support_timeout" : false,
888 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200889 "action_ids" : [3, 4, 5, 6, 1],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200890 "actions" : ["set_egress_port", "ecmp_group", "send_to_cpu", "_drop", "NoAction"],
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200891 "base_default_next" : "node_5",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200892 "next_tables" : {
893 "ecmp_group" : "ecmp_group_table",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200894 "set_egress_port" : "node_5",
895 "send_to_cpu" : "node_5",
896 "_drop" : "node_5",
897 "NoAction" : "node_5"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200898 },
899 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200900 "action_id" : 1,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200901 "action_const" : false,
902 "action_data" : [],
903 "action_entry_const" : false
904 }
905 },
906 {
907 "name" : "ecmp_group_table",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200908 "id" : 1,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200909 "source_info" : {
910 "filename" : "ecmp.p4",
Carmelo Casconef1d0a422017-09-07 17:21:46 +0200911 "line" : 63,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200912 "column" : 0,
913 "source_fragment" : "table ecmp_group_table { ..."
914 },
915 "key" : [
916 {
917 "match_type" : "exact",
Carmelo Cascone8aa05482017-09-12 13:21:59 +0200918 "target" : ["ecmp_metadata", "group_id"],
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200919 "mask" : null
920 },
921 {
922 "match_type" : "exact",
923 "target" : ["ecmp_metadata", "selector"],
924 "mask" : null
925 }
926 ],
927 "match_type" : "exact",
928 "type" : "simple",
929 "max_size" : 1024,
930 "with_counters" : true,
931 "support_timeout" : false,
932 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200933 "action_ids" : [2, 0],
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200934 "actions" : ["set_egress_port", "NoAction"],
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200935 "base_default_next" : "node_5",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200936 "next_tables" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200937 "set_egress_port" : "node_5",
938 "NoAction" : "node_5"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200939 },
940 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200941 "action_id" : 0,
942 "action_const" : false,
943 "action_data" : [],
944 "action_entry_const" : false
945 }
946 },
947 {
948 "name" : "process_packet_out_table",
949 "id" : 2,
950 "source_info" : {
951 "filename" : "include/packet_io.p4",
952 "line" : 11,
953 "column" : 0,
954 "source_fragment" : "table process_packet_out_table { ..."
955 },
956 "key" : [],
957 "match_type" : "exact",
958 "type" : "simple",
959 "max_size" : 1024,
960 "with_counters" : false,
961 "support_timeout" : false,
962 "direct_meters" : null,
963 "action_ids" : [7],
964 "actions" : ["_process_packet_out"],
965 "base_default_next" : "node_7",
966 "next_tables" : {
967 "_process_packet_out" : "node_7"
968 },
969 "default_entry" : {
970 "action_id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200971 "action_const" : false,
972 "action_data" : [],
973 "action_entry_const" : false
974 }
975 },
976 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200977 "name" : "ingress_port_count_table",
978 "id" : 3,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200979 "source_info" : {
980 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200981 "line" : 25,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200982 "column" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200983 "source_fragment" : "table ingress_port_count_table { ..."
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200984 },
985 "key" : [],
986 "match_type" : "exact",
987 "type" : "simple",
988 "max_size" : 1024,
989 "with_counters" : false,
990 "support_timeout" : false,
991 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200992 "action_ids" : [9],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200993 "actions" : ["count_ingress"],
994 "base_default_next" : "egress_port_count_table",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200995 "next_tables" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200996 "count_ingress" : "egress_port_count_table"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200997 },
998 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200999 "action_id" : 9,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001000 "action_const" : false,
1001 "action_data" : [],
1002 "action_entry_const" : false
1003 }
1004 },
1005 {
1006 "name" : "egress_port_count_table",
1007 "id" : 4,
1008 "source_info" : {
1009 "filename" : "include/port_counters.p4",
1010 "line" : 30,
1011 "column" : 0,
1012 "source_fragment" : "table egress_port_count_table { ..."
1013 },
1014 "key" : [],
1015 "match_type" : "exact",
1016 "type" : "simple",
1017 "max_size" : 1024,
1018 "with_counters" : false,
1019 "support_timeout" : false,
1020 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001021 "action_ids" : [8],
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001022 "actions" : ["count_egress"],
1023 "base_default_next" : null,
1024 "next_tables" : {
1025 "count_egress" : null
1026 },
1027 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001028 "action_id" : 8,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001029 "action_const" : false,
1030 "action_data" : [],
1031 "action_entry_const" : false
1032 }
1033 }
1034 ],
1035 "action_profiles" : [],
1036 "conditionals" : [
1037 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001038 "name" : "node_2",
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001039 "id" : 0,
1040 "source_info" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001041 "filename" : "ecmp.p4",
1042 "line" : 86,
1043 "column" : 12,
1044 "source_fragment" : "valid(packet_out_hdr)"
1045 },
1046 "expression" : {
1047 "type" : "expression",
1048 "value" : {
1049 "op" : "!=",
1050 "left" : {
1051 "type" : "field",
1052 "value" : ["packet_out_hdr", "$valid$"]
1053 },
1054 "right" : {
1055 "type" : "hexstr",
1056 "value" : "0x01"
1057 }
1058 }
1059 },
1060 "true_next" : "table0",
1061 "false_next" : "node_5"
1062 },
1063 {
1064 "name" : "node_5",
1065 "id" : 1,
1066 "source_info" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001067 "filename" : "include/packet_io.p4",
1068 "line" : 19,
1069 "column" : 8,
1070 "source_fragment" : "valid(packet_out_hdr)"
1071 },
1072 "expression" : {
1073 "type" : "expression",
1074 "value" : {
1075 "op" : "==",
1076 "left" : {
1077 "type" : "field",
1078 "value" : ["packet_out_hdr", "$valid$"]
1079 },
1080 "right" : {
1081 "type" : "hexstr",
1082 "value" : "0x01"
1083 }
1084 }
1085 },
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001086 "true_next" : "process_packet_out_table",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001087 "false_next" : "node_7"
1088 },
1089 {
1090 "name" : "node_7",
1091 "id" : 2,
1092 "source_info" : {
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001093 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001094 "line" : 36,
1095 "column" : 38,
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001096 "source_fragment" : "<"
1097 },
1098 "expression" : {
1099 "type" : "expression",
1100 "value" : {
1101 "op" : "<",
1102 "left" : {
1103 "type" : "field",
1104 "value" : ["standard_metadata", "egress_spec"]
1105 },
1106 "right" : {
1107 "type" : "hexstr",
Brian O'Connora6862e02017-09-08 01:17:39 -07001108 "value" : "0x00fe"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001109 }
1110 }
1111 },
1112 "false_next" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +02001113 "true_next" : "ingress_port_count_table"
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001114 }
1115 ]
1116 },
1117 {
1118 "name" : "egress",
1119 "id" : 1,
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001120 "init_table" : null,
1121 "tables" : [],
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001122 "action_profiles" : [],
Carmelo Casconef2ac7202017-09-08 00:57:44 +02001123 "conditionals" : []
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001124 }
1125 ],
1126 "checksums" : [],
1127 "force_arith" : [],
1128 "extern_instances" : [],
1129 "field_aliases" : [
1130 [
1131 "queueing_metadata.enq_timestamp",
1132 ["standard_metadata", "enq_timestamp"]
1133 ],
1134 [
1135 "queueing_metadata.enq_qdepth",
1136 ["standard_metadata", "enq_qdepth"]
1137 ],
1138 [
1139 "queueing_metadata.deq_timedelta",
1140 ["standard_metadata", "deq_timedelta"]
1141 ],
1142 [
1143 "queueing_metadata.deq_qdepth",
1144 ["standard_metadata", "deq_qdepth"]
1145 ],
1146 [
1147 "intrinsic_metadata.ingress_global_timestamp",
1148 ["standard_metadata", "ingress_global_timestamp"]
1149 ],
1150 [
1151 "intrinsic_metadata.lf_field_list",
1152 ["standard_metadata", "lf_field_list"]
1153 ],
1154 [
1155 "intrinsic_metadata.mcast_grp",
1156 ["standard_metadata", "mcast_grp"]
1157 ],
1158 [
1159 "intrinsic_metadata.resubmit_flag",
1160 ["standard_metadata", "resubmit_flag"]
1161 ],
1162 [
1163 "intrinsic_metadata.egress_rid",
1164 ["standard_metadata", "egress_rid"]
1165 ]
1166 ]
1167}