blob: 4e7c999d585a625f8223eb106e350bf6e574891c [file] [log] [blame]
Carmelo Casconefc3776d2017-08-21 23:17:22 +02001{
2 "program" : "default.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 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +020089 "name" : "standard_metadata",
Carmelo Cascone16de6db2017-08-22 00:27:57 +020090 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +020091 "fields" : [
92 ["ingress_port", 9, false],
93 ["egress_spec", 9, false],
94 ["egress_port", 9, false],
95 ["clone_spec", 32, false],
96 ["instance_type", 32, false],
97 ["drop", 1, false],
98 ["recirculate_port", 16, false],
99 ["packet_length", 32, false],
100 ["enq_timestamp", 32, false],
101 ["enq_qdepth", 19, false],
102 ["deq_timedelta", 32, false],
103 ["deq_qdepth", 19, false],
104 ["ingress_global_timestamp", 48, false],
105 ["lf_field_list", 32, false],
106 ["mcast_grp", 16, false],
107 ["resubmit_flag", 1, false],
108 ["egress_rid", 16, false],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200109 ["_padding_1", 5, false]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200110 ]
111 }
112 ],
113 "headers" : [
114 {
115 "name" : "scalars",
116 "id" : 0,
117 "header_type" : "scalars_0",
118 "metadata" : true,
119 "pi_omit" : true
120 },
121 {
122 "name" : "standard_metadata",
123 "id" : 1,
124 "header_type" : "standard_metadata",
125 "metadata" : true,
126 "pi_omit" : true
127 },
128 {
129 "name" : "ethernet",
130 "id" : 2,
131 "header_type" : "ethernet_t",
132 "metadata" : false,
133 "pi_omit" : true
134 },
135 {
136 "name" : "ipv4",
137 "id" : 3,
138 "header_type" : "ipv4_t",
139 "metadata" : false,
140 "pi_omit" : true
141 },
142 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200143 "name" : "packet_in_hdr",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200144 "id" : 4,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200145 "header_type" : "packet_in_t",
146 "metadata" : false,
147 "pi_omit" : true
148 },
149 {
150 "name" : "packet_out_hdr",
151 "id" : 5,
152 "header_type" : "packet_out_t",
153 "metadata" : false,
154 "pi_omit" : true
155 },
156 {
157 "name" : "tcp",
158 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200159 "header_type" : "tcp_t",
160 "metadata" : false,
161 "pi_omit" : true
162 },
163 {
164 "name" : "udp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200165 "id" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200166 "header_type" : "udp_t",
167 "metadata" : false,
168 "pi_omit" : true
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200169 }
170 ],
171 "header_stacks" : [],
172 "header_union_types" : [],
173 "header_unions" : [],
174 "header_union_stacks" : [],
175 "field_lists" : [],
176 "errors" : [
177 ["NoError", 1],
178 ["PacketTooShort", 2],
179 ["NoMatch", 3],
180 ["StackOutOfBounds", 4],
181 ["HeaderTooShort", 5],
182 ["ParserTimeout", 6]
183 ],
184 "enums" : [],
185 "parsers" : [
186 {
187 "name" : "parser",
188 "id" : 0,
189 "init_state" : "start",
190 "parse_states" : [
191 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200192 "name" : "default_parser",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200193 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200194 "parser_ops" : [],
195 "transitions" : [
196 {
197 "value" : "0x00ff",
198 "mask" : null,
199 "next_state" : "parse_pkt_out"
200 },
201 {
202 "value" : "default",
203 "mask" : null,
204 "next_state" : "parse_ethernet"
205 }
206 ],
207 "transition_key" : [
208 {
209 "type" : "field",
210 "value" : ["standard_metadata", "ingress_port"]
211 }
212 ]
213 },
214 {
215 "name" : "parse_ethernet",
216 "id" : 1,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200217 "parser_ops" : [
218 {
219 "parameters" : [
220 {
221 "type" : "regular",
222 "value" : "ethernet"
223 }
224 ],
225 "op" : "extract"
226 }
227 ],
228 "transitions" : [
229 {
230 "value" : "0x0800",
231 "mask" : null,
232 "next_state" : "parse_ipv4"
233 },
234 {
235 "value" : "default",
236 "mask" : null,
237 "next_state" : null
238 }
239 ],
240 "transition_key" : [
241 {
242 "type" : "field",
243 "value" : ["ethernet", "etherType"]
244 }
245 ]
246 },
247 {
248 "name" : "parse_ipv4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200249 "id" : 2,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200250 "parser_ops" : [
251 {
252 "parameters" : [
253 {
254 "type" : "regular",
255 "value" : "ipv4"
256 }
257 ],
258 "op" : "extract"
259 }
260 ],
261 "transitions" : [
262 {
263 "value" : "0x000006",
264 "mask" : null,
265 "next_state" : "parse_tcp"
266 },
267 {
268 "value" : "0x000011",
269 "mask" : null,
270 "next_state" : "parse_udp"
271 },
272 {
273 "value" : "default",
274 "mask" : null,
275 "next_state" : null
276 }
277 ],
278 "transition_key" : [
279 {
280 "type" : "field",
281 "value" : ["ipv4", "fragOffset"]
282 },
283 {
284 "type" : "field",
285 "value" : ["ipv4", "protocol"]
286 }
287 ]
288 },
289 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200290 "name" : "parse_pkt_in",
291 "id" : 3,
292 "parser_ops" : [
293 {
294 "parameters" : [
295 {
296 "type" : "regular",
297 "value" : "packet_in_hdr"
298 }
299 ],
300 "op" : "extract"
301 }
302 ],
303 "transitions" : [
304 {
305 "value" : "default",
306 "mask" : null,
307 "next_state" : "parse_ethernet"
308 }
309 ],
310 "transition_key" : []
311 },
312 {
313 "name" : "parse_pkt_out",
314 "id" : 4,
315 "parser_ops" : [
316 {
317 "parameters" : [
318 {
319 "type" : "regular",
320 "value" : "packet_out_hdr"
321 }
322 ],
323 "op" : "extract"
324 }
325 ],
326 "transitions" : [
327 {
328 "value" : "default",
329 "mask" : null,
330 "next_state" : "parse_ethernet"
331 }
332 ],
333 "transition_key" : []
334 },
335 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200336 "name" : "parse_tcp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200337 "id" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200338 "parser_ops" : [
339 {
340 "parameters" : [
341 {
342 "type" : "regular",
343 "value" : "tcp"
344 }
345 ],
346 "op" : "extract"
347 }
348 ],
349 "transitions" : [
350 {
351 "value" : "default",
352 "mask" : null,
353 "next_state" : null
354 }
355 ],
356 "transition_key" : []
357 },
358 {
359 "name" : "parse_udp",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200360 "id" : 6,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200361 "parser_ops" : [
362 {
363 "parameters" : [
364 {
365 "type" : "regular",
366 "value" : "udp"
367 }
368 ],
369 "op" : "extract"
370 }
371 ],
372 "transitions" : [
373 {
374 "value" : "default",
375 "mask" : null,
376 "next_state" : null
377 }
378 ],
379 "transition_key" : []
380 },
381 {
382 "name" : "start",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200383 "id" : 7,
384 "parser_ops" : [
385 {
386 "parameters" : [
387 {
388 "type" : "field",
389 "value" : ["scalars", "tmp_0"]
390 },
391 {
392 "type" : "lookahead",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200393 "value" : [0, 112]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200394 }
395 ],
396 "op" : "set"
397 },
398 {
399 "parameters" : [
400 {
401 "type" : "field",
402 "value" : ["scalars", "tmp"]
403 },
404 {
405 "type" : "expression",
406 "value" : {
407 "type" : "expression",
408 "value" : {
409 "op" : "&",
410 "left" : {
411 "type" : "field",
412 "value" : ["scalars", "tmp_0"]
413 },
414 "right" : {
415 "type" : "hexstr",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200416 "value" : "0xffff"
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200417 }
418 }
419 }
420 }
421 ],
422 "op" : "set"
423 }
424 ],
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200425 "transitions" : [
426 {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200427 "value" : "0x0000",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200428 "mask" : null,
429 "next_state" : "parse_pkt_in"
430 },
431 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200432 "value" : "default",
433 "mask" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200434 "next_state" : "default_parser"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200435 }
436 ],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200437 "transition_key" : [
438 {
439 "type" : "field",
440 "value" : ["scalars", "tmp"]
441 }
442 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200443 }
444 ]
445 }
446 ],
447 "deparsers" : [
448 {
449 "name" : "deparser",
450 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200451 "order" : ["packet_out_hdr", "packet_in_hdr", "ethernet", "ipv4", "udp", "tcp"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200452 }
453 ],
454 "meter_arrays" : [],
455 "counter_arrays" : [
456 {
457 "name" : "table0_counter",
458 "id" : 0,
459 "is_direct" : true,
460 "binding" : "table0"
461 },
462 {
463 "name" : "egress_port_counter",
464 "id" : 1,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200465 "size" : 511,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200466 "is_direct" : false
467 },
468 {
469 "name" : "ingress_port_counter",
470 "id" : 2,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200471 "size" : 511,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200472 "is_direct" : false
473 }
474 ],
475 "register_arrays" : [],
476 "calculations" : [],
477 "learn_lists" : [],
478 "actions" : [
479 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200480 "name" : "NoAction",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200481 "id" : 0,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200482 "runtime_data" : [],
483 "primitives" : []
484 },
485 {
486 "name" : "set_egress_port",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200487 "id" : 1,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200488 "runtime_data" : [
489 {
490 "name" : "port",
491 "bitwidth" : 9
492 }
493 ],
494 "primitives" : [
495 {
496 "op" : "assign",
497 "parameters" : [
498 {
499 "type" : "field",
500 "value" : ["standard_metadata", "egress_spec"]
501 },
502 {
503 "type" : "runtime_data",
504 "value" : 0
505 }
506 ],
507 "source_info" : {
508 "filename" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200509 "line" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200510 "column" : 23,
511 "source_fragment" : "port) { ..."
512 }
513 }
514 ]
515 },
516 {
517 "name" : "send_to_cpu",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200518 "id" : 2,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200519 "runtime_data" : [],
520 "primitives" : [
521 {
522 "op" : "assign",
523 "parameters" : [
524 {
525 "type" : "field",
526 "value" : ["standard_metadata", "egress_spec"]
527 },
528 {
529 "type" : "hexstr",
530 "value" : "0x00ff"
531 }
532 ],
533 "source_info" : {
534 "filename" : "include/actions.p4",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200535 "line" : 18,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200536 "column" : 4,
537 "source_fragment" : "modify_field(standard_metadata.egress_spec, 255)"
538 }
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200539 },
540 {
541 "op" : "add_header",
542 "parameters" : [
543 {
544 "type" : "header",
545 "value" : "packet_in_hdr"
546 }
547 ],
548 "source_info" : {
549 "filename" : "include/actions.p4",
550 "line" : 19,
551 "column" : 4,
552 "source_fragment" : "add_header(packet_in_hdr)"
553 }
554 },
555 {
556 "op" : "assign",
557 "parameters" : [
558 {
559 "type" : "field",
560 "value" : ["packet_in_hdr", "ingress_port"]
561 },
562 {
563 "type" : "field",
564 "value" : ["standard_metadata", "ingress_port"]
565 }
566 ],
567 "source_info" : {
568 "filename" : "include/actions.p4",
569 "line" : 20,
570 "column" : 4,
571 "source_fragment" : "modify_field(packet_in_hdr.ingress_port, standard_metadata.ingress_port)"
572 }
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200573 }
574 ]
575 },
576 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200577 "name" : "_drop",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200578 "id" : 3,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200579 "runtime_data" : [],
580 "primitives" : [
581 {
582 "op" : "assign",
583 "parameters" : [
584 {
585 "type" : "field",
586 "value" : ["standard_metadata", "egress_spec"]
587 },
588 {
589 "type" : "hexstr",
590 "value" : "0x01ff"
591 }
592 ],
593 "source_info" : {
594 "filename" : "include/actions.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200595 "line" : 13,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200596 "column" : 4,
597 "source_fragment" : "modify_field(standard_metadata.egress_spec, 511)"
598 }
599 }
600 ]
601 },
602 {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200603 "name" : "_process_packet_out",
604 "id" : 4,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200605 "runtime_data" : [],
606 "primitives" : [
607 {
608 "op" : "assign",
609 "parameters" : [
610 {
611 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200612 "value" : ["standard_metadata", "egress_spec"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200613 },
614 {
615 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200616 "value" : ["packet_out_hdr", "egress_port"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200617 }
618 ],
619 "source_info" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200620 "filename" : "include/packet_io.p4",
621 "line" : 7,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200622 "column" : 4,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200623 "source_fragment" : "modify_field(standard_metadata.egress_spec, packet_out_hdr.egress_port)"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200624 }
625 },
626 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200627 "op" : "remove_header",
628 "parameters" : [
629 {
630 "type" : "header",
631 "value" : "packet_out_hdr"
632 }
633 ],
634 "source_info" : {
635 "filename" : "include/packet_io.p4",
636 "line" : 8,
637 "column" : 4,
638 "source_fragment" : "remove_header(packet_out_hdr)"
639 }
640 }
641 ]
642 },
643 {
644 "name" : "count_egress",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200645 "id" : 5,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200646 "runtime_data" : [],
647 "primitives" : [
648 {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200649 "op" : "assign",
650 "parameters" : [
651 {
652 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200653 "value" : ["scalars", "tmp_1"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200654 },
655 {
656 "type" : "expression",
657 "value" : {
658 "type" : "expression",
659 "value" : {
660 "op" : "&",
661 "left" : {
662 "type" : "field",
663 "value" : ["standard_metadata", "egress_spec"]
664 },
665 "right" : {
666 "type" : "hexstr",
667 "value" : "0xffffffff"
668 }
669 }
670 }
671 }
672 ]
673 },
674 {
675 "op" : "count",
676 "parameters" : [
677 {
678 "type" : "counter_array",
679 "value" : "egress_port_counter"
680 },
681 {
682 "type" : "field",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200683 "value" : ["scalars", "tmp_1"]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200684 }
685 ],
686 "source_info" : {
687 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200688 "line" : 22,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200689 "column" : 4,
690 "source_fragment" : "count(egress_port_counter, standard_metadata.egress_spec)"
691 }
692 }
693 ]
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200694 },
695 {
696 "name" : "count_ingress",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200697 "id" : 6,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200698 "runtime_data" : [],
699 "primitives" : [
700 {
701 "op" : "assign",
702 "parameters" : [
703 {
704 "type" : "field",
705 "value" : ["scalars", "tmp_2"]
706 },
707 {
708 "type" : "expression",
709 "value" : {
710 "type" : "expression",
711 "value" : {
712 "op" : "&",
713 "left" : {
714 "type" : "field",
715 "value" : ["standard_metadata", "ingress_port"]
716 },
717 "right" : {
718 "type" : "hexstr",
719 "value" : "0xffffffff"
720 }
721 }
722 }
723 }
724 ]
725 },
726 {
727 "op" : "count",
728 "parameters" : [
729 {
730 "type" : "counter_array",
731 "value" : "ingress_port_counter"
732 },
733 {
734 "type" : "field",
735 "value" : ["scalars", "tmp_2"]
736 }
737 ],
738 "source_info" : {
739 "filename" : "include/port_counters.p4",
740 "line" : 18,
741 "column" : 4,
742 "source_fragment" : "count(ingress_port_counter, standard_metadata.ingress_port)"
743 }
744 }
745 ]
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200746 }
747 ],
748 "pipelines" : [
749 {
750 "name" : "ingress",
751 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200752 "init_table" : "node_2",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200753 "tables" : [
754 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200755 "name" : "table0",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200756 "id" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200757 "source_info" : {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200758 "filename" : "default.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200759 "line" : 8,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200760 "column" : 0,
761 "source_fragment" : "table table0 { ..."
762 },
763 "key" : [
764 {
765 "match_type" : "ternary",
766 "target" : ["standard_metadata", "ingress_port"],
767 "mask" : null
768 },
769 {
770 "match_type" : "ternary",
771 "target" : ["ethernet", "dstAddr"],
772 "mask" : null
773 },
774 {
775 "match_type" : "ternary",
776 "target" : ["ethernet", "srcAddr"],
777 "mask" : null
778 },
779 {
780 "match_type" : "ternary",
781 "target" : ["ethernet", "etherType"],
782 "mask" : null
783 }
784 ],
785 "match_type" : "ternary",
786 "type" : "simple",
787 "max_size" : 1024,
788 "with_counters" : true,
789 "support_timeout" : false,
790 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200791 "action_ids" : [1, 2, 3, 0],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200792 "actions" : ["set_egress_port", "send_to_cpu", "_drop", "NoAction"],
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200793 "base_default_next" : "node_4",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200794 "next_tables" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200795 "set_egress_port" : "node_4",
796 "send_to_cpu" : "node_4",
797 "_drop" : "node_4",
798 "NoAction" : "node_4"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200799 },
800 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200801 "action_id" : 0,
802 "action_const" : false,
803 "action_data" : [],
804 "action_entry_const" : false
805 }
806 },
807 {
808 "name" : "process_packet_out_table",
809 "id" : 1,
810 "source_info" : {
811 "filename" : "include/packet_io.p4",
812 "line" : 11,
813 "column" : 0,
814 "source_fragment" : "table process_packet_out_table { ..."
815 },
816 "key" : [],
817 "match_type" : "exact",
818 "type" : "simple",
819 "max_size" : 1024,
820 "with_counters" : false,
821 "support_timeout" : false,
822 "direct_meters" : null,
823 "action_ids" : [4],
824 "actions" : ["_process_packet_out"],
825 "base_default_next" : "node_6",
826 "next_tables" : {
827 "_process_packet_out" : "node_6"
828 },
829 "default_entry" : {
830 "action_id" : 4,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200831 "action_const" : false,
832 "action_data" : [],
833 "action_entry_const" : false
834 }
835 },
836 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200837 "name" : "ingress_port_count_table",
838 "id" : 2,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200839 "source_info" : {
840 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200841 "line" : 25,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200842 "column" : 0,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200843 "source_fragment" : "table ingress_port_count_table { ..."
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200844 },
845 "key" : [],
846 "match_type" : "exact",
847 "type" : "simple",
848 "max_size" : 1024,
849 "with_counters" : false,
850 "support_timeout" : false,
851 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200852 "action_ids" : [6],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200853 "actions" : ["count_ingress"],
854 "base_default_next" : "egress_port_count_table",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200855 "next_tables" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200856 "count_ingress" : "egress_port_count_table"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200857 },
858 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200859 "action_id" : 6,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200860 "action_const" : false,
861 "action_data" : [],
862 "action_entry_const" : false
863 }
864 },
865 {
866 "name" : "egress_port_count_table",
867 "id" : 3,
868 "source_info" : {
869 "filename" : "include/port_counters.p4",
870 "line" : 30,
871 "column" : 0,
872 "source_fragment" : "table egress_port_count_table { ..."
873 },
874 "key" : [],
875 "match_type" : "exact",
876 "type" : "simple",
877 "max_size" : 1024,
878 "with_counters" : false,
879 "support_timeout" : false,
880 "direct_meters" : null,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200881 "action_ids" : [5],
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200882 "actions" : ["count_egress"],
883 "base_default_next" : null,
884 "next_tables" : {
885 "count_egress" : null
886 },
887 "default_entry" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200888 "action_id" : 5,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200889 "action_const" : false,
890 "action_data" : [],
891 "action_entry_const" : false
892 }
893 }
894 ],
895 "action_profiles" : [],
896 "conditionals" : [
897 {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200898 "name" : "node_2",
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200899 "id" : 0,
900 "source_info" : {
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200901 "filename" : "default.p4",
902 "line" : 30,
903 "column" : 12,
904 "source_fragment" : "valid(packet_out_hdr)"
905 },
906 "expression" : {
907 "type" : "expression",
908 "value" : {
909 "op" : "!=",
910 "left" : {
911 "type" : "field",
912 "value" : ["packet_out_hdr", "$valid$"]
913 },
914 "right" : {
915 "type" : "hexstr",
916 "value" : "0x01"
917 }
918 }
919 },
920 "true_next" : "table0",
921 "false_next" : "node_4"
922 },
923 {
924 "name" : "node_4",
925 "id" : 1,
926 "source_info" : {
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200927 "filename" : "include/packet_io.p4",
928 "line" : 19,
929 "column" : 8,
930 "source_fragment" : "valid(packet_out_hdr)"
931 },
932 "expression" : {
933 "type" : "expression",
934 "value" : {
935 "op" : "==",
936 "left" : {
937 "type" : "field",
938 "value" : ["packet_out_hdr", "$valid$"]
939 },
940 "right" : {
941 "type" : "hexstr",
942 "value" : "0x01"
943 }
944 }
945 },
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200946 "true_next" : "process_packet_out_table",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200947 "false_next" : "node_6"
948 },
949 {
950 "name" : "node_6",
951 "id" : 2,
952 "source_info" : {
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200953 "filename" : "include/port_counters.p4",
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200954 "line" : 36,
955 "column" : 38,
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200956 "source_fragment" : "<"
957 },
958 "expression" : {
959 "type" : "expression",
960 "value" : {
961 "op" : "<",
962 "left" : {
963 "type" : "field",
964 "value" : ["standard_metadata", "egress_spec"]
965 },
966 "right" : {
967 "type" : "hexstr",
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200968 "value" : "0x01ff"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200969 }
970 }
971 },
972 "false_next" : null,
Carmelo Cascone16de6db2017-08-22 00:27:57 +0200973 "true_next" : "ingress_port_count_table"
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200974 }
975 ]
976 },
977 {
978 "name" : "egress",
979 "id" : 1,
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200980 "init_table" : null,
981 "tables" : [],
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200982 "action_profiles" : [],
Carmelo Casconef2ac7202017-09-08 00:57:44 +0200983 "conditionals" : []
Carmelo Casconefc3776d2017-08-21 23:17:22 +0200984 }
985 ],
986 "checksums" : [],
987 "force_arith" : [],
988 "extern_instances" : [],
989 "field_aliases" : [
990 [
991 "queueing_metadata.enq_timestamp",
992 ["standard_metadata", "enq_timestamp"]
993 ],
994 [
995 "queueing_metadata.enq_qdepth",
996 ["standard_metadata", "enq_qdepth"]
997 ],
998 [
999 "queueing_metadata.deq_timedelta",
1000 ["standard_metadata", "deq_timedelta"]
1001 ],
1002 [
1003 "queueing_metadata.deq_qdepth",
1004 ["standard_metadata", "deq_qdepth"]
1005 ],
1006 [
1007 "intrinsic_metadata.ingress_global_timestamp",
1008 ["standard_metadata", "ingress_global_timestamp"]
1009 ],
1010 [
1011 "intrinsic_metadata.lf_field_list",
1012 ["standard_metadata", "lf_field_list"]
1013 ],
1014 [
1015 "intrinsic_metadata.mcast_grp",
1016 ["standard_metadata", "mcast_grp"]
1017 ],
1018 [
1019 "intrinsic_metadata.resubmit_flag",
1020 ["standard_metadata", "resubmit_flag"]
1021 ],
1022 [
1023 "intrinsic_metadata.egress_rid",
1024 ["standard_metadata", "egress_rid"]
1025 ]
1026 ]
1027}