|
|
| TCEgressPipeline (cstring name, const EbpfOptions &options, P4::ReferenceMap *refMap, P4::TypeMap *typeMap) |
| |
|
| DECLARE_TYPEINFO (TCEgressPipeline, EBPFEgressPipeline) |
| |
| void | emitCheckPacketMarkMetadata (CodeBuilder *builder) override |
| |
| void | emitTrafficManager (CodeBuilder *builder) override |
| |
|
| EBPFEgressPipeline (cstring name, const EbpfOptions &options, P4::ReferenceMap *refMap, P4::TypeMap *typeMap) |
| |
|
| DECLARE_TYPEINFO (EBPFEgressPipeline, EBPFPipeline) |
| |
| void | emit (CodeBuilder *builder) override |
| |
| void | emitCPUMAPLookup (CodeBuilder *builder) override |
| |
| void | emitPSAControlInputMetadata (CodeBuilder *builder) override |
| |
| void | emitPSAControlOutputMetadata (CodeBuilder *builder) override |
| |
|
| EBPFPipeline (cstring name, const EbpfOptions &options, P4::ReferenceMap *refMap, P4::TypeMap *typeMap) |
| |
|
| DECLARE_TYPEINFO (EBPFPipeline, EBPFProgram) |
| |
|
virtual cstring | dropReturnCode () |
| |
|
void | emitCPUMAPHeadersInitializers (CodeBuilder *builder) |
| | Generates a pointer to struct hdr_md. The pointer is used to access data from per-CPU map.
|
| |
|
virtual void | emitCPUMAPInitializers (CodeBuilder *builder) |
| |
| virtual void | emitGlobalMetadataInitializer (CodeBuilder *builder) |
| |
| void | emitHeaderInstances (CodeBuilder *builder) override |
| |
|
void | emitHeadersFromCPUMAP (CodeBuilder *builder) |
| |
|
void | emitInputPortMapping (CodeBuilder *builder) |
| |
|
void | emitLocalHeaderInstancesAsPointers (CodeBuilder *builder) |
| | Generates a pointer to struct Headers_t and puts it on the BPF program's stack.
|
| |
| void | emitLocalVariables (CodeBuilder *builder) override |
| | Generates a set of helper variables that are used during packet processing.
|
| |
|
void | emitMetadataFromCPUMAP (CodeBuilder *builder) |
| |
|
virtual void | emitPacketLength (CodeBuilder *builder) |
| |
|
virtual void | emitTimestamp (CodeBuilder *builder) |
| |
| void | emitUserMetadataInstance (CodeBuilder *builder) |
| |
|
virtual cstring | forwardReturnCode () |
| |
|
bool | hasAnyMeter () const |
| |
| bool | isEmpty () const |
| |
| bool | shouldEmitTimestamp () const |
| |
|
| EBPFProgram (const EbpfOptions &options, const IR::P4Program *program, P4::ReferenceMap *refMap, P4::TypeMap *typeMap, const IR::ToplevelBlock *toplevel) |
| | return 'true' on success
|
| |
|
virtual bool | build () |
| |
|
| DECLARE_TYPEINFO (EBPFProgram, EBPFObject) |
| |
|
virtual void | emitC (CodeBuilder *builder, const std::filesystem::path &headerFile) |
| |
|
virtual void | emitCommonPreamble (CodeBuilder *builder) |
| |
|
virtual void | emitGeneratedComment (CodeBuilder *builder) |
| |
|
virtual void | emitH (CodeBuilder *builder, const std::filesystem::path &headerFile) |
| |
|
| DECLARE_TYPEINFO (EBPFObject) |
| |
|
template<typename T > |
| T & | as () |
| | Tries to convert the class to type T. A BUG occurs if the cast fails.
|
| |
|
template<typename T > |
| const T & | as () const |
| | Tries to convert the class to type T. A BUG occurs if the cast fails.
|
| |
|
template<typename T > |
| T * | checkedTo () |
| | Performs a checked cast. A BUG occurs if the cast fails.
|
| |
|
template<typename T > |
| const T * | checkedTo () const |
| | Performs a checked cast. A BUG occurs if the cast fails.
|
| |
| template<typename T > |
| bool | is () const noexcept |
| |
| virtual bool | isA (TypeId typeId) const noexcept=0 |
| |
|
template<typename T > |
| const T * | to () const noexcept |
| | Same as to, but returns const pointer to T.
|
| |
| template<typename T > |
| T * | to () noexcept |
| |
| virtual TypeId | typeId () const noexcept=0 |
| |
|
|
static cstring | externalName (const IR::IDeclaration *declaration) |
| |
|
static cstring | getSpecializedTypeName (const IR::Declaration_Instance *di) |
| |
|
static cstring | getTypeName (const IR::Declaration_Instance *di) |
| |
|
cstring | compilerGlobalMetadata |
| | A name of an internal variable storing global metadata.
|
| |
|
cstring | contextVar |
| | Variable name storing pointer to eBPF packet descriptor (e.g., __sk_buff).
|
| |
|
EBPFControlPSA * | control |
| |
|
EBPFDeparserPSA * | deparser |
| |
|
cstring | ifindexVar |
| | Variable storing ingress interface index.
|
| |
|
cstring | inputPortVar |
| | A variable to store ifindex after mapping (e.g. due to recirculation).
|
| |
|
cstring | name |
| | A custom name of eBPF program.
|
| |
|
cstring | oneKey |
| | A variable name storing "1" value. Used to access BPF array map index.
|
| |
|
unsigned | packetMark |
| | A unique mark used to differentiate packets processed by P4/eBPF from others.
|
| |
|
cstring | packetPathVar |
| | Variables storing global metadata (packet_path & instance).
|
| |
|
cstring | pktInstanceVar |
| |
|
cstring | priorityVar |
| | Variable storing skb->priority value (TC only).
|
| |
|
cstring | sectionName |
| | eBPF section name, which should a concatenation of classifier/ + a custom name.
|
| |
|
cstring | timestampVar |
| | Variable name storing current timestamp retrieved from bpf_ktime_get_ns().
|
| |
|
cstring | arrayIndexType = "u32"_cs |
| | TODO: this should be a compiler option probably.
|
| |
|
cstring | byteVar |
| |
|
EBPFControl * | control |
| |
|
EBPFDeparser * | deparser |
| | Deparser may be NULL if not supported (e.g. ebpfFilter package).
|
| |
|
cstring | endLabel |
| |
|
cstring | errorEnum |
| |
|
cstring | errorVar |
| |
|
cstring | functionName |
| |
|
cstring | headerStartVar |
| |
|
cstring | lengthVar |
| |
|
cstring | license = "GPL"_cs |
| |
|
EBPFModel & | model |
| |
|
cstring | offsetVar |
| |
|
const EbpfOptions & | options |
| |
|
cstring | packetEndVar |
| |
|
cstring | packetStartVar |
| |
|
EBPFParser * | parser |
| |
|
const IR::P4Program * | program |
| |
|
const Target * | progTarget |
| |
|
P4::ReferenceMap * | refMap |
| |
|
const IR::ToplevelBlock * | toplevel |
| |
|
P4::TypeMap * | typeMap |
| |
|
cstring | zeroKey |
| |
|
virtual void | emitPipeline (CodeBuilder *builder) |
| |
|
virtual void | emitPreamble (CodeBuilder *builder) |
| |
|
virtual void | emitTypes (CodeBuilder *builder) |
| |
| virtual bool | isLibraryMethod (cstring methodName) |
| |
|
virtual const void * | toImpl (TypeId typeId) const noexcept=0 |
| |