Bug 2394 - FlowMonitor gets confused with traffic control requeuing
FlowMonitor gets confused with traffic control requeuing
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: traffic-control
ns-3.25
PC Linux
: P5 normal
Assigned To: Stefano Avallone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-03 07:35 UTC by Matías Richart
Modified: 2016-08-28 10:46 UTC (History)
1 user (show)

See Also:


Attachments
Add flow monitor to traffic-control example (2.57 KB, patch)
2016-05-11 07:31 UTC, Matías Richart
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matías Richart 2016-05-03 07:35:21 UTC
FlowMonitor records the drops from the netdevice and do not consider the requeuing done by the traffic control layer.

I think the problem is related with the issue mentioned here http://mailman.isi.edu/pipermail/ns-developers/2016-April/013524.html and drop tracing at netdevices.
Comment 1 Stefano Avallone 2016-05-03 09:34:58 UTC
Yes, FlowMonitor needs to be fixed. Can you please post an example showing the issues you found?
Comment 2 Matías Richart 2016-05-11 07:30:56 UTC
Sorry for the late reply.
I attach a patch which adds flow monitor to the traffic control example. 
It can be seen the difference of the throughput shown by the flow monitor and the calculated using GetTotalRx from the Sink application.
The difference matches almost exactly with the bytes dropped and requeued.
Comment 3 Matías Richart 2016-05-11 07:31:53 UTC
Created attachment 2430 [details]
Add flow monitor to traffic-control example
Comment 4 Stefano Avallone 2016-08-28 10:46:37 UTC
This bug has been fixed with the revision of the requeue mechanism. Further, I just made the flow monitor able to keep track of the packets dropped by the queue discs. The updated traffic-control example outputs:

*** Flow monitor statistics ***
  Tx Packets:   7682
  Tx Bytes:   11509900
  Offered Load: 10.003 Mbps
  Rx Packets:   7641
  Rx Bytes:   11448400
  Packets Dropped by Queue Disc:   41
  Bytes Dropped by Queue Disc:   61500
  Packets Dropped by NetDevice:   0
  Bytes Dropped by NetDevice:   0
  Throughput: 9.94953 Mbps
  Mean delay:   0.0143646
  Mean jitter:   0.00119161

*** Application statistics ***
  Rx Bytes: 11051136
  Average Goodput: 8.84091 Mbit/s

*** TC Layer statistics ***
  Packets dropped by the TC layer: 41
  Bytes dropped by the TC layer: 61500
  Packets dropped by the netdevice: 0
  Packets requeued by the TC layer: 0

The difference in the Rx Bytes is due to the fact that the flow monitor counts the network and transport headers, while the application does not.