13 Commits

Author SHA1 Message Date
Lukas Prause 64d0e54f87 Update repository to the state of the latest kernel patch. 2026-09-16 15:22:54 +02:00
Lukas Prause b355d1eb50 Update Readme and add new performance report. 2026-07-22 13:35:32 +02:00
Lukas Prause b651be77b3 Adjusts sruct size and refactor of code. 2026-07-20 15:00:23 +02:00
Lukas Prause a6356c3297 Adds send and receive rate monitoring. 2026-07-16 13:25:58 +02:00
Lukas Prause 97a59b6f20 Removes apt repo. 2026-07-14 09:56:55 +02:00
Lukas Prause 35aa714256 Improves minimum RTT probing, adds packet pacing and refactors the code. 2026-07-13 16:20:23 +02:00
Lukas Prause 52cb1fe1f1 Adds minimum RTT probing. 2026-06-12 14:01:25 +02:00
Lukas Prause 96fed81e57 Update the README file to reflect the current state of the project. 2026-03-27 14:52:29 +01:00
Lukas Prause ac8787ed10 Merge branch 'make-formatting-linux-conform' into 'master'
Make formatting linux conform

See merge request lukas.prause/tcp-roccet-kernel-module!1
2026-02-10 14:21:08 +01:00
Tim Füchsel 27d181962d Make formatting linux conform 2026-02-10 14:21:08 +01:00
Lukas Prause c24b02231a Adds ECN handling managed by ROCCET. 2026-02-09 13:51:17 +01:00
Lukas Prause 5ebd5c0cb7 Adjusts the comment about the ROCCET paper. 2026-01-30 13:34:47 +01:00
Lukas Prause a4cce7378f Update paper state in README.md 2026-01-29 11:35:20 +01:00
4 changed files with 893 additions and 351 deletions
+42 -36
View File
@@ -1,35 +1,55 @@
# TCP ROCCET :rocket: (RTT Oriented CUBIC Congestion control ExTension) # TCP ROCCET :rocket: (RTT Oriented CUBIC Congestion control ExTension)
TCP ROCCET is a new TCP congestion control TCP ROCCET is a new TCP congestion control algorithm that reduces latency by detecting queuing.
algorithm suited for current cellular 5G NR beyond networks. Additionally, it is specially suited for 4G/5G cellular 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. A peer-reviewed [paper on TCP ROCCET](https://opendl.ifip-tc6.org/db/conf/wons/wons2026/1571217211.pdf) was presented at the WONS 2026 conference.
Paper draft:
https://arxiv.org/abs/2510.25281
The oldest Linux kernel version we tested with ROCCET is 6.1. A new performance report for the latest version of TCP ROCCET can be found under "doc/measurements/2026-07-21_performance-report.pdf".
## Setup ### Versions
- latest on master branch (requires kernel version 7.1 or higher)
- Improved min RTT probing
- Packet pacing
- Code refactor
- Monitoring send and receive rate
- release-2026-06-12-v1
- Adds minimum RTT probing
## Install with apt (requires kernel version 6.10 or higher)
Add tcp-roccet-dkms to your source lists and install:
```
echo "deb [trusted=yes] https://apt.fury.io/timfuchs/ /" | sudo tee /etc/apt/sources.list.d/tcp-roccet.list
sudo apt update
sudo apt install tcp-roccet-dkms
```
### Loading and using the congestion control
Note: This change is not persistent, the module will not be loaded at boot.
```
sudo modprobe tcp_roccet
sudo sysctl net.ipv4.tcp_congestion_control=roccet
```
## Build from source
### Setup
Kernel headers are required:
* Debian: `sudo apt install linux-headers-generic` * Debian: `sudo apt install linux-headers-generic`
* Fedora: `sudo dnf install kernel-devel` * Fedora: `sudo dnf install kernel-devel`
(`sudo reboot`) (`sudo reboot`)
## Build ### Build
`make` `make`
## Loading & Unloading the Module ## Loading & Unloading the Module
**1.** Insert into Kernel: `sudo insmod tcp_roccet.ko` **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. In case you get the "Invalid module Format" error, it can help to reinstall the kernel-headers.
**2.** Use the Algorithm: **2.** Use the Algorithm:
* Either via globally loading it: `sudo sysctl net.ipv4.tcp_congestion_control=roccet` * Either via globally loading it: `sudo sysctl net.ipv4.tcp_congestion_control=roccet`
@@ -39,12 +59,12 @@ In case you get the "Invalid module Format" error, it can help reinstalling the
## Debugging (Using kprobe) ## 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 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: In order to use the Kprobe module, the following steps are necessary:
**1. Specify the event to inspect** **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 this, head into the `tcp_roccet.c` source code and find the function the Kprobe should attach to.
For Example: For Example:
``` ```
@@ -69,7 +89,7 @@ Required files for this are:
* `tcp_roccet.c` (Optional; Need to remove corresponding entry in Makefile if missing) * `tcp_roccet.c` (Optional; Need to remove corresponding entry in Makefile if missing)
**3. Load Kprobe module** **3. Load Kprobe module**
To then load the Module use To then load the module use
`sudo insmod roccet_kprobe.ko` `sudo insmod roccet_kprobe.ko`
If you are seeing the error "Unknown symbol in module" you need to first load the roccet algorithm. If you are seeing the error "Unknown symbol in module" you need to first load the roccet algorithm.
@@ -78,21 +98,7 @@ To see the trace output use
`sudo cat /sys/kernel/tracing/trace_pipe` `sudo cat /sys/kernel/tracing/trace_pipe`
**5. Unload Kprobe module** **5. Unload Kprobe module**
To remove the module again use To remove the module again, use
`sudo rmmod roccet_kprobe` `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 _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
Binary file not shown.
+762 -251
View File
File diff suppressed because it is too large Load Diff
+51 -26
View File
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* TCP ROCCET congestion control interface * TCP ROCCET congestion control interface
*/ */
@@ -6,25 +7,19 @@
#include <linux/math64.h> #include <linux/math64.h>
struct AckRate { /* State in which roccet currently operates */
u16 last_rate; /* Last ACK-rate */ enum roccet_state {
u32 last_rate_time; /* Timestamp of the last ACK-rate */ LAUNCH,
u16 curr_rate; /* Current ACK-rate */ ORBITER,
u16 cnt; /* Used for counting acks */ RTT_PROBE_ENTER,
RTT_PROBE,
RTT_PROBE_REFILL,
DRAIN
}; };
struct BandwidthLimitDetect { /* TCP ROCCET struct based on the original BICTCP struct with
u32 sum_cwnd; /* sum of cwnd during time interval */ * additions specific to the ROCCET-Algorithm.
u32 sum_acked; /* sum of received acks during time interval */ */
u32 next_check; /* end/upper bound of time interval */
};
struct TimedRTT {
u32 time; /* Time of recoding */
u32 rtt; /* Measured RTT */
};
/* Based on the BICTCP struct with additions specific for the ROCCET-Algorithm */
struct roccettcp { struct roccettcp {
u32 cnt; /* increase cwnd by 1 after ACKs */ u32 cnt; /* increase cwnd by 1 after ACKs */
u32 last_max_cwnd; /* last maximum snd_cwnd */ u32 last_max_cwnd; /* last maximum snd_cwnd */
@@ -32,21 +27,51 @@ struct roccettcp {
u32 last_time; /* time when updated last_cwnd */ u32 last_time; /* time when updated last_cwnd */
u32 bic_origin_point; /* origin point of bic function */ u32 bic_origin_point; /* origin point of bic function */
u32 bic_K; /* time to origin point from the u32 bic_K; /* time to origin point from the
beginning of the current epoch */ * beginning of the current epoch
*/
u32 delay_min; /* min delay (usec) */ u32 delay_min; /* min delay (usec) */
u32 epoch_start; /* beginning of an epoch */ u32 epoch_start; /* beginning of an epoch */
u32 ack_cnt; /* number of acks */ u32 ack_cnt; /* number of acks */
u32 tcp_cwnd; /* estimated tcp cwnd */ u32 tcp_cwnd; /* estimated tcp cwnd */
u32 curr_rtt; /* the minimum rtt of current round */ u32 curr_rtt; /* last sample rtt of current round */
u32 roccet_last_event_time_us; /* The last time ROCCETv2 was triggered */ u32 roccet_last_event_time_us; /* The last time ROCCET was triggered */
u32 curr_min_rtt; /* The current observed minRTT */ u32 curr_min_rtt; /* The current observed minRTT */
struct TimedRTT curr_min_rtt_timed; /* The current observed minRTT with u32 next_min_rtt_probe; /* Next time to probe the minRTT */
the timestamp when it was observed */ u32 probe_min_rtt_until; /* End of minRTT probing period.
u32 curr_srRTT; /* The srRTT calculated based on the latest ACK */ * Set while in RTT_PROBE states
struct AckRate ack_rate; /* The last and the current ACK rate */ */
struct BandwidthLimitDetect bw_limit; u32 refill_until; /* End of pipe refill after minRTT probe.
u32 last_rtt; /* Used for jitter calculation */ * Set while in RTT_PROBE states
*/
u32 cwnd_before_min_rtt_probe; /* cwnd before min RTT probing. */
u32 curr_srrtt; /* srRTT calculated based on the latest ACK */
u32 next_srrtt_check_ts; /* Next check for srRTT */
u32 last_rtt; /* sample rtt of previous round.
* Used for jitter calculation
*/
u32 interval_snd_seq_start;
u32 interval_una_seq_start;
u32 ack_rate_last_rate_time; /* Timestamp of the last ACK-rate */
u16 ack_rate_last_rate; /* Last ACK-rate */
u16 ack_rate_curr_rate; /* Current ACK-rate */
u16 ack_rate_cnt; /* Used for counting acks */
enum roccet_state state : 3; /* Current operating state of roccet */
bool was_idle : 1; /* Tracks whether the connection was idle
* (had no in-flight packets)
*/
bool initial_limit_reached: 1; /* Set to true after the connection
* initially gets cwnd-limited
*/
bool is_in_initial_launch: 1; /* true if the connection is in
* the initial launch phase.
*/
u32 ack_carry_over; /* Used to carry over leftover acks from
* LAUNCH to ORBITER
*/
}; };
#endif /* __TCP_ROCCET_H */ #endif /* __TCP_ROCCET_H */