« All posts

64 BFD sessions at 10ms saturate FRR bfdd's core; XDP handles it at 0 flaps

FRR's bfdd saturates one core at 64 BFD sessions while an XDP fast path carries the same load at 751ns/packet with zero flaps; three FRR bugs merged upstream.

An eBPF developer extended an earlier XDP-based BFD fast path, wired into stock FRR's dataplane socket, to 64 sessions across dual-stack, echo mode, and multihop. At 64 sessions on 10ms timers, FRR's single-threaded bfdd pegs one core sustaining roughly 7000 packets/sec with zero headroom, while the XDP path carries the same 64 sessions from softirq at a 751ns/packet mean, with zero flaps across both address families and a 14.5ms max TX gap against a 30ms detect budget.

Because XDP cannot originate packets, echo mode was split: the neighbour-facing reflector runs entirely in XDP, while the originator uses a raw socket in userspace, since a self-addressed UDP packet would otherwise route to loopback. This split lets a non-router host participate in echo even with IP forwarding disabled. Multihop support moves the GTSM TTL check ahead of session lookup in the parser so a single comparison handles both single-hop and multihop cases.

The work surfaced and upstreamed three real bugs in FRR's dataplane path, including a malformed connect() address size, a fixed output buffer silently truncating registration bursts, and an unnegotiated echo interval on offloaded sessions. The author also flags measurement pitfalls: strace distorted throughput numbers on a syscall-bound daemon, flap counts proved unreliable at 64 sessions, and all figures still come from VMs pending bare-metal verification.

This synthesis was produced from its source by AI; there is no human editor or manual review step. How we work