[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Inconsistency between drop-tail.cc and red.cc
Hi,
I recently discovered that DropTail (DT) and RED differ in the
maximum number of packets they can hold. With DT, first the packet
is enqueued and then the queue length is computed and checked
against the maximum number allowed (qlim_). With RED it's vice
versa.
The problem is only visible if the queue limit qlim_ is hit often
(operation under overload) and the queue sizes are rather small
(i.e. if a single packet buffer matters).
Regards
-- Henning
________________________________________________________________________
Henning Sanneck
Research Institute for Open Communication Systems
GMD FOKUS, Kaiserin-Augusta-Allee 31, D-10589 Berlin, Germany
Phone : ++49 / (0)30 / 34 63 - 71 75
Fax : ++49 / (0)30 / 34 63 - 81 75
e-mail : [email protected]
WWW : http://www.fokus.gmd.de/usr/sanneck
________________________________________________________________________
drop-tail.cc:
void DropTail::enque(Packet* p)
{
q_->enque(p);
if (q_->length() >= qlim_) {
red.cc:
int qlim = qib_ ? (qlim_ * edp_.mean_pktsize) : qlim_;
(...)
if (qlen >= qlim) {
// see if we've exceeded the queue size
droptype = DTYPE_FORCED;
}
(...)
q_->enque(pkt);
Proposed fix to red.cc
int qlim = qib_ ? (qlim_-1 * edp_.mean_pktsize) : (qlim_-1);