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

Method PropagateActiveWorker

core/module_graph.cc:385–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385void ModuleGraph::PropagateActiveWorker() {
386 for (auto &pair : all_modules_) {
387 Module *m = pair.second;
388 m->ResetActiveWorkerSet();
389 }
390 for (int i = 0; i < Worker::kMaxWorkers; i++) {
391 if (workers[i] == nullptr) {
392 continue;
393 }
394 if (bess::TrafficClass *root = workers[i]->scheduler()->root()) {
395 for (const auto &tc_pair : bess::TrafficClassBuilder::all_tcs()) {
396 bess::TrafficClass *c = tc_pair.second;
397 if (c->policy() == bess::POLICY_LEAF && c->Root() == root) {
398 auto leaf = static_cast<bess::LeafTrafficClass *>(c);
399 leaf->task()->AddActiveWorker(i);
400 }
401 }
402 }
403 }
404}

Callers

nothing calls this directly

Calls 7

ResetActiveWorkerSetMethod · 0.80
rootMethod · 0.80
schedulerMethod · 0.80
policyMethod · 0.80
RootMethod · 0.80
taskMethod · 0.80
AddActiveWorkerMethod · 0.45

Tested by

no test coverage detected