24.11.2018

FastNetMon Advanced AF_XDP support

What is it?

AF_XDP is a new kernel bypass technology integrated in Linux Kernel. It offers very hight performance and low CPU overhead. It does not require any additional licenses or third party libraries. You can use it to process 1G, 10G or even 40G of traffic.

Dependencies

It was added in Linux Kernel 4.18. You can install fresh kernel for Ubuntu 16.04 or 18.04 using Kernel PPA

Modes

There are two modes of AF_XDP

  • Copy mode (works for all NIC supported in in Linux). Offer great compatibility but does not offer top performance
  • Native (driver) mode. Offers decent performance and requires support from driver. Supported only for Intel XL710 now

In FastNetMon you can require native mode support using force_native_mode_xdp option

Configuration

This mode requires XDP microprogram to work properly. You can download it here: xdp_kernel.o and put it to /root/xdp_kernel.o.

You can enable this mode in FastNetMon using following commands:

To get maximum throughput (but it will also increase CPU usage) you may disable poll_mode_xdp. It will switch FastNetMon into “active polling” mode and will eat whole CPU.

When you enable AF_XDP FastNetMon detaches interface from standard Linux Network stack. To return it, please reboot machine.