This repository hosts modifications to the Linux kernel to enable forward error correction (FEC) in TCP. The technique is described as the "Corrective" approach in our SIGCOMM 2013 publication titled "Reducing Web Latency: The Virtue of Gentle Aggression".
The modifications were originally developed for the Linux kernel version 2.6.34 and have since been rebased to version 3.10 - though without extensive testing!
We invite you to play around with the patches and welcome your feedback. We are also happy to apply bugfixes and future rebases you might have to the existing patch set.
WARNING: Since the modifications have not been tested extensively in the current kernel version, we advise you to execute tests in an isolated environment with an option for a recovery from kernel panics, etc.
Patch components
The changes are grouped into three patches building on top of each other: Common, Receiver, and Sender. For a detailed description of the parts implemented by each patch please check the description at the top of each patch file.
Installation
To get started fetch the Linux kernel version used as the base for the patch set (here version 3.10):
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux
$ git checkout tags/v3.10
Next, check out the patches (or download them directly). Then apply them in the right order (Common, then Receiver, then Sender):
$ git apply <local path to patches>/0001-net-tcp-TCP-with-Forward-Error-Correction-Common.patch
$ git apply <local path to patches>/0002-net-tcp-TCP-with-Forward-Error-Correction-Receiver.patch
$ git apply <local path to patches>/0003-net-tcp-TCP-with-Forward-Error-Correction-Sender.patch
All three apply
calls do NOT produce any console output if applied correctly.
NOTE: If you want to apply the patches to a different kernel version, keep in mind that the apply step can fail if some changes are conflicted with the changed code base. A possible solution is to apply a patch partially (using the --reject
flag when running git apply
) and then resolve the conflicts stored in .rej
files manually.
Finally, you need to compile and install the modified kernel. There are many tutorials on how to do this out there, so we avoid replicating instructions for this here.
The FEC feature is turned off by default in an environment running with a modified kernel. To enable it run:
$ sysctl net.ipv4.tcp_fec=1
Testing
We developed a set of packetdrill test routines to check the proper functionality of the FEC engine. We will publish them in this repository soon.
If you have further questions, feel free to contact any of the contributors.