Re: Why choosing AF_XDP (busy polling) over DPDK
Magnus Karlsson <[email protected]> Wed, 14 Dec 2022 10:00:21 +0100
| Newsgroups | org.kernel.vger.xdp-newbies |
|---|---|
| Message-ID | <CAJ8uoz3bgtUGBAW7f7vcA7=mvg8fAz8PXvjbmoEuMKaoURkw+w@mail.gmail.com> |
On Wed, Dec 14, 2022 at 9:16 AM Federico Parola <[email protected]> wrote: > > Hello everyone, > in a context in which all traffic is sent to user space, and the main > concern is performance (so AF_XDP busy polling is the best candidate), > is there a reason to choose AF_XDP instead of DPDK for packet I/O, given > that the latter is still much faster? The choice is not AF_XDP vs DPDK, since DPDK can run on top of AF_XDP. The choice is do you want to use user-space drivers or kernel space drivers. There are many pros and cons with both approaches. The two main advantages of user-space drivers in DPDK are that they are faster than their kernel counterparts and you get access to many NIC features that are not available right now from user-space if you are using a kernel driver. Kernel drivers, on the other hand, enables you to deploy your application on any Linux system (from a certain version) and does not force you into the strict execution model of DPDK (which is what most people use with user-space drivers). Everything in Linux is still usable and it is easy to have a system that mixes data-plane processing with other types of workloads. If the only thing you care about is max performance of a pure packet processing workload on a system you have complete control over, the choice is easy: go with a user-space driver and DPDK. If this is not your ultimate goal, then XDP and AF_XDP might be something to consider. There are likely some good write-ups on the Internet about this. /Magnus > Best regards, > Federico Parola