Reputation: 4412
DPDK is a library for kernel bypass packet processing: https://www.dpdk.org/. F-Stack is a TCP/IP library built atop it: https://github.com/F-Stack/f-stack. I've set up a Linux VMWare VPN with two NICs, have given the second to DPDK, and am attempting to run a very simple test application on it that uses F-Stack and DPDK to connect to the internet. This is however failing (fails to connect).
When I attempt to run a simple server, it also fails, in that I cannot connect to it from Curl or a browser running in the VM.
The test application displays no errors (the DPDK initialisation works fine), and behaves correctly when the DPDK stuff is replaced with standard Linux networking functions that don't bypass the kernel.
My question is, is there anything I need to do to make the above setup work, so that DPDK running on the second NIC in my VM can connect to the internet? E.g. set up some kind of mapping somewhere, or change the virtual network connection type on the VM (currently set to NAT). My networking knowledge is limited so it's quite possible I'm missing something very basic.
Upvotes: 0
Views: 1159
Reputation: 4798
Summarizing the answer based on the updates from the comments as
Send packets directly between userspace and Kernel using DPDK, there are 3 options
the easiest way to try it out is by using DPDK example/skeleton
with ./build/basicfwd -l 3 --vdev=net_tap0,ifaace=dpdk-kerenl0 -w [pcie bus address for DPDK NIC-2]
. This will allow packets to send and receive over kernel via DPDK (where DPDK will act as pass-through). You can modify the basicfwd.c
to process packets which you desire too.
If using FSTACK, I humbly request to check carrier
section https://github.com/F-Stack/f-stack/blob/dev/README.md
this makes use of KNI or veth to accomplish the same
Upvotes: 1