XDP_CLONE: Efficient In-Driver Packet Duplication for eBPF-Accelerated Systems
Abstract
The eBPF eXpress Data Path (XDP) enables high-performance packet processing by executing programmable logic early in the Linux networking stack. However, XDP does not support packet duplication, a key requirement for publish-subscribe systems and high-performance computing (HPC) applications relying on message broadcasting. To overcome this limitation, developers typically use the Traffic Control (TC) layer, where the bpf_clone_redirect() helper allows packet replication. TC operates after socket buffer (sk_buff) allocation, a major source of overhead, and requires the creation of additional buffers for each duplicated packet. In this work, we present XDP_CLONE, a system that performs packet duplication directly within the network driver, eliminating socket buffer allocation. This approach significantly reduces overhead and improves performance for eBPF network applications up to 2.3x.