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

Method Codel

core/utils/codel.h:71–81  ·  view source on GitHub ↗

Takes a drop function which is a function that should take a dropped object and handle it removing the object potentially including freeing the object. If there is no need to handle a dropped object, NULL can be passed instead. target is the target delay in nanoseconds and the window is the buffer time u in nanosecond before changing into drop state.

Source from the content-addressed store, hash-verified

69 // target is the target delay in nanoseconds and the window is the buffer time u
70 // in nanosecond before changing into drop state.
71 Codel(void (*drop_func)(T)= NULL, size_t max_entries=0, uint64_t target = kDefaultTarget,
72 uint64_t window = kDefaultWindow)
73 : delay_target_(target),
74 window_(window),
75 time_above_target_(0),
76 next_drop_time_(NanoSecondTime() + window),
77 drop_count_(0),
78 dropping_(0),
79 max_size_(max_entries),
80 queue_(),
81 drop_func_(drop_func) { }
82
83 // deconstructor that drops all objects still left in the internal queue.
84 virtual ~Codel() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected