Compare commits

..

1 Commits

4 changed files with 378 additions and 881 deletions
+37 -43
View File
@@ -1,55 +1,35 @@
# TCP ROCCET :rocket: (RTT Oriented CUBIC Congestion control ExTension)
TCP ROCCET is a new TCP congestion control algorithm that reduces latency by detecting queuing.
Additionally, it is specially suited for 4G/5G cellular networks.
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 CUBICs 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.
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.
NOTE: A paper for TCP ROCCET is currently under review.
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`
* Fedora: `sudo dnf install kernel-devel`
(`sudo reboot`)
### Build
## 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 to reinstall the kernel-headers.
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`
@@ -59,12 +39,12 @@ In case you get the "Invalid module Format" error, it can help to reinstall the
## 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**
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:
```
@@ -89,7 +69,7 @@ Required files for this are:
* `tcp_roccet.c` (Optional; Need to remove corresponding entry in Makefile if missing)
**3. Load Kprobe module**
To then load the module use
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.
@@ -98,7 +78,21 @@ To see the trace output use
`sudo cat /sys/kernel/tracing/trace_pipe`
**5. Unload Kprobe module**
To remove the module again, use
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
Binary file not shown.
+301 -775
View File
File diff suppressed because it is too large Load Diff
+40 -63
View File
@@ -1,4 +1,3 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* TCP ROCCET congestion control interface
*/
@@ -7,71 +6,49 @@
#include <linux/math64.h>
/* State in which roccet currently operates */
enum roccet_state {
LAUNCH,
ORBITER,
RTT_PROBE_ENTER,
RTT_PROBE,
RTT_PROBE_REFILL,
DRAIN
struct AckRate {
u16 last_rate; /* Last ACK-rate */
u32 last_rate_time; /* Timestamp of the last ACK-rate */
u16 curr_rate; /* Current ACK-rate */
u16 cnt; /* Used for counting acks */
};
/* TCP ROCCET struct based on the original BICTCP struct with
* additions specific to the ROCCET-Algorithm.
*/
struct BandwidthLimitDetect {
u32 sum_cwnd; /* sum of cwnd during time interval */
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 {
u32 cnt; /* increase cwnd by 1 after ACKs */
u32 last_max_cwnd; /* last maximum snd_cwnd */
u32 last_cwnd; /* the last snd_cwnd */
u32 last_time; /* time when updated last_cwnd */
u32 bic_origin_point; /* origin point of bic function */
u32 bic_K; /* time to origin point from the
* beginning of the current epoch
*/
u32 delay_min; /* min delay (usec) */
u32 epoch_start; /* beginning of an epoch */
u32 ack_cnt; /* number of acks */
u32 tcp_cwnd; /* estimated tcp cwnd */
u32 curr_rtt; /* last sample rtt of current round */
u32 cnt; /* increase cwnd by 1 after ACKs */
u32 last_max_cwnd; /* last maximum snd_cwnd */
u32 last_cwnd; /* the last snd_cwnd */
u32 last_time; /* time when updated last_cwnd */
u32 bic_origin_point; /* origin point of bic function */
u32 bic_K; /* time to origin point from the
beginning of the current epoch */
u32 delay_min; /* min delay (usec) */
u32 epoch_start; /* beginning of an epoch */
u32 ack_cnt; /* number of acks */
u32 tcp_cwnd; /* estimated tcp cwnd */
u32 curr_rtt; /* the minimum rtt of current round */
u32 roccet_last_event_time_us; /* The last time ROCCET was triggered */
u32 curr_min_rtt; /* The current observed minRTT */
u32 next_min_rtt_probe; /* Next time to probe the minRTT */
u32 probe_min_rtt_until; /* End of minRTT probing period.
* Set while in RTT_PROBE states
*/
u32 refill_until; /* End of pipe refill after minRTT probe.
* 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
*/
u32 roccet_last_event_time_us; /* The last time ROCCET was triggered */
u32 ece_cwnd; /* The cwnd when a ECE bit was received */
u32 ece_srrtt; /* The srRTT whent the ECE was received */
u32 curr_min_rtt; /* The current observed minRTT */
struct TimedRTT curr_min_rtt_timed; /* The current observed minRTT with
the timestamp when it was observed */
u32 curr_srRTT; /* The srRTT calculated based on the latest ACK */
struct AckRate ack_rate; /* The last and the current ACK rate */
struct BandwidthLimitDetect bw_limit;
u32 last_rtt; /* Used for jitter calculation */
};
#endif /* __TCP_ROCCET_H */
#endif /* __TCP_ROCCET_H */