mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
fix(eBPF): explicitly attach in SKB mode (#8628)
It appears that the gVNIC driver in Google Cloud doesn't give us enough headroom to use `bpf_xdp_adjust_head` with a delta of 4 bytes. Currently, we are loading the XDP program with default flags. By loading it explicitly in SKB mode, we should be able to bypass these driver limitations at the expense of some performance (which should still be better than userspace!). Related: https://github.com/GoogleCloudPlatform/compute-virtual-ethernet-linux/issues/70
This commit is contained in:
@@ -35,7 +35,7 @@ impl Program {
|
||||
.try_into()?;
|
||||
program.load().context("Failed to load program")?;
|
||||
program
|
||||
.attach(interface, XdpFlags::default())
|
||||
.attach(interface, XdpFlags::SKB_MODE)
|
||||
.with_context(|| format!("Failed to attached to interface {interface}"))?;
|
||||
|
||||
let mut stats = AsyncPerfEventArray::try_from(
|
||||
|
||||
Reference in New Issue
Block a user