shadow/shadow — pull request #197 by jdgeddes (2014-04-16 04:04:42+00:00)
Title: Fixed TCP congestion control, no longer relies on packet drop event hack.

Removed hack in shd-worker.c which ensures that only around 10% of lost packets gets triggered by a timer expiration (using the packet drop event).

CUBIC congestion control algorithm now has a minimum congestion window of 2. This allows for more ACKs to be sent making detection of packet loss easier.

Cleaned up tcp_processPacket function -- data and ACK processing now have their own function.

NOTE: With these changes, we no longer track the results from network simulator (NS2) as closely. Here are the results with 0-20% packet loss and zoomed in at 0-1% packet loss:

![times-vs-ploss-large](https://cloud.githubusercontent.com/assets/349679/2715978/a4f6f364-c51b-11e3-98a0-bd0bcb785786.png)
![times-vs-ploss-small](https://cloud.githubusercontent.com/assets/349679/2715979/a4f75a8e-c51b-11e3-8d6b-2938d467ee29.png)

This could be caused by the fact that we still do not drop control packets (packets of length 0). If this is removed shadow cannot perform ANY downloads past somewhere around 5-10%. I believe NS also does not drop control packets, but this was only from observations after the run, never confirmed in the source code. It could just be that control packets are rarely dropped, as the packets are short and, with very high probability, will fit into the network queue that NS uses.