A Selective Forwarding Unit Implementation in P4
Pavlos Tsikrikas, George Xylomenos · 2024
Multi-party conferencing systems rely on a Selective Forwarding Unit (SFU) to replicate and forward media packets between participants, so as to reduce end-to-end delay and improve interactivity. While an SFU does not process these media packets, it still needs to move packets from kernel to user space, replicate them, and push the replicas to the kernel, at the cost of multiple system calls and context switches. To avoid these costs, and even the need for an SFU server, we designed and implemented an SFU based on P4, an open source programming language for network devices. This allows a P4-capable network switch, which is optimized for packet processing, to act as an SFU. We present a simple P4-based SFU implementation and compare its performance against an equally simple, server-based SFU. Even with a virtual (software) switch, the P4-based approach shows dramatic gains in latency and throughout.