Skip to content

Commit 0237f9b

Browse files
Chris Doddpsivanup
Chris Dodd
andauthored
NVFMSA-2399 Fix initialization-order-fiasco of P4CoreLibrary instance (#3994)
Replaced the usage of static variable P4CoreLibrary::instance by static method P4CoreLibrary::instance(). This static method returns the static variable of P4CoreLibrary instance. Now the core library instance is created in one place irrespective of the order of its usage across several source files. Thus it prevents the initialization-order-fiasco for P4CoreLibrary instance. Co-authored-by: Pitchumani Sivanupandi <pitchumani.sivanupandi@intel.com>
1 parent 6444bfb commit 0237f9b

39 files changed

+90
-88
lines changed

backends/bmv2/common/backend.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Backend {
7373
refMap(refMap),
7474
typeMap(typeMap),
7575
enumMap(enumMap),
76-
corelib(P4::P4CoreLibrary::instance),
76+
corelib(P4::P4CoreLibrary::instance()),
7777
json(new BMV2::JsonObjects()) {
7878
refMap->setIsV1(options.isv1());
7979
}

backends/bmv2/common/control.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,10 @@ class ControlConverter : public Inspector {
828828
}
829829

830830
explicit ControlConverter(ConversionContext *ctxt, cstring name, const bool &emitExterns_)
831-
: ctxt(ctxt), name(name), corelib(P4::P4CoreLibrary::instance), emitExterns(emitExterns_) {
831+
: ctxt(ctxt),
832+
name(name),
833+
corelib(P4::P4CoreLibrary::instance()),
834+
emitExterns(emitExterns_) {
832835
setName("ControlConverter");
833836
}
834837
};

backends/bmv2/common/deparser.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class DeparserConverter : public Inspector {
4040
bool preorder(const IR::P4Control *ctrl) override;
4141

4242
explicit DeparserConverter(ConversionContext *ctxt, cstring name = "deparser")
43-
: ctxt(ctxt), name(name), corelib(P4::P4CoreLibrary::instance) {
43+
: ctxt(ctxt), name(name), corelib(P4::P4CoreLibrary::instance()) {
4444
setName("DeparserConverter");
4545
}
4646
};

backends/bmv2/common/expression.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class ExpressionConverter : public Inspector {
7575
: refMap(refMap),
7676
typeMap(typeMap),
7777
structure(structure),
78-
corelib(P4::P4CoreLibrary::instance),
78+
corelib(P4::P4CoreLibrary::instance()),
7979
scalarsName(scalarsName),
8080
leftValue(false),
8181
simpleExpressionsOnly(false) {}

backends/bmv2/common/parser.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ void ParserConverter::addValueSets(const IR::P4Parser *parser) {
524524
auto matchTypeDecl =
525525
ctxt->refMap->getDeclaration(matchPathExpr->path, true)->to<IR::Declaration_ID>();
526526
BUG_CHECK(matchTypeDecl != nullptr, "No declaration for match type '%1%'", matchPathExpr);
527-
return (matchTypeDecl->name.name == P4::P4CoreLibrary::instance.exactMatch.name);
527+
return (matchTypeDecl->name.name == P4::P4CoreLibrary::instance().exactMatch.name);
528528
};
529529

530530
for (auto s : parser->parserLocals) {

backends/bmv2/common/parser.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ParserConverter : public Inspector {
4949
public:
5050
bool preorder(const IR::P4Parser *p) override;
5151
explicit ParserConverter(ConversionContext *ctxt, cstring name = "parser")
52-
: ctxt(ctxt), name(name), corelib(P4::P4CoreLibrary::instance) {
52+
: ctxt(ctxt), name(name), corelib(P4::P4CoreLibrary::instance()) {
5353
setName("ParserConverter");
5454
}
5555
};

backends/common/removeComplexExpressions.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ const IR::Node *RemoveComplexExpressions::postorder(IR::Statement *statement) {
213213
const IR::Node *RemoveComplexExpressions::postorder(IR::MethodCallStatement *statement) {
214214
auto mi = P4::MethodInstance::resolve(statement, refMap, typeMap);
215215
if (auto em = mi->to<P4::ExternMethod>()) {
216-
if (em->originalExternType->name != P4::P4CoreLibrary::instance.packetIn.name ||
217-
em->method->name != P4::P4CoreLibrary::instance.packetIn.lookahead.name)
216+
if (em->originalExternType->name != P4::P4CoreLibrary::instance().packetIn.name ||
217+
em->method->name != P4::P4CoreLibrary::instance().packetIn.lookahead.name)
218218
return simpleStatement(statement);
219219
auto type = em->actualMethodType->returnType;
220220
auto name = refMap->newName("tmp");

backends/dpdk/dpdkArch.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ void ConvertLookahead::Collect::postorder(const IR::AssignmentStatement *stateme
222222
auto mi = P4::MethodInstance::resolve(mce, refMap, typeMap);
223223
if (!mi->is<P4::ExternMethod>()) return;
224224
auto em = mi->to<P4::ExternMethod>();
225-
if (em->originalExternType->name != P4::P4CoreLibrary::instance.packetIn.name ||
226-
em->method->name != P4::P4CoreLibrary::instance.packetIn.lookahead.name)
225+
if (em->originalExternType->name != P4::P4CoreLibrary::instance().packetIn.name ||
226+
em->method->name != P4::P4CoreLibrary::instance().packetIn.lookahead.name)
227227
return;
228228

229229
LOG2("Collecting lookahead in statement:" << std::endl << " " << statement);
@@ -1828,7 +1828,7 @@ const IR::P4Table *SplitP4TableCommon::create_member_table(const IR::P4Table *tb
18281828
IR::Vector<IR::KeyElement> member_keys;
18291829
auto tableKeyEl =
18301830
new IR::KeyElement(new IR::PathExpression(member_id),
1831-
new IR::PathExpression(P4::P4CoreLibrary::instance.exactMatch.Id()));
1831+
new IR::PathExpression(P4::P4CoreLibrary::instance().exactMatch.Id()));
18321832
member_keys.push_back(tableKeyEl);
18331833
IR::IndexedVector<IR::Property> member_properties;
18341834
member_properties.push_back(new IR::Property("key", new IR::Key(member_keys), false));

backends/dpdk/dpdkAsmOpt.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,11 @@ void EmitDpdkTableConfig::addMatchKey(const IR::DpdkTable *table, const IR::List
621621
auto tableKey = table->getKey()->keyElements.at(keyIndex++);
622622
auto keyWidth = getTypeWidth(tableKey->expression->type, typeMap);
623623
auto matchType = getKeyMatchType(tableKey, refMap);
624-
if (matchType == P4::P4CoreLibrary::instance.exactMatch.name) {
624+
if (matchType == P4::P4CoreLibrary::instance().exactMatch.name) {
625625
addExact(k, keyWidth, typeMap);
626-
} else if (matchType == P4::P4CoreLibrary::instance.lpmMatch.name) {
626+
} else if (matchType == P4::P4CoreLibrary::instance().lpmMatch.name) {
627627
addLpm(k, keyWidth, typeMap);
628-
} else if (matchType == P4::P4CoreLibrary::instance.ternaryMatch.name) {
628+
} else if (matchType == P4::P4CoreLibrary::instance().ternaryMatch.name) {
629629
addTernary(k, keyWidth, typeMap);
630630
} else if (matchType == "range") {
631631
addRange(k, keyWidth, typeMap);

backends/ebpf/ebpfControl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace EBPF {
2929
ControlBodyTranslator::ControlBodyTranslator(const EBPFControl *control)
3030
: CodeGenInspector(control->program->refMap, control->program->typeMap),
3131
control(control),
32-
p4lib(P4::P4CoreLibrary::instance) {
32+
p4lib(P4::P4CoreLibrary::instance()) {
3333
setName("ControlBodyTranslator");
3434
}
3535

backends/ebpf/ebpfModel.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class EBPFModel : public ::Model::Model {
5757
hash_table("hash_table"),
5858
tableImplProperty("implementation"),
5959
CPacketName("skb"),
60-
packet("packet", P4::P4CoreLibrary::instance.packetIn, 0),
60+
packet("packet", P4::P4CoreLibrary::instance().packetIn, 0),
6161
filter(),
6262
counterIndexType("u32"),
6363
counterValueType("u32") {}

backends/ebpf/ebpfParser.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class StateTranslationVisitor : public CodeGenInspector {
4848

4949
public:
5050
explicit StateTranslationVisitor(P4::ReferenceMap *refMap, P4::TypeMap *typeMap)
51-
: CodeGenInspector(refMap, typeMap), p4lib(P4::P4CoreLibrary::instance), state(nullptr) {}
51+
: CodeGenInspector(refMap, typeMap), p4lib(P4::P4CoreLibrary::instance()), state(nullptr) {}
5252

5353
void setState(const EBPFParserState *state) { this->state = state; }
5454
bool preorder(const IR::ParserState *state) override;

backends/ebpf/ebpfProgram.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void EBPFProgram::emitLocalVariables(CodeBuilder *builder) {
217217

218218
builder->emitIndent();
219219
builder->appendFormat("enum %s %s = %s;", errorEnum.c_str(), errorVar.c_str(),
220-
P4::P4CoreLibrary::instance.noError.str());
220+
P4::P4CoreLibrary::instance().noError.str());
221221
builder->newline();
222222

223223
builder->emitIndent();

backends/ebpf/ebpfTable.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void EBPFTable::validateKeys() const {
140140
for (auto it : keyGenerator->keyElements) {
141141
auto mtdecl = program->refMap->getDeclaration(it->matchType->path, true);
142142
auto matchType = mtdecl->getNode()->to<IR::Declaration_ID>();
143-
if (matchType->name.name == P4::P4CoreLibrary::instance.lpmMatch.name) {
143+
if (matchType->name.name == P4::P4CoreLibrary::instance().lpmMatch.name) {
144144
if (it != *lastKey) {
145145
::error(ErrorType::ERR_UNSUPPORTED,
146146
"%1% field key must be at the end of whole key", it->matchType);
@@ -297,7 +297,7 @@ void EBPFTable::emitValueActionIDNames(CodeBuilder *builder) {
297297
auto action = adecl->getNode()->to<IR::P4Action>();
298298
// no need to define a constant for NoAction,
299299
// "case 0" will be explicitly generated in the action handling switch
300-
if (action->name.originalName == P4::P4CoreLibrary::instance.noAction.name) {
300+
if (action->name.originalName == P4::P4CoreLibrary::instance().noAction.name) {
301301
continue;
302302
}
303303
builder->emitIndent();
@@ -333,7 +333,7 @@ void EBPFTable::emitValueStructStructure(CodeBuilder *builder) {
333333
for (auto a : actionList->actionList) {
334334
auto adecl = program->refMap->getDeclaration(a->getPath(), true);
335335
auto action = adecl->getNode()->to<IR::P4Action>();
336-
if (action->name.originalName == P4::P4CoreLibrary::instance.noAction.name) continue;
336+
if (action->name.originalName == P4::P4CoreLibrary::instance().noAction.name) continue;
337337
cstring name = EBPFObject::externalName(action);
338338
emitActionArguments(builder, action, name);
339339
}
@@ -408,7 +408,7 @@ void EBPFTable::emitInstance(CodeBuilder *builder) {
408408
for (auto it : keyGenerator->keyElements) {
409409
auto mtdecl = program->refMap->getDeclaration(it->matchType->path, true);
410410
auto matchType = mtdecl->getNode()->to<IR::Declaration_ID>();
411-
if (matchType->name.name == P4::P4CoreLibrary::instance.lpmMatch.name) {
411+
if (matchType->name.name == P4::P4CoreLibrary::instance().lpmMatch.name) {
412412
if (tableKind == TableLPMTrie) {
413413
::error(ErrorType::ERR_UNSUPPORTED, "%1%: only one LPM field allowed",
414414
it->matchType);
@@ -491,7 +491,7 @@ void EBPFTable::emitKey(CodeBuilder *builder, cstring keyName) {
491491

492492
bool isLPMKeyBigEndian = false;
493493
if (isLPMTable()) {
494-
if (c->matchType->path->name.name == P4::P4CoreLibrary::instance.lpmMatch.name)
494+
if (c->matchType->path->name.name == P4::P4CoreLibrary::instance().lpmMatch.name)
495495
isLPMKeyBigEndian = true;
496496
}
497497

@@ -852,7 +852,7 @@ void EBPFTable::emitLookup(CodeBuilder *builder, cstring key, cstring value) {
852852
}
853853

854854
cstring EBPFTable::p4ActionToActionIDName(const IR::P4Action *action) const {
855-
if (action->name.originalName == P4::P4CoreLibrary::instance.noAction.name) {
855+
if (action->name.originalName == P4::P4CoreLibrary::instance().noAction.name) {
856856
// NoAction always gets ID=0.
857857
return "0";
858858
}
@@ -871,10 +871,10 @@ bool EBPFTable::isLPMTable() const {
871871
for (auto it : keyGenerator->keyElements) {
872872
auto mtdecl = program->refMap->getDeclaration(it->matchType->path, true);
873873
auto matchType = mtdecl->getNode()->to<IR::Declaration_ID>();
874-
if (matchType->name.name == P4::P4CoreLibrary::instance.ternaryMatch.name) {
874+
if (matchType->name.name == P4::P4CoreLibrary::instance().ternaryMatch.name) {
875875
// if there is a ternary field, we are sure, it is not an LPM table.
876876
return false;
877-
} else if (matchType->name.name == P4::P4CoreLibrary::instance.lpmMatch.name) {
877+
} else if (matchType->name.name == P4::P4CoreLibrary::instance().lpmMatch.name) {
878878
isLPM = true;
879879
}
880880
}
@@ -889,7 +889,7 @@ bool EBPFTable::isTernaryTable() const {
889889
for (auto it : keyGenerator->keyElements) {
890890
auto mtdecl = program->refMap->getDeclaration(it->matchType->path, true);
891891
auto matchType = mtdecl->getNode()->to<IR::Declaration_ID>();
892-
if (matchType->name.name == P4::P4CoreLibrary::instance.ternaryMatch.name) {
892+
if (matchType->name.name == P4::P4CoreLibrary::instance().ternaryMatch.name) {
893893
return true;
894894
}
895895
}

backends/ebpf/ebpfTable.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ class EBPFTable : public EBPFTableBase {
122122
builder->endOfStatement(true);
123123
}
124124
virtual bool isMatchTypeSupported(const IR::Declaration_ID *matchType) {
125-
return matchType->name.name == P4::P4CoreLibrary::instance.exactMatch.name ||
126-
matchType->name.name == P4::P4CoreLibrary::instance.ternaryMatch.name ||
127-
matchType->name.name == P4::P4CoreLibrary::instance.lpmMatch.name;
125+
return matchType->name.name == P4::P4CoreLibrary::instance().exactMatch.name ||
126+
matchType->name.name == P4::P4CoreLibrary::instance().ternaryMatch.name ||
127+
matchType->name.name == P4::P4CoreLibrary::instance().lpmMatch.name;
128128
}
129129
// Whether to drop packet if no match entry found.
130130
// Some table implementations may want to continue processing.

backends/ebpf/psa/backend.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class PSASwitchBackend {
3737
: options(options),
3838
refMap(refMap),
3939
typeMap(typeMap),
40-
corelib(P4::P4CoreLibrary::instance),
40+
corelib(P4::P4CoreLibrary::instance()),
4141
target(target) {
4242
refMap->setIsV1(options.isv1());
4343
}

backends/ebpf/psa/ebpfPipeline.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void EBPFPipeline::emitLocalVariables(CodeBuilder *builder) {
5656
builder->newline();
5757
builder->emitIndent();
5858
builder->appendFormat("%s %s = %s;", errorEnum.c_str(), errorVar.c_str(),
59-
P4::P4CoreLibrary::instance.noError.str());
59+
P4::P4CoreLibrary::instance().noError.str());
6060
builder->newline();
6161
builder->emitIndent();
6262
builder->appendFormat("void* %s = %s;", packetStartVar.c_str(),

backends/ebpf/psa/ebpfPsaTable.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class EBPFTablePSAInitializerCodeGen : public CodeGenInspector {
202202
cstring matchType = key->matchType->path->name.name;
203203
auto expr = currentEntry->keys->components[currentKeyEntryIndex];
204204
unsigned width = EBPFInitializerUtils::ebpfTypeWidth(typeMap, key->expression);
205-
bool isLPMMatch = matchType == P4::P4CoreLibrary::instance.lpmMatch.name;
205+
bool isLPMMatch = matchType == P4::P4CoreLibrary::instance().lpmMatch.name;
206206
bool genPrefixLen = !tableHasTernaryMatch && isLPMMatch;
207207
bool doSwapBytes = genPrefixLen && EBPFScalarType::generatesScalar(width);
208208

@@ -615,7 +615,7 @@ void EBPFTablePSA::emitDefaultActionInitializer(CodeBuilder *builder) {
615615
const IR::Expression *defaultAction = t->getDefaultAction();
616616
auto actionName = getActionNameExpression(defaultAction);
617617
CHECK_NULL(actionName);
618-
if (actionName->path->name.originalName != P4::P4CoreLibrary::instance.noAction.name) {
618+
if (actionName->path->name.originalName != P4::P4CoreLibrary::instance().noAction.name) {
619619
auto value = program->refMap->newName("value");
620620
emitTableValue(builder, defaultAction, value);
621621
auto ret = program->refMap->newName("ret");

backends/ebpf/psa/externs/ebpfPsaTableImplementation.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void EBPFTableImplementationPSA::verifyTableNoDefaultAction(const EBPFTablePSA *
9999
auto ac = mi->to<P4::ActionCall>();
100100
BUG_CHECK(ac != nullptr, "%1%: expected an action call", mi);
101101

102-
if (ac->action->name.originalName != P4::P4CoreLibrary::instance.noAction.name) {
102+
if (ac->action->name.originalName != P4::P4CoreLibrary::instance().noAction.name) {
103103
::error(ErrorType::ERR_UNSUPPORTED,
104104
"%1%: Default action cannot be defined for table %2% with implementation %3%",
105105
defaultAction, instance->table->container->name, declaration);
@@ -276,7 +276,7 @@ void EBPFActionSelectorPSA::emitInitializer(CodeBuilder *builder) {
276276
builder->appendFormat("struct %s %s = ", valueTypeName.c_str(), value.c_str());
277277
builder->blockStart();
278278
builder->emitIndent();
279-
if (action->name.originalName == P4::P4CoreLibrary::instance.noAction.name) {
279+
if (action->name.originalName == P4::P4CoreLibrary::instance().noAction.name) {
280280
builder->append(".action = 0,");
281281
} else {
282282
builder->appendFormat(".action = %s,", p4ActionToActionIDName(action));

backends/ubpf/ubpfControl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ UBPFControlBodyTranslator::UBPFControlBodyTranslator(const UBPFControl *control)
2929
: EBPF::CodeGenInspector(control->program->refMap, control->program->typeMap),
3030
EBPF::ControlBodyTranslator(control),
3131
control(control),
32-
p4lib(P4::P4CoreLibrary::instance) {
32+
p4lib(P4::P4CoreLibrary::instance()) {
3333
setName("UBPFControlBodyTranslator");
3434
}
3535

backends/ubpf/ubpfDeparser.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class OutHeaderSize final : public EBPF::CodeGenInspector {
6464
bool preorder(const IR::ExitStatement *statement) override { return illegal(statement); }
6565
bool preorder(const IR::MethodCallStatement *statement) override {
6666
LOG5("Calculate OutHeaderSize");
67-
auto &p4lib = P4::P4CoreLibrary::instance;
67+
auto &p4lib = P4::P4CoreLibrary::instance();
6868

6969
auto mi = P4::MethodInstance::resolve(statement->methodCall, refMap, typeMap);
7070
auto method = mi->to<P4::ExternMethod>();
@@ -104,7 +104,7 @@ class OutHeaderSize final : public EBPF::CodeGenInspector {
104104
UBPFDeparserTranslationVisitor::UBPFDeparserTranslationVisitor(const UBPFDeparser *deparser)
105105
: CodeGenInspector(deparser->program->refMap, deparser->program->typeMap),
106106
deparser(deparser),
107-
p4lib(P4::P4CoreLibrary::instance) {
107+
p4lib(P4::P4CoreLibrary::instance()) {
108108
setName("UBPFDeparserTranslationVisitor");
109109
}
110110

backends/ubpf/ubpfModel.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class UBPFModel : public ::Model::Model {
6565
protected:
6666
UBPFModel()
6767
: CPacketName("pkt"),
68-
packet("packet", P4::P4CoreLibrary::instance.packetIn, 0),
68+
packet("packet", P4::P4CoreLibrary::instance().packetIn, 0),
6969
pipeline(),
7070
registerModel(),
7171
drop("mark_to_drop"),

backends/ubpf/ubpfParser.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class UBPFStateTranslationVisitor : public EBPF::CodeGenInspector {
5050
public:
5151
explicit UBPFStateTranslationVisitor(const UBPFParserState *state)
5252
: CodeGenInspector(state->parser->program->refMap, state->parser->program->typeMap),
53-
p4lib(P4::P4CoreLibrary::instance),
53+
p4lib(P4::P4CoreLibrary::instance()),
5454
state(state) {}
5555
bool preorder(const IR::ParserState *state) override;
5656
bool preorder(const IR::SelectCase *selectCase) override;

backends/ubpf/ubpfTable.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ void UBPFTable::setTableKind() {
202202
for (auto it : keyGenerator->keyElements) {
203203
auto mtdecl = program->refMap->getDeclaration(it->matchType->path, true);
204204
auto matchType = mtdecl->getNode()->to<IR::Declaration_ID>();
205-
if (matchType->name.name == P4::P4CoreLibrary::instance.lpmMatch.name) {
205+
if (matchType->name.name == P4::P4CoreLibrary::instance().lpmMatch.name) {
206206
if (tableKind == EBPF::TableLPMTrie) {
207207
::error(ErrorType::ERR_UNSUPPORTED, "only one LPM field allowed", it->matchType);
208208
return;
@@ -280,8 +280,8 @@ void UBPFTable::emitKeyType(EBPF::CodeBuilder *builder) {
280280

281281
auto mtdecl = program->refMap->getDeclaration(c->matchType->path, true);
282282
auto matchType = mtdecl->getNode()->to<IR::Declaration_ID>();
283-
if (matchType->name.name != P4::P4CoreLibrary::instance.exactMatch.name &&
284-
matchType->name.name != P4::P4CoreLibrary::instance.lpmMatch.name)
283+
if (matchType->name.name != P4::P4CoreLibrary::instance().exactMatch.name &&
284+
matchType->name.name != P4::P4CoreLibrary::instance().lpmMatch.name)
285285
::error(ErrorType::ERR_UNSUPPORTED_ON_TARGET, "Match of type %1% not supported",
286286
c->matchType);
287287
key_idx++;
@@ -312,7 +312,7 @@ void UBPFTable::emitActionArguments(EBPF::CodeBuilder *builder, const IR::P4Acti
312312
}
313313

314314
cstring UBPFTable::generateActionName(const IR::P4Action *action) {
315-
if (action->getName().originalName == P4::P4CoreLibrary::instance.noAction.name) {
315+
if (action->getName().originalName == P4::P4CoreLibrary::instance().noAction.name) {
316316
return this->noActionName;
317317
} else {
318318
return EBPF::EBPFObject::externalName(action);

0 commit comments

Comments
 (0)