Bugzilla – Bug 913
Queue Enqueue/Drop trace sources behavior unintuitive
Last modified: 2010-05-17 10:33:03 UTC
Reported by Dani Camps here: http://mailman.isi.edu/pipermail/ns-developers/2010-May/007965.html bool Queue::Enqueue (Ptr<Packet> p) { NS_LOG_FUNCTION (this << p); NS_LOG_LOGIC ("m_traceEnqueue (p)"); m_traceEnqueue (p); bool retval = DoEnqueue (p); if (retval) { ... } return retval; } Issues here: - if DoEnqueue fails, m_traceEnqueue still logs a trace. This is in contrast to the documentation that states that the trace is only hit if the packet successfully enqueues - if there is in fact a drop (e.g. overflow), the drop trace is not triggered
Created attachment 869 [details] Patch to fix enqueue trace
> if there is in fact a drop (e.g. overflow), the drop trace is not triggered the drop trace is triggered by the subclass (e.g. DroptailQueue) calling Queue::Drop. I think the attachment may do the trick.
(In reply to comment #2) > > if there is in fact a drop (e.g. overflow), the drop trace is not triggered > > the drop trace is triggered by the subclass (e.g. DroptailQueue) calling > Queue::Drop. OK, I see this now. > > I think the attachment may do the trick. Agree, +1.
fixed in changeset 6ac5cd5ec178