AF_XDP is a new address family aiming for high performance packet I/O. By creating an AF_XDP socket (XSK) through the socket system call, a userspace program can receive and send packets closed to the line rate. In our testbed, a micro-benchmark program shows 19Mpps for receiving and 15Mpps for transmission.
In this talk, we leverage the benefits of AF_XDP by creating a new OVS netdev type called “afxdp” and implement its configuration, packet reception, and transmit functions. Since the AF_XDP socket operates in userspace, we re-use the existing userspace datapath, dpif-netdev, and the poll-mode driver framework. With a couple of optimizations, we show that for single flow using single core, OVS dpif-netdev with afxdp can achieve 19 Mpps for receive and drop, and 14 Mpps for packet forwarding between two ports.