Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add XDP CLI options and initialization code #1069

Merged
merged 11 commits into from
Jan 21, 2025
Merged

Add XDP CLI options and initialization code #1069

merged 11 commits into from
Jan 21, 2025

Conversation

Jake-Shadle
Copy link
Collaborator

@Jake-Shadle Jake-Shadle commented Jan 20, 2025

This adds the support for several XDP specific options, and the initialization code to bring up the XDP I/O loop, falling back to io-uring if setup fails for some reason. This PR always falls back to io-uring at the moment, this is just to get the code in so that it can be iterated on in further PRs, as I only tested that we can spinup quilkin proxy using XDP and shut it down cleanly, not the actual I/O which I'm leaving for tomorrow.

Fixed several bugs:

  • Fix bug in ephemeral port range parsing
  • Remove warning about eBPF logging, the current eBPF program has no log messages, which makes log initialization fail, but we would want to enable it in the future if we did add logging to the program
  • pthread_cancel is apparently super not good and was causing a crash at shutdown due to signal shenanigans, so I just replaced it with an atomic bool for now
  • We include the eBPF program inlined in the quilkin binary, but it could be aligned however rustc/LLVM decided, and object parsing requires it be aligned correctly, which for 64-bit ELF files is 8 bytes

src/cli/proxy.rs Outdated Show resolved Hide resolved
src/cli/proxy.rs Outdated Show resolved Hide resolved
src/cli/proxy.rs Outdated Show resolved Hide resolved
src/cli/proxy.rs Outdated Show resolved Hide resolved
src/cli/proxy.rs Show resolved Hide resolved
src/components/proxy.rs Outdated Show resolved Hide resolved
@quilkin-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 4d82992d-2613-4e7d-b615-550bd0d150e8

The following development images have been built, and will exist for the next 30 days:

To build this version:

git fetch [email protected]:googleforgames/quilkin.git pull/1069/head:pr_1069 && git checkout pr_1069
cargo build

@Jake-Shadle Jake-Shadle enabled auto-merge (squash) January 21, 2025 07:10
@Jake-Shadle Jake-Shadle merged commit 7bfb3a6 into main Jan 21, 2025
12 checks passed
@Jake-Shadle Jake-Shadle deleted the xdp-init branch January 21, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants