MCPcopy Create free account
hub / github.com/NetSys/bess / RunTask

Method RunTask

core/modules/flowgen.cc:511–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511struct task_result FlowGen::RunTask(Context *ctx, bess::PacketBatch *batch,
512 void *) {
513 if (children_overload_ > 0) {
514 return {
515 .block = true, .packets = 0, .bits = 0,
516 };
517 }
518
519 const int pkt_overhead = 24;
520
521 GeneratePackets(ctx, batch);
522 RunNextModule(ctx, batch);
523
524 uint32_t cnt = batch->cnt();
525 return {.block = (cnt == 0),
526 .packets = cnt,
527 .bits = ((template_size_ + pkt_overhead) * cnt) * 8};
528}
529
530std::string FlowGen::GetDesc() const {
531 return bess::utils::Format("%d flows", active_flows_);

Callers

nothing calls this directly

Calls 1

cntMethod · 0.45

Tested by

no test coverage detected