router: afxdp underlay#4892
Draft
romshark wants to merge 251 commits into
Draft
Conversation
Added another filter. Needed to ensure that the kernel does not do any processing on the packets received by the raw socket. Expensive stuff would otherwise result (e.g. icmp responses).
Also ditched the PacketSource and Packets() channel. It's too buggy even for us in tests (crashes after closing the afp). Added draining for afp once filter is set. Else we get stray packets, which confuses the test. Did the same in the afp undelay.
Comments, debug stmt and useless error return.
Now passes the benchmark.
Not quite sure what difference it makes, but it sure isn't an sh_test.
In passing added some facility for short debug runs.
This is a feable attempt at making it at least slightly faster than the router.
We used to require more than 3% packet drop. We are now content with 3% or more.
Had to rearrange the code a tiny bit. In passing, attempting to add the needed capabilities to the router in integration tests besides the router benchmark.
In passing. Fixed another missing space in router_multi test script.
In passing, further simplified the process of making debug runs of the router benchmark.
Presumably code complete. Probably not working yet.
Returns link count instead of connection count, undersizing processor queues and causing packet drops under load (DroppedPacketsBusyProcessor).
The frame format is [dst][src][ethertype] but says otherwise.
This was referenced Feb 20, 2026
XDP mmap offsets overflow uintptr on 32-bit.
Delete sockfilter_lint.go and add the bpfel build constraint to portfilter.go instead, so it only compiles where the generated code exists.
Contributor
|
Whoohoo! I don’t have approval powers, but thanks to Church-Turing separation I can still use my self-bestowed blessing powers: ship it! Thanks for making good the last project of my career. 🎉 |
Force inet for loopback topologies since XDP cannot attach to lo. Add scion_integration and failing-links tests to Docker E2E so both underlays get identical test coverage.
Remove wrong "scion_" prefix from glob pattern. Docker compose service names are not prefixed (e.g. br1-ff00_0_110-3)
Increase post-connectivity sleep to 15s for AF_XDP data plane.
eBPF sockfilter: drop IPv4/IPv6 fragments. AF_XDP userspace has no reassembly path and a first fragment looks like a truncated SCION packet; SCION negotiates path MTU end-to-end so a fragment on our port is misconfiguration, non-conformance, or adversarial. underlay/afxdp: register TX metadata headroom and expose SubmitCsumOffload; netdev.go probes per-NIC TX-checksum-offload support via generic-netlink so we only enable it when the kernel advertises XDP_METADATA_TX_CHECKSUM. Golden-frame tests assert finishPacket output is byte-identical to a kernel-generated frame on a veth pair. cmd/packetgolden regenerates the fixtures deterministically. router_benchmark: IPv6 acceptance harness — new cases/*6.go, conf (topology6.json, router6.toml, prometheus6.yml), brload -ipv6. TX checksum offloading requires Kernel version >= 6.8 and drivers that advertise NETDEV_XSK_FLAGS_TX_CHECKSUM; the queue must also use XDP_ZEROCOPY.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.