blob: abc04525f759f2f6619961fcddabdfffb91dce00 [file] [log] [blame]
Carmelo Cascone17fc9e42016-05-31 11:29:21 -07001{
2 "header_types": [
3 {
4 "name": "standard_metadata_t",
5 "id": 0,
6 "fields": [
7 [
8 "ingress_port",
9 9
10 ],
11 [
12 "packet_length",
13 32
14 ],
15 [
16 "egress_spec",
17 9
18 ],
19 [
20 "egress_port",
21 9
22 ],
23 [
24 "egress_instance",
25 32
26 ],
27 [
28 "instance_type",
29 32
30 ],
31 [
32 "clone_spec",
33 32
34 ],
35 [
36 "_padding",
37 5
38 ]
39 ],
40 "length_exp": null,
41 "max_length": null
42 },
43 {
44 "name": "intrinsic_metadata_t",
45 "id": 1,
46 "fields": [
47 [
48 "ingress_global_timestamp",
49 32
50 ],
51 [
52 "lf_field_list",
53 32
54 ],
55 [
56 "mcast_grp",
57 16
58 ],
59 [
60 "egress_rid",
61 16
62 ]
63 ],
64 "length_exp": null,
65 "max_length": null
66 },
67 {
68 "name": "ethernet_t",
69 "id": 2,
70 "fields": [
71 [
72 "dstAddr",
73 48
74 ],
75 [
76 "srcAddr",
77 48
78 ],
79 [
80 "etherType",
81 16
82 ]
83 ],
84 "length_exp": null,
85 "max_length": null
86 },
87 {
88 "name": "ipv4_t",
89 "id": 3,
90 "fields": [
91 [
92 "version",
93 4
94 ],
95 [
96 "ihl",
97 4
98 ],
99 [
100 "diffserv",
101 8
102 ],
103 [
104 "totalLen",
105 16
106 ],
107 [
108 "identification",
109 16
110 ],
111 [
112 "flags",
113 3
114 ],
115 [
116 "fragOffset",
117 13
118 ],
119 [
120 "ttl",
121 8
122 ],
123 [
124 "protocol",
125 8
126 ],
127 [
128 "hdrChecksum",
129 16
130 ],
131 [
132 "srcAddr",
133 32
134 ],
135 [
136 "dstAddr",
137 32
138 ]
139 ],
140 "length_exp": null,
141 "max_length": null
142 },
143 {
144 "name": "tcp_t",
145 "id": 4,
146 "fields": [
147 [
148 "srcPort",
149 16
150 ],
151 [
152 "dstPort",
153 16
154 ],
155 [
156 "seqNo",
157 32
158 ],
159 [
160 "ackNo",
161 32
162 ],
163 [
164 "dataOffset",
165 4
166 ],
167 [
168 "res",
169 3
170 ],
171 [
172 "ecn",
173 3
174 ],
175 [
176 "ctrl",
177 6
178 ],
179 [
180 "window",
181 16
182 ],
183 [
184 "checksum",
185 16
186 ],
187 [
188 "urgentPtr",
189 16
190 ]
191 ],
192 "length_exp": null,
193 "max_length": null
194 },
195 {
196 "name": "udp_t",
197 "id": 5,
198 "fields": [
199 [
200 "srcPort",
201 16
202 ],
203 [
204 "dstPort",
205 16
206 ],
207 [
208 "length_",
209 16
210 ],
211 [
212 "checksum",
213 16
214 ]
215 ],
216 "length_exp": null,
217 "max_length": null
218 }
219 ],
220 "headers": [
221 {
222 "name": "standard_metadata",
223 "id": 0,
224 "header_type": "standard_metadata_t",
225 "metadata": true
226 },
227 {
228 "name": "intrinsic_metadata",
229 "id": 1,
230 "header_type": "intrinsic_metadata_t",
231 "metadata": true
232 },
233 {
234 "name": "ethernet",
235 "id": 2,
236 "header_type": "ethernet_t",
237 "metadata": false
238 },
239 {
240 "name": "ipv4",
241 "id": 3,
242 "header_type": "ipv4_t",
243 "metadata": false
244 },
245 {
246 "name": "tcp",
247 "id": 4,
248 "header_type": "tcp_t",
249 "metadata": false
250 },
251 {
252 "name": "udp",
253 "id": 5,
254 "header_type": "udp_t",
255 "metadata": false
256 }
257 ],
258 "header_stacks": [],
259 "parsers": [
260 {
261 "name": "parser",
262 "id": 0,
263 "init_state": "start",
264 "parse_states": [
265 {
266 "name": "start",
267 "id": 0,
268 "parser_ops": [],
269 "transition_key": [],
270 "transitions": [
271 {
272 "value": "default",
273 "mask": null,
274 "next_state": "parse_ethernet"
275 }
276 ]
277 },
278 {
279 "name": "parse_ethernet",
280 "id": 1,
281 "parser_ops": [
282 {
283 "op": "extract",
284 "parameters": [
285 {
286 "type": "regular",
287 "value": "ethernet"
288 }
289 ]
290 }
291 ],
292 "transition_key": [
293 {
294 "type": "field",
295 "value": [
296 "ethernet",
297 "etherType"
298 ]
299 }
300 ],
301 "transitions": [
302 {
303 "value": "0x0800",
304 "mask": null,
305 "next_state": "parse_ipv4"
306 },
307 {
308 "value": "default",
309 "mask": null,
310 "next_state": null
311 }
312 ]
313 },
314 {
315 "name": "parse_ipv4",
316 "id": 2,
317 "parser_ops": [
318 {
319 "op": "extract",
320 "parameters": [
321 {
322 "type": "regular",
323 "value": "ipv4"
324 }
325 ]
326 }
327 ],
328 "transition_key": [
329 {
330 "type": "field",
331 "value": [
332 "ipv4",
333 "fragOffset"
334 ]
335 },
336 {
337 "type": "field",
338 "value": [
339 "ipv4",
340 "protocol"
341 ]
342 }
343 ],
344 "transitions": [
345 {
346 "value": "0x000006",
347 "mask": null,
348 "next_state": "parse_tcp"
349 },
350 {
351 "value": "0x000011",
352 "mask": null,
353 "next_state": "parse_udp"
354 },
355 {
356 "value": "default",
357 "mask": null,
358 "next_state": null
359 }
360 ]
361 },
362 {
363 "name": "parse_tcp",
364 "id": 3,
365 "parser_ops": [
366 {
367 "op": "extract",
368 "parameters": [
369 {
370 "type": "regular",
371 "value": "tcp"
372 }
373 ]
374 }
375 ],
376 "transition_key": [],
377 "transitions": [
378 {
379 "value": "default",
380 "mask": null,
381 "next_state": null
382 }
383 ]
384 },
385 {
386 "name": "parse_udp",
387 "id": 4,
388 "parser_ops": [
389 {
390 "op": "extract",
391 "parameters": [
392 {
393 "type": "regular",
394 "value": "udp"
395 }
396 ]
397 }
398 ],
399 "transition_key": [],
400 "transitions": [
401 {
402 "value": "default",
403 "mask": null,
404 "next_state": null
405 }
406 ]
407 }
408 ]
409 }
410 ],
411 "deparsers": [
412 {
413 "name": "deparser",
414 "id": 0,
415 "order": [
416 "ethernet",
417 "ipv4",
418 "udp",
419 "tcp"
420 ]
421 }
422 ],
423 "meter_arrays": [],
424 "actions": [
425 {
426 "name": "_drop",
427 "id": 0,
428 "runtime_data": [],
429 "primitives": [
430 {
431 "op": "modify_field",
432 "parameters": [
433 {
434 "type": "field",
435 "value": [
436 "standard_metadata",
437 "egress_spec"
438 ]
439 },
440 {
441 "type": "hexstr",
442 "value": "0x1ff"
443 }
444 ]
445 }
446 ]
447 },
448 {
449 "name": "count_packet",
450 "id": 1,
451 "runtime_data": [],
452 "primitives": [
453 {
454 "op": "count",
455 "parameters": [
456 {
457 "type": "counter_array",
458 "value": "ingress_port_counter"
459 },
460 {
461 "type": "field",
462 "value": [
463 "standard_metadata",
464 "ingress_port"
465 ]
466 }
467 ]
468 },
469 {
470 "op": "count",
471 "parameters": [
472 {
473 "type": "counter_array",
474 "value": "egress_port_counter"
475 },
476 {
477 "type": "field",
478 "value": [
479 "standard_metadata",
480 "egress_spec"
481 ]
482 }
483 ]
484 }
485 ]
486 },
487 {
488 "name": "send_to_cpu",
489 "id": 2,
490 "runtime_data": [],
491 "primitives": [
492 {
493 "op": "modify_field",
494 "parameters": [
495 {
496 "type": "field",
497 "value": [
498 "standard_metadata",
499 "egress_spec"
500 ]
501 },
502 {
503 "type": "hexstr",
504 "value": "0xff"
505 }
506 ]
507 }
508 ]
509 },
510 {
511 "name": "set_egress_port",
512 "id": 3,
513 "runtime_data": [
514 {
515 "name": "port",
516 "bitwidth": 9
517 }
518 ],
519 "primitives": [
520 {
521 "op": "modify_field",
522 "parameters": [
523 {
524 "type": "field",
525 "value": [
526 "standard_metadata",
527 "egress_spec"
528 ]
529 },
530 {
531 "type": "runtime_data",
532 "value": 0
533 }
534 ]
535 }
536 ]
537 }
538 ],
539 "pipelines": [
540 {
541 "name": "ingress",
542 "id": 0,
543 "init_table": "table0",
544 "tables": [
545 {
546 "name": "port_count_table",
547 "id": 0,
548 "match_type": "exact",
549 "type": "simple",
550 "max_size": 16384,
551 "with_counters": false,
552 "direct_meters": null,
553 "support_timeout": false,
554 "key": [],
555 "actions": [
556 "count_packet"
557 ],
558 "next_tables": {
559 "count_packet": null
560 },
561 "default_action": null,
562 "base_default_next": null
563 },
564 {
565 "name": "table0",
566 "id": 1,
567 "match_type": "ternary",
568 "type": "simple",
569 "max_size": 16384,
570 "with_counters": true,
571 "direct_meters": null,
572 "support_timeout": true,
573 "key": [
574 {
575 "match_type": "ternary",
576 "target": [
577 "standard_metadata",
578 "ingress_port"
579 ],
580 "mask": null
581 },
582 {
583 "match_type": "ternary",
584 "target": [
585 "ethernet",
586 "dstAddr"
587 ],
588 "mask": null
589 },
590 {
591 "match_type": "ternary",
592 "target": [
593 "ethernet",
594 "srcAddr"
595 ],
596 "mask": null
597 },
598 {
599 "match_type": "ternary",
600 "target": [
601 "ethernet",
602 "etherType"
603 ],
604 "mask": null
605 }
606 ],
607 "actions": [
608 "set_egress_port",
609 "send_to_cpu",
610 "_drop"
611 ],
612 "next_tables": {
613 "set_egress_port": "_condition_0",
614 "send_to_cpu": "_condition_0",
615 "_drop": "_condition_0"
616 },
617 "default_action": null,
618 "base_default_next": "_condition_0"
619 }
620 ],
621 "conditionals": [
622 {
623 "name": "_condition_0",
624 "id": 0,
625 "expression": {
626 "type": "expression",
627 "value": {
628 "op": "<",
629 "left": {
630 "type": "field",
631 "value": [
632 "standard_metadata",
633 "egress_spec"
634 ]
635 },
636 "right": {
637 "type": "hexstr",
638 "value": "0xfe"
639 }
640 }
641 },
642 "true_next": "port_count_table",
643 "false_next": null
644 }
645 ]
646 },
647 {
648 "name": "egress",
649 "id": 1,
650 "init_table": null,
651 "tables": [],
652 "conditionals": []
653 }
654 ],
655 "calculations": [],
656 "checksums": [],
657 "learn_lists": [],
658 "field_lists": [],
659 "counter_arrays": [
660 {
661 "name": "ingress_port_counter",
662 "id": 0,
663 "is_direct": false,
664 "size": 254
665 },
666 {
667 "name": "egress_port_counter",
668 "id": 1,
669 "is_direct": false,
670 "size": 254
671 },
672 {
673 "name": "table0_counter",
674 "id": 2,
675 "is_direct": true,
676 "binding": "table0"
677 }
678 ],
679 "register_arrays": [],
680 "force_arith": [
681 [
682 "standard_metadata",
683 "ingress_port"
684 ],
685 [
686 "standard_metadata",
687 "packet_length"
688 ],
689 [
690 "standard_metadata",
691 "egress_spec"
692 ],
693 [
694 "standard_metadata",
695 "egress_port"
696 ],
697 [
698 "standard_metadata",
699 "egress_instance"
700 ],
701 [
702 "standard_metadata",
703 "instance_type"
704 ],
705 [
706 "standard_metadata",
707 "clone_spec"
708 ],
709 [
710 "standard_metadata",
711 "_padding"
712 ],
713 [
714 "intrinsic_metadata",
715 "ingress_global_timestamp"
716 ],
717 [
718 "intrinsic_metadata",
719 "lf_field_list"
720 ],
721 [
722 "intrinsic_metadata",
723 "mcast_grp"
724 ],
725 [
726 "intrinsic_metadata",
727 "egress_rid"
728 ]
729 ]
730}