17#ifndef BACKENDS_EBPF_EBPFMODEL_H_
18#define BACKENDS_EBPF_EBPFMODEL_H_
20#include "frontends/common/model.h"
21#include "frontends/p4/coreLibrary.h"
23#include "lib/cstring.h"
36 : Extern_Model(
"CounterArray"_cs),
37 increment(
"increment"_cs),
39 max_index(
"max_index"_cs),
40 sparse(
"sparse"_cs) {}
47enum ModelArchitecture {
53 Xdp_Model() : Elem(
"xdp"_cs), parser(
"p"_cs), switch_(
"s"_cs), deparser(
"d"_cs) {}
60 Filter_Model() : Elem(
"ebpf_filter"_cs), parser(
"prs"_cs), filter(
"filt"_cs) {}
70 array_table(
"array_table"_cs),
71 hash_table(
"hash_table"_cs),
72 tableImplProperty(
"implementation"_cs),
73 CPacketName(
"skb"_cs),
74 packet(
"packet"_cs, P4::P4CoreLibrary::instance().packetIn, 0),
78 counterIndexType(
"u32"_cs),
79 counterValueType(
"u32"_cs) {}
91 ModelArchitecture arch;
99 static cstring reserved(
cstring name) {
return reservedPrefix + name; }
Keep this in sync with ebpf_model.p4 and xdp_model.p4.
Definition ebpfModel.h:66
Filter_Model filter
Only one of these should be used, depending on arch value.
Definition ebpfModel.h:93
Definition frontends/common/model.h:64
Definition codeGen.cpp:25
Definition ebpfModel.h:34
Definition ebpfModel.h:59
Definition ebpfModel.h:29
Definition ebpfModel.h:52
Definition frontends/common/model.h:28
Extern_Model : Type_Model.
Definition frontends/common/model.h:52
Param_Model : Elem.
Definition frontends/common/model.h:57