blob: 3d5629e4643c5a34e219822a43eaeae599fd56e3 [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;
17 _drop;
18 }
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}