17#ifndef BACKENDS_UBPF_UBPFTABLE_H_
18#define BACKENDS_UBPF_UBPFTABLE_H_
20#include "backends/ebpf/ebpfObject.h"
21#include "frontends/p4/methodInstance.h"
22#include "ubpfProgram.h"
33 const IR::Type *keyType{};
34 const IR::Type *valueType{};
43 : program(program), instanceName(instanceName), codeGen(codeGen) {
46 keyTypeName = program->refMap->
newName(instanceName +
"_key");
47 valueTypeName = program->refMap->
newName(instanceName +
"_value");
48 dataMapName = instanceName;
54 void setTableSize(
const IR::TableBlock *table);
58 const IR::Key *keyGenerator;
59 const IR::ActionList *actionList;
60 const IR::TableBlock *table;
61 EBPF::TableKind tableKind;
65 std::map<const IR::KeyElement *, cstring> keyFieldNames;
66 std::map<const IR::KeyElement *, EBPF::EBPFType *> keyTypes;
71 cstring generateActionName(
const IR::P4Action *action);
Definition ebpf/codeGen.h:33
Definition ebpf/codeGen.h:41
Base class for EBPF objects.
Definition ebpfObject.h:31
cstring newName(std::string_view base) override
Generate a name from base that fresh for the program.
Definition referenceMap.cpp:96
Definition ubpfProgram.h:37
Definition ubpfTable.h:26
Definition ubpfTable.h:52