Carmelo Cascone | 4f01102 | 2017-06-05 01:41:02 -0400 | [diff] [blame] | 1 | #include "include/defines.p4" |
| 2 | #include "include/headers.p4" |
| 3 | #include "include/parser.p4" |
| 4 | #include "include/actions.p4" |
| 5 | #include "include/port_counters.p4" |
| 6 | |
| 7 | table table0 { |
| 8 | reads { |
| 9 | standard_metadata.ingress_port : ternary; |
| 10 | ethernet.dstAddr : ternary; |
| 11 | ethernet.srcAddr : ternary; |
| 12 | ethernet.etherType : ternary; |
| 13 | } |
| 14 | actions { |
| 15 | set_egress_port; |
| 16 | send_to_cpu; |
Carmelo Cascone | fc3776d | 2017-08-21 23:17:22 +0200 | [diff] [blame] | 17 | drop; |
Carmelo Cascone | 4f01102 | 2017-06-05 01:41:02 -0400 | [diff] [blame] | 18 | } |
| 19 | support_timeout: true; |
| 20 | } |
| 21 | |
| 22 | counter table0_counter { |
| 23 | type: packets; |
| 24 | direct: table0; |
| 25 | min_width : 32; |
| 26 | } |
| 27 | |
| 28 | control ingress { |
| 29 | apply(table0); |
| 30 | process_port_counters(); |
| 31 | } |