In combination with `xdp_loader redirect`, this allows `runsc` to receive
packets directly from any NIC. It is intended to be used with a machine's NIC
to avoid the Linux networking stack entirely.
PiperOrigin-RevId: 591090544
It is an idea of running codespell as part of our presubmit checks.
Before enabling it for new changes, let's fix what it has found.
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This just swaps out the fdbased endpoint for an XDP one. Some related
changes in here:
- Moved the AF_XDP BPF program into its own Go package so it can be
shared.
- Added a flag to tcp_benchmark to disable user namespaces. This helps
when running as root, which is required to install BPF programs.
Uses an AF_XDP socket to log packets entering a device. Can be used for
testing, but mostly useful as a minimal example of receiving packets via
AF_XDP.
Note that this actually prevents the packets from reaching their intended
destination, as redirection does not also send the packet through Linux's
network stack.
PiperOrigin-RevId: 470073040