I'm still trying to verify that the RIO implementation functions properly. By the way, I think the implementation is wrong and needs update.
It sets the idletime and in_idletime when the queue is empty (in deque()).
Say the queue was idle for the duration of 10/ptc. And after this,
let we have 1 "in" and 1 "out" packets.
m=10 m=11?
-+---+ <-- 10/ptc --> +---+---+
| |________________| I | O |____________
The first in packet causes the v_ave and in_v_ave to be updated as follows:
(m is 10)
while (--m >= 1) {
in_v_ave *= 1.0 - edp_.q_w;
v_ave *= 1.0 - edp_.q_w;
}
in_v_ave *= 1.0 - (float)edp_.q_w;
in_v_ave += (float)edp_.q_w
* in_queued;
v_ave *= 1.0 - (float)edp_.q_w;
v_ave += edp_.q_w *
total_queued;
This is OK. However the out packet causes the following update:
(m is ***11***)
while (--m >= 1) {
out_v_ave *= 1.0 - edp_.q_w;
v_ave *= 1.0 - edp_.q_w;
}
out_v_ave *= 1.0 - (float)edp_.q_w;
out_v_ave += (float)edp_.q_w
* in_queued;
v_ave *= 1.0 - (float)edp_.q_w;
v_ave += edp_.q_w *
total_queued;
The update for out_v_ave is OK, but the v_ave variable should not be updated. Because it was just updated by the preceeding in packet.
I'd be pleased if anyone can tell me if my conclusion is correct. Because if so, Sean's implementation of updating ewmas seems ok.
cheers,
-- ___________________________________________________________________ Bahri OKUROGLU Software Design Engineer Nortel Networks, Netas R&D RT6 mailto:[email protected] http://www.netas.com.tr mailto:[email protected] http://www.nortelnetworks.com Nortel Networks, Netas Alemdag Cad. Umraniye 81244 ISTANBUL TURKEY ___________________________________________________________________