[Bug Report] ----------------------------- Category: Other Package: ns 2.33 OS: open Suse 10.2 Environment Variables: LD_LIBRARY_PATH='empty' TCL_LIBRARY='empty' TK_LIBRARY='empty'
----------------------------- Description: Description of Problem: Maximum number of packets which can be enqueued in a DropTail queue is not correct. From a TCL script we have an ability to set queue-limit to a certain value (e.g. 16). In the "\ns-2.33\queue\drop-tail.cc" file we have the following function "DropTail::enque(Packet* p)" which enables packet drop mechanism in case if queue is built. One of the conditions to enable this mechanism is the following if ( ... (q_->length() + 1) >= qlim_ ...) where q_->length() - contains number of packets sitting in a drop-tail queue qlim_ - limit of the queue (which can be set in a TCL script - 16 in our case) If we have 15 packets enqueued and one more packet has arrived we will have true condition: 15 + 1 >= 16. Thus packet is dropped however the queue-limit was not achieved. It can be 'cured' easily by exchanging >= with >. For more info please refer to the following links: http://mailman.isi.edu/pipermail/ns-users/2008-April/062754.html http://mailman.isi.edu/pipermail/ns-users/2008-April/062763.html These are my letters to the ns-users mail-list with detailed description of the issue. How Easily Reproducible: every time Steps to Reproduce: 1. Have simple topology like "node1---router1--router2----node2" with high traffic (to enable packet drops on router1). 2. Set type of the queue between routers to DropTail and set its queue-limit to a certain value. 3. From the the "DropTail::enque(Packet* p)" function in "\ns-2.33\queue\drop-tail.cc" file print "q_->length()" and "qlim_" values in case of packet drop. Actual Results: Queue-limit is unreachable and actual maximum number of packets sitting in a queue is equal to (queue-limit - 1). Expected Results: Maximum number of packets in a queue to be equal to the queue-limit. Additional Information: 1. simulation script http://azazel.ntl.nnov.ru/_bag_report/_simple2nodes.tcl 2. "trace-all" file http://azazel.ntl.nnov.ru/_bag_report/global_out_withPatch.tr http://azazel.ntl.nnov.ru/_bag_report/global_out_withoutPatch.tr 3. console output with timer points and patch printing drop events http://azazel.ntl.nnov.ru/_bag_report/console_output_withPatch.tr http://azazel.ntl.nnov.ru/_bag_report/console_output_withoutPatch.tr 4. patch file to fix the issue (with printf): http://azazel.ntl.nnov.ru/_bag_report/ns-queueLimit.patch Place it to the ns-2.33 directory and run patch -p1 < ns-queueLimit.patch
