blob: be88a5d4bc616bf4637f6e34dc5ae16ae569070f [file] [log] [blame]
Carmelo Cascone4f011022017-06-05 01:41:02 -04001#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
7table 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 Casconefc3776d2017-08-21 23:17:22 +020017 drop;
Carmelo Cascone4f011022017-06-05 01:41:02 -040018 }
19 support_timeout: true;
20}
21
22counter table0_counter {
23 type: packets;
24 direct: table0;
25 min_width : 32;
26}
27
28control ingress {
29 apply(table0);
30 process_port_counters();
31}