-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprona-boilerplate.p4
54 lines (44 loc) · 1.05 KB
/
prona-boilerplate.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
47
48
49
50
51
52
53
54
/* -*- P4_16 -*- */
// ProNA P4 Boilerplate
#include <core.p4>
#include <v1model.p4>
struct headers {
}
struct metadata {
}
// Parser
parser MyParser(packet_in pkt,
out headers hdr,
inout metadata meta,
inout standard_metadata_t std_meta) {
state start{ transition accept; }
}
// Match-Action
control MyVerifyChecksum(inout headers hdr, inout metadata meta) {
apply { }
}
control MyIngress(inout headers hdr,
inout metadata meta,
inout standard_metadata_t std_meta) {
apply { }
}
control MyEgress(inout headers hdr,
inout metadata meta,
inout standard_metadata_t std_meta) {
apply { }
}
control MyComputeChecksum(inout headers hdr, inout metadata meta) {
apply { }
}
// Deparser
control MyDeparser(packet_out pkt, in headers hdr) {
apply { }
}
// V1Model/BMv2 architecture
V1Switch(MyParser(),
MyVerifyChecksum(),
MyIngress(),
MyEgress(),
MyComputeChecksum(),
MyDeparser()
) main;