lkml.org 
[lkml]   [2019]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRunning AF_XDP inside Docker using veth driver
Hello,

I wrote a test case handling network traffic in user-space inside a
Docker network
by using an XDP socket with libbpf. You can find the code in

https://github.com/glasnostic/af_xdp_test

My kernel version is 5.1 with XDP_SOCK enabled.

In this example, I have an unstable result while getting packets from
the XDP socket.
We can see a significant delay (~10s) until the packets are received
by the process.
It seems that XDP processes packets in batches and only when enough
packets exist,
all of the packets are sent to the userspace process.

This is a problem for traffic consisting of one packet (e.g. ARP, PING).

What is the correct way to deal with this problem?
E.g. can we force XDP to flush packets?

Thanks for the help.
- Yu-Han

\
 
 \ /
  Last update: 2019-09-18 09:45    [W:0.026 / U:2.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site