Skip to content

Commit 301011e

Browse files
committed
vey-reuseport: add udp reuseport socket selector
1 parent 14c7389 commit 301011e

12 files changed

Lines changed: 935 additions & 3 deletions

File tree

.github/workflows/linux-basic.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
run: |
5353
sudo apt-get update
5454
sudo apt-get install capnproto libjemalloc-dev libmimalloc-dev libc-ares-dev libssl-dev liblua5.4-dev
55+
sudo apt-get install libbpf-dev linux-bpf-dev
5556
- name: Cargo build
5657
run: cargo build --features jemalloc,lua54
5758
- name: Cargo test
@@ -73,5 +74,6 @@ jobs:
7374
run: |
7475
sudo apt-get update
7576
sudo apt-get install capnproto libjemalloc-dev libmimalloc-dev libc-ares-dev libssl-dev liblua5.4-dev
77+
sudo apt-get install libbpf-dev linux-bpf-dev
7678
- name: Cargo clippy
7779
run: cargo clippy --tests --workspace --features jemalloc,lua54 -- --deny warnings

.github/workflows/macos-basic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ jobs:
5050
- name: Cargo clippy
5151
run: cargo clippy --tests --features jemalloc,lua55 -- --deny warnings
5252
- name: Cargo test
53-
run: cargo test --workspace --features jemalloc,lua55 --exclude vey-journal
53+
run: cargo test --workspace --features jemalloc,lua55 --exclude vey-journal --exclude vey-reuseport

.github/workflows/windows-basic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ jobs:
5454
- name: Cargo clippy
5555
run: cargo clippy --no-default-features --features $env:WIN_FEATURES --tests -- --deny warnings
5656
- name: Cargo test
57-
run: cargo test --no-default-features --features $env:WIN_FEATURES --workspace --exclude vey-journal
57+
run: cargo test --no-default-features --features $env:WIN_FEATURES --workspace --exclude vey-journal --exclude vey-reuseport

Cargo.lock

Lines changed: 187 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ members = [
4949
"lib/vey-openssl",
5050
"lib/vey-redis-client",
5151
"lib/vey-resolver",
52+
"lib/vey-reuseport",
5253
"lib/vey-runtime",
5354
"lib/vey-rustls-provider",
5455
"lib/vey-slog-types",
@@ -109,6 +110,7 @@ chrono = { version = "0.4.45", default-features = false }
109110
ascii = "1.0"
110111
humanize-rs = "0.1"
111112
zeroize = "1.8"
113+
zerocopy = { version = "0.8", default-features = false, features = ["derive"] }
112114
#
113115
portable-atomic = "1.9"
114116
itoa = "1.0"
@@ -187,6 +189,7 @@ capnpc = "0.26"
187189
libc = "0.2.182"
188190
rustix = { version = "1.1", default-features = false }
189191
windows-sys = "0.61"
192+
socket2 = { version = "0.6.4", features = ["all"] }
190193
#
191194
serde = "1.0"
192195
yaml-rust = { package = "yaml-rust2", version = "0.11" }
@@ -233,6 +236,7 @@ vey-msgpack = { version = "0.4", path = "lib/vey-msgpack" }
233236
vey-openssl = { version = "0.4", path = "lib/vey-openssl" }
234237
vey-redis-client = { version = "0.3", path = "lib/vey-redis-client" }
235238
vey-resolver = { version = "0.9", path = "lib/vey-resolver" }
239+
vey-reuseport = { version = "0.1", path = "lib/vey-reuseport" }
236240
vey-runtime = { version = "0.5", path = "lib/vey-runtime" }
237241
vey-rustls-provider = { version = "0.1", path = "lib/vey-rustls-provider" }
238242
vey-slog-types = { version = "0.3", path = "lib/vey-slog-types" }

lib/vey-reuseport/Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "vey-reuseport"
3+
version = "0.1.0"
4+
license.workspace = true
5+
edition.workspace = true
6+
rust-version.workspace = true
7+
8+
[dependencies]
9+
anyhow.workspace = true
10+
libbpf-rs = { version = "0.26", default-features = false }
11+
libc.workspace = true
12+
log.workspace = true
13+
zerocopy.workspace = true
14+
socket2.workspace = true
15+
16+
[build-dependencies]
17+
libbpf-cargo = { version = "0.26", default-features = false }

0 commit comments

Comments
 (0)