|
virtual cstring | abortReturnCode () const =0 |
|
virtual cstring | dataEnd (cstring base) const =0 |
|
virtual cstring | dataLength (cstring base) const =0 |
|
virtual cstring | dataOffset (cstring base) const =0 |
|
virtual cstring | dropReturnCode () const =0 |
|
virtual void | emitCodeSection (Util::SourceCodeBuilder *builder, cstring sectionName) const =0 |
|
virtual void | emitIncludes (Util::SourceCodeBuilder *builder) const =0 |
|
virtual void | emitLicense (Util::SourceCodeBuilder *builder, cstring license) const =0 |
|
virtual void | emitMain (Util::SourceCodeBuilder *builder, cstring functionName, cstring argName) const =0 |
|
virtual void | emitMapInMapDecl (Util::SourceCodeBuilder *builder, cstring innerName, TableKind innerTableKind, cstring innerKeyType, cstring innerValueType, unsigned innerSize, cstring outerName, TableKind outerTableKind, cstring outerKeyType, unsigned outerSize) const |
|
virtual void | emitPreamble (Util::SourceCodeBuilder *builder) const |
|
virtual void | emitResizeBuffer (Util::SourceCodeBuilder *builder, cstring buffer, cstring offsetVar) const =0 |
|
virtual void | emitTableDecl (Util::SourceCodeBuilder *builder, cstring tblName, TableKind tableKind, cstring keyType, cstring valueType, unsigned size) const =0 |
|
virtual void | emitTableDeclSpinlock (Util::SourceCodeBuilder *builder, cstring tblName, TableKind tableKind, cstring keyType, cstring valueType, unsigned size) const |
|
virtual void | emitTableLookup (Util::SourceCodeBuilder *builder, cstring tblName, cstring key, cstring value) const =0 |
|
virtual void | emitTableUpdate (Util::SourceCodeBuilder *builder, cstring tblName, cstring key, cstring value) const =0 |
|
virtual void | emitTraceMessage (Util::SourceCodeBuilder *builder, const char *format) const |
|
virtual void | emitTraceMessage (Util::SourceCodeBuilder *builder, const char *format, int argc,...) const |
|
virtual void | emitUserTableUpdate (Util::SourceCodeBuilder *builder, cstring tblName, cstring key, cstring value) const =0 |
|
virtual cstring | forwardReturnCode () const =0 |
|
virtual cstring | packetDescriptorType () const =0 |
|
virtual cstring | sysMapPath () const =0 |
|
void P4::EBPF::Target::emitTraceMessage |
( |
Util::SourceCodeBuilder * | builder, |
|
|
const char * | format, |
|
|
int | argc, |
|
|
| ... ) const |
|
virtual |
Emit trace message which will be printed during packet processing (if enabled).
- Parameters
-
builder | Actual source code builder. |
format | Format string, interpreted by printk -like function. For more information see documentation for bpf_trace_printk . |
argc | Number of variadic arguments. Up to 3 arguments can be passed due to limitation of eBPF. |
... | Arguments to the format string, they must be C string and valid code in C. |
To print variable value: emitTraceMessage(builder, "var=%u", 1, "var_name")
To print expression value: emitTraceMessage(builder, "diff=%d", 1, "var1 - var2")
To print just message: emitTraceMessage(builder, "Here")
Reimplemented in P4::EBPF::KernelSamplesTarget.