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

Method CreateTree

core/traffic_class.h:711–719  ·  view source on GitHub ↗

These CreateTree(...) functions enable brace-initialized construction of a traffic class hierarchy. For example, CreateTree("foo", {PRIORITY}, {{PRIORITY, 10, ...}, {PRIORITY, 15, ...}}) creates a tree with a priority root and two children, one of priority 10 and one of priority 15, where the ... can contain a similar call to CreateTree to construct any similar subtree. Classes that require ar

Source from the content-addressed store, hash-verified

709 // All classes constructed via these routines are created through calls to
710 // CreateTrafficClass above.
711 static TrafficClass *CreateTree(const std::string &name,
712 [[maybe_unused]] PriorityArgs args,
713 std::vector<PriorityChildArgs> children) {
714 PriorityTrafficClass *p = CreateTrafficClass<PriorityTrafficClass>(name);
715 for (auto &c : children) {
716 p->AddChild(c.child(), c.priority());
717 }
718 return p;
719 }
720
721 static TrafficClass *CreateTree(const std::string &name,
722 WeightedFairArgs args,

Callers

nothing calls this directly

Calls 4

AddChildMethod · 0.80
shareMethod · 0.80
childMethod · 0.45
priorityMethod · 0.45

Tested by

no test coverage detected