Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the initial XDP integration skeleton to make future PRs easier to review (hopefully). This PR doesn't "do" anything, but is meant to be small and easier to digest, future PRs will be more substantial.
There are two new crates:
crates/ebpf
This is the actual eBPF program that is loaded into the kernel and attached to a NIC so that it can determine if packets received need to be routed to quilkin or not. This is in a separate workspace because its build requirements are different from the rest of this repo, namely that it requires a different target,
bpfel-unknown-none
, and nightly due to needing build thecore
crate. For now, there is a bash script that can be used to build it, but this first pass just puts the final binary artifact in the repo since it is quite small and means CI has to do less work, but can be built from source later if we really want that.crates/xdp
This is a shim crate that basically wraps the two main crates involved with XDP,
aya
, which is the external rust crate used to load and manage eBPF programs, andxdp
the crate I've been working on that is used to create and handle AF_XDP sockets in userspace. The idea with having this separate crate is that quilkin itself will have a smaller surface area for interacting with XDP itself so that it's easier to make changes/remove it in the future and just generally reduce churn in quilkin itself.