Skip to content

Commit

Permalink
[cpplint] wrap lines >100 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
thomascalvert-xlnx committed Sep 15, 2023
1 parent f96a2a0 commit 13d8f4b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion backends/ebpf/ebpfControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,8 @@ bool EBPFControl::build() {

if (program->model.arch == ModelArchitecture::XdpSwitch) {
if (pl->size() != 3) {
::error(ErrorType::ERR_EXPECTED, "Expected control block %s to have exactly 3 parameters", controlBlock->getName());
::error(ErrorType::ERR_EXPECTED, "Expected control block %s to have exactly 3 parameters",
controlBlock->getName());
return false;
}
headers = *it;
Expand Down
16 changes: 10 additions & 6 deletions backends/ebpf/ebpfProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ bool EBPFProgram::build() {
auto pack = toplevel->getMain();
if (pack->type->name == "xdp") {
if (pack->getConstructorParameters()->size() != 3) {
::error(ErrorType::ERR_EXPECTED, "Expected toplevel xdp package %1% to have 3 parameters",
::error(ErrorType::ERR_EXPECTED,
"Expected toplevel xdp package %1% to have 3 parameters",
pack->type);
return false;
}
Expand All @@ -47,15 +48,18 @@ bool EBPFProgram::build() {
pack->type->name);

if (pack->getConstructorParameters()->size() != 2) {
::error(ErrorType::ERR_EXPECTED, "Expected toplevel ebpfFilter package %1% to have 2 parameters",
::error(ErrorType::ERR_EXPECTED,
"Expected toplevel ebpfFilter package %1% to have 2 parameters",
pack->type);
return false;
}
model.arch = ModelArchitecture::EbpfFilter;
}

auto prsName = (model.arch == ModelArchitecture::XdpSwitch) ? model.xdp.parser.name : model.filter.parser.name;
auto ctlName = (model.arch == ModelArchitecture::XdpSwitch) ? model.xdp.switch_.name : model.filter.filter.name;
auto prsName = (model.arch == ModelArchitecture::XdpSwitch) ? model.xdp.parser.name
: model.filter.parser.name;
auto ctlName = (model.arch == ModelArchitecture::XdpSwitch) ? model.xdp.switch_.name
: model.filter.filter.name;

auto pb = pack->getParameterValue(prsName)->to<IR::ParserBlock>();
BUG_CHECK(pb != nullptr, "No parser block found");
Expand Down Expand Up @@ -326,8 +330,8 @@ void EBPFProgram::emitPipeline(CodeBuilder *builder) {
deparser->emit(builder);
builder->blockEnd(true);
} else {
builder->target->emitTraceMessage(builder, "Control: packet processing finished, pass=%d", 1,
control->accept->name.name.c_str());
builder->target->emitTraceMessage(builder, "Control: packet processing finished, pass=%d",
1, control->accept->name.name.c_str());
}
}

Expand Down

0 comments on commit 13d8f4b

Please sign in to comment.