-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathp4_14-tofino-skel.p4
48 lines (39 loc) · 1.58 KB
/
p4_14-tofino-skel.p4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* -*- P4_14 -*- */
#ifdef __TARGET_TOFINO__
#include <tofino/constants.p4>
#include <tofino/intrinsic_metadata.p4>
#include <tofino/primitives.p4>
#else
#error This program is intended to compile for Tofino P4 architecture only
#endif
/*************************************************************************
*********************** H E A D E R S *********************************
*************************************************************************/
header_type ethernet_t {
fields {
dstAddr : 48;
srcAddr : 48;
etherType : 16;
}
}
/*************************************************************************
*********************** M E T A D A T A *******************************
*************************************************************************/
/*************************************************************************
*********************** P A R S E R ***********************************
*************************************************************************/
header ethernet_t ethernet;
parser start {
extract(ethernet);
return ingress;
}
/*************************************************************************
************** I N G R E S S P R O C E S S I N G *******************
*************************************************************************/
control ingress {
}
/*************************************************************************
**************** E G R E S S P R O C E S S I N G *******************
*************************************************************************/
control egress {
}