[GSOC 2017 - TCP optimization and fine tuning] Final Report

Blog post by a-star on Sat, 2017-08-26 02:23

Hello everyone

The end of the GSOC period is drawing near. In this blogpost I would like to summarize the work done during this period. To know where it all began, refer to my first blog post which can be found here.


When I started, a running implementation of TCP existed in Haiku. My work was to read it, understand it and improve it. When I say improvement, I mean in terms of implementing new congestion control algorithms, updating the exisiting ones with recent request for comments documents (RFCs) and extending the current capabilities of the implementation. The roadmap to all this is RFC 7414 itself.

I picture my work as having two distinct parts. The first part concerns the implementation of the changes while the second is about providing the proof of robustness and of improvement for these changes (testing in short). The work done for the first part is what will be or is merged with the Haiku source code. The work for the second part resulted in a new tool that can be used for performing black box testing on a TCP/IP stack by injecting packets and reading responses, plus, it generated various test metrics for Haiku to empirically describe it's TCP implementation.

Part I - the patches

Since I was working on a kernel module, I submitted my changes in the form of patches for e-mail submission (generated using the git format-patch command). They haven't been merged yet since they are still under review. Following are the hyper-links to these patches:

  1. Slow start and Congestion Avoidance
  2. Fast retransmit and fast recovery
  3. Limited transmit
  4. Protection Against wrapped sequences
  5. Retransmission Timeout
  6. Ideal Timer implementation
  7. NewReno modification to TCP
  8. Selective Acknowledgement

Part II - the tests

I built a tool which uses the libpcap library to inject and read raw packets and transferred the repository's ownership to HaikuArchives. It was accepted and now its a part of the archive.

  1. pi : the tool I was talking about
  2. Throughput and other statisitcs : to know about the test setup refer to my blog here. The test outputs are placed in a folder named "tests" present in the same repo as above.

What's left out

Some of the extensions such as extended SACK, urgent data mechanism and Path MTU discovery are yet to be implemented. I will work on them shortly.

Thanks for reading. It’s been awesome this summer.