Re: Xdp or dpdk

Jesper Dangaard Brouer

On Thu, 20 Sep 2018 16:02:37 +0300 Иван Иванов <iwan12iwan12@...> wrote:

Hi. I need you advice.
I have to write app to filter and LB ethernet traffic from 100G to
10x10G. What is better to use? eBPF XDP or DPDK?
Interesting use-case of Load-Balancing 100G to 10x 10G.

I would obviously choose XDP, but I'm biased ;-)

I want to stress, that you have to handle, in _your_ BPF prog, how to
load-balance and handle _when_ the overload/overrun problem occurs. As
you have faster link feeds into slower links, you can overload those

With XDP/BPF you should attach to the BPF tracepoint xdp_devmap_xmit,
which allows you to detect the TX overrun happens (see sample code [1]
and [2]). And then you need to communicate this info via a BPF-map, to
your Load-Balance decision XDP-prog, so it can take action.

With this tracepoint approach packets will get lost, before an event
happens. I am considering extending XDP to have another XDP-hook, at
XDP_REDIRECT transition to TX point, which would allow you to re-do a
load-balance decision, then a device TX-queue is full. But we need a
good use-case, before adding such infra-structure (maybe your
use-case?). This is something Toke and I will be taking about here:

Sample code#1:

Sample code#2:

Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat

Join to automatically receive all group messages.