Initial commit for TCP ROCCET source code.
This commit is contained in:
96
README.md
Normal file
96
README.md
Normal file
@@ -0,0 +1,96 @@
|
||||
# TCP ROCCET :rocket: (RTT Oriented CUBIC Congestion control ExTension)
|
||||
|
||||
TCP ROCCET is a new TCP congestion control
|
||||
algorithm suited for current cellular 5G NR beyond networks.
|
||||
It extends the kernel default congestion control CUBIC
|
||||
and improves its performance, and additionally solves
|
||||
unwanted side effects of CUBIC’s implementation.
|
||||
ROCCET uses its own Slow Start, called LAUNCH, where loss
|
||||
is not considered as a congestion event.
|
||||
The congestion avoidance phase, called ORBITER, uses
|
||||
CUBIC's window growth function and adds, based on RTT
|
||||
and ACK rate, congestion events.
|
||||
|
||||
NOTE: A paper for TCP ROCCET is currently under review.
|
||||
|
||||
The oldest Linux kernel version we tested with ROCCET is 6.1.
|
||||
|
||||
## Setup
|
||||
|
||||
* Debian: `sudo apt install linux-headers-generic`
|
||||
* Fedora: `sudo dnf install kernel-devel`
|
||||
(`sudo reboot`)
|
||||
|
||||
## Build
|
||||
`make`
|
||||
|
||||
|
||||
## Loading & Unloading the Module
|
||||
**1.** Insert into Kernel: `sudo insmod tcp_roccet.ko`
|
||||
In case you get the "Invalid module Format" error, it can help reinstalling the kernel-headers.
|
||||
|
||||
**2.** Use the Algorithm:
|
||||
* Either via globally loading it: `sudo sysctl net.ipv4.tcp_congestion_control=roccet`
|
||||
* Or via using it in specific measurements: `sudo iperf3 -c <Server-IP> -C roccet`
|
||||
|
||||
**3.** Unload the Module: `sudo rmmod tcp_roccet`
|
||||
|
||||
|
||||
## Debugging (Using kprobe)
|
||||
In order to debug the `tcp_roccet` congestion control algorithm, there exists a Kprobe module (`roccet_kprobe.c`). Using this it is possible to inspect events generated by the algorithm.
|
||||
|
||||
In order to use the Kprobe module the following steps are necessary:
|
||||
|
||||
**1. Specify the event to inspect**
|
||||
For this head into the `tcp_roccet.c` source code and find the function the Kprobe should attach to.
|
||||
|
||||
For Example:
|
||||
```
|
||||
__bpf_kfunc static void roccettcp_cong_avoid(struct sock *sk, u32 ack, u32 acked);
|
||||
```
|
||||
Specify this function name in the field `symbol_name` of the `kprobe` struct in `roccet_kprobe.c`
|
||||
|
||||
Obtain the arguments in the kprobe using the `regs` field.
|
||||
(See the System V ABI for Linux under https://en.wikipedia.org/wiki/X86_calling_conventions#List_of_x86_calling_conventions)
|
||||
|
||||
**2. Build Kprobe module**
|
||||
Use the provided Makefile to build the `roccet_kprobe.c` module for the local machine. (`make`)
|
||||
|
||||
For this the adequate linux-headers are required
|
||||
* Debian: `sudo apt install linux-headers-generic`
|
||||
* Fedora: `sudo dnf install kernel-devel`
|
||||
|
||||
Required files for this are:
|
||||
* `Makefile`
|
||||
* `roccet_kprobe.c`
|
||||
* `tcp_roccet.h`
|
||||
* `tcp_roccet.c` (Optional; Need to remove corresponding entry in Makefile if missing)
|
||||
|
||||
**3. Load Kprobe module**
|
||||
To then load the Module use
|
||||
`sudo insmod roccet_kprobe.ko`
|
||||
If you are seeing the error "Unknown symbol in module" you need to first load the roccet algorithm.
|
||||
|
||||
**4. See the trace output**
|
||||
To see the trace output use
|
||||
`sudo cat /sys/kernel/tracing/trace_pipe`
|
||||
|
||||
**5. Unload Kprobe module**
|
||||
To remove the module again use
|
||||
`sudo rmmod roccet_kprobe`
|
||||
|
||||
_See more info at_ https://docs.kernel.org/trace/kprobes.html and https://www.kernel.org/doc/Documentation/trace/kprobetrace.rst
|
||||
|
||||
## Further Info
|
||||
* On TCP-CC Ops:
|
||||
* https://www.yonch.com/tech/linux-tcp-congestion-control-internals
|
||||
* https://docs.ebpf.io/linux/program-type/BPF_PROG_TYPE_STRUCT_OPS/tcp_congestion_ops/
|
||||
|
||||
# Setup Development Environment
|
||||
For specific Kernel:
|
||||
1. Download linux source (the version you want to develop for)
|
||||
2. Create Config via `make defconfig`
|
||||
3. Compile kernel via `make`
|
||||
4. Generate clangd Config via `python scripts/clang-tools/gen_compile_commands.py`
|
||||
5. Copy `compile_commands.json` to development directory
|
||||
|
||||
Reference in New Issue
Block a user