Skip to content

Custom tun#818

Merged
LeeSmet merged 20 commits intomasterfrom
custom_tun
Apr 28, 2026
Merged

Custom tun#818
LeeSmet merged 20 commits intomasterfrom
custom_tun

Conversation

@LeeSmet
Copy link
Copy Markdown
Contributor

@LeeSmet LeeSmet commented Apr 24, 2026

Seems this code just dissapeared from master somehow

dependabot Bot and others added 20 commits April 24, 2026 10:18
Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.8.6.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/0.8.6/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.5...0.8.6)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.8.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.8.6.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/0.8.6/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.5...0.8.6)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.8.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.8.6.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/0.8.6/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.5...0.8.6)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.8.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This allows proper simultaneous reading and writing to the interface, in
parallel

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
edition 2024, reference license file

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Throughput increased from 1.30Gbit/s to 1.60Gbit/s average on my dev
laptop, though this is likely because we now use a dedicated task for
reading and writing, which allows parallel reads and writes.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Adds backpressure compared to the unbounded channel. Prevents the TUN
reads from outpacing the Dataplane operation, which would lead to
increased latency and potential OOM. Now the data will be accumulated in
kernel buffers, and eventually get dropped.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Rather than doing an all or nothing coallesce on the received packets

This also fixes an issue with GRO'd packet csum computation, especially
on UDP

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Improves GRO performance by doing a batch of decryptions instead of
decrypting individual packets to then send them to the TUN interface

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This should slightly reduce the amount of syscalls needed when sending
packets to/receiving packets from peers under heavy load.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
@LeeSmet LeeSmet closed this Apr 28, 2026
@LeeSmet LeeSmet deleted the custom_tun branch April 28, 2026 02:23
@LeeSmet LeeSmet restored the custom_tun branch April 28, 2026 12:32
@LeeSmet LeeSmet reopened this Apr 28, 2026
@LeeSmet LeeSmet closed this Apr 28, 2026
@LeeSmet LeeSmet deleted the custom_tun branch April 28, 2026 12:36
@LeeSmet LeeSmet restored the custom_tun branch April 28, 2026 12:36
@LeeSmet LeeSmet reopened this Apr 28, 2026
@LeeSmet LeeSmet merged commit 3880378 into master Apr 28, 2026
39 of 51 checks passed
@LeeSmet LeeSmet deleted the custom_tun branch April 28, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant