* Running AF_XDP inside Docker using veth driver
@ 2019-09-18 7:44 Yu-han Lin
0 siblings, 0 replies; only message in thread
From: Yu-han Lin @ 2019-09-18 7:44 UTC (permalink / raw)
To: linux-kernel
Cc: Yu-han Lin, Marcus Schiesser, Shimansky, Gregory, Melik-Adamyan, Areg
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-18 7:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 7:44 Running AF_XDP inside Docker using veth driver Yu-han Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).