dpdk | Clone of DPDK repo to keep VPP related patches
kandi X-RAY | dpdk Summary
kandi X-RAY | dpdk Summary
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD license for the core libraries and drivers. The kernel components are GPLv2 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dpdk
dpdk Key Features
dpdk Examples and Code Snippets
Community Discussions
Trending Discussions on dpdk
QUESTION
I can't compile DPDK inside a docker container, running under WSL2 as VM (and windows 10 as the host machine).
Background
Trying to compile DPDK locally inside a wsl-container some DPDK lib that used to be built on remote native linux machines.
The Dockerfile running the compilation had installed kernel headers
, GNU toolchain
and other various dependencies. The distribution is CentOS7
.
The containers are managed by Docker Desktop
Versions are useless information here.
The Problem
Similar problems across DPDK versions.
In DPDK 20.11, using the meason
build-system, the file kernel/linux/meason.build
:
../kernel/linux/meson.build:23:1: ERROR: Problem encountered: Cannot compile kernel modules as requested - are kernel headers installed?
If I compile different DPDK versions of DPDK or building using other build-systems (makefiles), I am getting variants of the same error.
...ANSWER
Answered 2021-Jun-11 at 19:36Inside your /lib/modules
has no entry with WSL2 "uname -r" output
Although WSL2 has /lib/modules/5.4.72-microsoft-standard-WSL2
(as a softlink), this soft link does not appear in the container.
The solution is adding this line to the Dockerfile
*:
QUESTION
Note: I'm new to network and dpdk, so there might be some misunderstanding in fundamental concepts...
I want to run 2 instances of dpdk-testpmd
on the same host to send and receive traffic over separate NIC.
Configuration:
NIC:
- PMD: MLX5
- version: 5.0-1.0.0.0
- firmware-version: 16.26.1040 (MT_0000000011)
- NUMA-Socket: same
- PCIe: 0000:3b:00.0, 0000:3b:00.1
Update
- DPDK Version: 20.11.1
- Hugepage Total: 32768
- Hugepage Free: 32768
TESTPMD Logs:
...ANSWER
Answered 2021-Jun-13 at 05:04Note: I highly recommend reading about dpdk testpmd as it covered all your questions in detail. As per the StackOverflow guideline multiple sub-questions make answering difficult. Please use well-formatted and formed question for better reach and answers.
@Alexcured since you have mentioned you know how to run 2 separate instances of dpdk-testpmd
. I will only recommend heavily reading up on dpdk-testpmd URL which has answers to most of your questions too.
The assumption is made, both the PCIe NIC are working properly and interconnect between 2 are tested with either arping or ping (Kernel Driver). After binding both PCIe devices to DPDK supported drivers, one should use options for DPDK 20.11.1 such as
- use file-prefix option as unique names
- set socket-memory to fetch memory from the desired NUMA-SOCKET
- set socket-limit to prevent ballooning of huge page mmap
- use w|b option to whitelist|blacklist PCIe devices (0000:3b:00.0 and 0000:3b:00.1)
- Since it is separate physical devices ensure there physical cable connection between 2 PCIe ports.
[Q.1] How to set the MAC address of instance 2's port in instance 1?
QUESTION
How should I modify Makefiles of DPDK to support c++ compilation? I tried by adding CFLAGS += -lstdc++
to the Makefile of the helloworld example but it seems not working. Is there a more standard way to do that?
Edited: I'm using the makefile of helloworld example in DPDK 20.08 with some small modifications. I'm building it on ubuntu 20.04 ,and which is not cross-compilation. The DPDK is built with dpdk-setup script and not meson. The makefile is
...ANSWER
Answered 2021-Jun-09 at 09:12You need to modify the makefile inorder to adapt C++:
You need to change CFLAGS
to CPPFLAGS
See below reference example:
QUESTION
I have implemented a simple code that sends the packet from one machine to other using DPDK. When I use E1000E then I am able to receive packets. But when I use vmxnet3 then at the receiver side erroneous packets are received as per ethernet stats. rte_eth_rx_burst() dont receive any packet. Is there a way to solve this? Why packets are erroneous?
update: vmxnet3 is receiving non DPDK packets correctly but when it comes to DPDK packets sent by our custom generator, it is still categorised as erroneous. Did something changed with respect to security in ESXI and Vcenter? I worked for earlier version of ESXI with vcenter 6+.
[EDIT-1] details shared based on the comment
VMShpere version: 7
- VMShpere vswitch: connected between only 2 VMs backed as 10Gbps VMXNET3 NIC
- DPDK verion: 18.11
- Guest os: Ubuntu 20.04 (tried Ubuntu 16.04 as well)
- Packet Flow: mac address is changed according to destination VM Setup: VM-1 runs DPDK application is custom packet generator and receptor, and VM-2 runs rx_burst and tx_burst.
ANSWER
Answered 2021-Jun-08 at 06:11[answer based on the live debug] there is no issue on the DPDK side with either e1000e or vmxnet3 device. Based on the current debug it based on switch on vsphere
Debugging with kernel driver vmnext3
, shows
- VM-1 receives and transmit packets
- VM-2 receives and transmit packets
- there is a physical interface also connected which forwards packets.
- set the IP address of VM-1 to '12.12.12.1' and IP address of VM-2 to '12.12.12.2'
- Run iperf3 between VM-1 and VM-2,
it fails
. - debugging with
tcpdump
showcases that VM-1 is not receiving packets from the switch from VM-2. While packets from VM-1 are received.
The same is behaviour with DPDK l2fwd/testpmd/skeleton and even sample application. Hence DPDK 18.11.11 LTS with vmxnet3 has no issues in sending or receiving packets.
QUESTION
I have installed dpdk 19.08 in ubuntu 18.04 using meson and ninja. I need to install dpdk 20.1.11.How can I uninstall the dpdk installed using ninja.Please share any tutorials related to this
...ANSWER
Answered 2021-Jun-07 at 12:36Assuming you have not used a custom path for DPDK install and used meson for building dpdk 19.08, there are 2 ways to do it
- ignore the libraries installed from DPDK 19.08, simply execute
sudo ninja install
. This overrides all libraries, drivers and include. - if want to do it cleanly, go to
DPDK 19.08 build folder
, executesudo ninja uninstall
. This will remove your previous installation. Then build Dpdk20.11.1 LTS and do sudo ninja install
A good practice is always creating a custom path by -Dprefix=/opt/dpdk-install/
.
note: If you have used Makefile
for DPDK-19.08, one can always remove the dpdk folder (if it had been created with make config -T=[target] -O=[output folder]
QUESTION
I did a static linking of libdpdk to my application and when I start the application EAL init fails.
Logs:
...ANSWER
Answered 2021-Jun-04 at 07:10[EDIT-1] update from live debug
Target OS: CENTOS 7 DPDK version: 20.11.1
There are multiple reasons which were causing error
- Installing Mellanox libverbs affects the cflags and ldflags for dpdk
libdpdk.pc
- DPDK 21.11.1 meson build
(meson -Dexamples=l2fwd build; ninja -C install)
does not matchl2fwd Makefile option of make static
- using pkg-config from the installed target was also incorrect.
To fix the error we edited /usr/local/lib64/pkgconfig/libdpdk.pc to include the static libraries under -Wl,--whole-archive
and -Wl,--no-whole-archive
it works
QUESTION
i'm trying to test XDP program but the test environment was provided by the client consists of one server and qemu guest running on it and act as a traffic generator ( using scapy or DPDK ). and to have this test run successfully,the packets from the guest should arrive/be injected to the NIC driver ( XDP working in native mode ) of the host. is there's any configs/hacks that can make the traffic goes from the guest to the host driver?
edit : some points to be cleared as @vipin suggested,
- on the host, the NIC is connected to virbr0 on kernel.
- the XDP is running on the physical NIC.
- i'm using bpf_redirect_map for redirecting as we still in simple stage.
anyway, i got a work around is just to add a physical router to the lab setup and it's enough for this stage of test.
...ANSWER
Answered 2021-Jun-04 at 03:56XDP (Express Data Path) supported in Linux is for RX side, and there were patches for TX but not integrated. Based on the current update XDP-eBPF is on Physical NIC. So all RX packet on physical NIC is processed.
But as per the question shared packets from the guest should arrive/be injected to the NIC driver ( XDP working in native mode ) of the host.
. If one needs to run the logic for traffic coming from GUEST OS, XDP has to be loaded to emulator or TAP or Bridge
interface. This will allow to redirect packets based on Kernel NIC id to Physcial NIC.
QUESTION
BACKGROUND:
I am trying to write a DPDK app which is supposed to handle packets coming from inside a Virtual Machine Monitor.
Basically the VMM is getting the packets from its guest, then is going to send those packets to DPDK. Then Dpdk sends them out on the NIC.
Virtual Machine -> Virtual Machine Manager -> DPDK -> NIC
This architecture from above is supposed to replace and outperform the original architecture. In the original architecture, the VMM is putting the packets on a TAP interface.
Original:
Virtual Machine -> Virtual Machine Manager -> TAP interface -> NIC
Problem:
I have written the new architecture and the throughput is way worse than when using the TAP interface. (TAP 300 MB/s any direction, Dpdk: 50MB/s VM sender, 5MB/s VM receiver)
I am suspecting that I am not configuring my DPDK Application properly. Could you give an opinion on my configurations?
Environment:
I have done all the testing inside a Qemu virtual machine, so the architectures described above were both ran inside this Virtual Machine:
3 logical CPUs (out of 8 on host)
4096 MB memory
OS: Ubuntu 20.4
2 NICs, one for SSH and one for DPDK
What I did so far:
2GB Hugepages
Isolated the cpu which DPDK is using.
Here is the code: https://github.com/mihaidogaru2537/DpdkPlayground/blob/Strategy_1/primary_dpdk_firecracker/server.c
All functional logic is in "lcore_main", everything else is just configuration.
All the advice I could find about increasing performance would involve hardware stuff and not configuration parameters, I don't know if the values I am using for things such as:
...ANSWER
Answered 2021-May-29 at 09:39[Answer is based on the live debug and configuration settings done to improve performance]
Factors that were affecting performance for Kernel and DPDK interfaces were
- Host system was not using CPU which were isolated for VM
- KVM-QEMU CPU threads were not pinned
- QEMU was not using huge page backed memory
- emulator and io threads of QEMU were not pinned.
- Inside VM the kernel boot parameter was set to 1GB, which was causing TLB to miss on the host.
Corrected configuration:
- setup host with 4 * 1GB huge page on host
- edit qemu XML to reflect VCPU, iothread, emulator threads on desired host CPU
- edit qemu to use host 4 * 1GB page
- edit VM grub to have isolate CPU and use 2MB pages.
- run DPDK application using isolated core on VM
- taskset firecracker thread on ubuntu
We were able to achieve around 3.5X to 4X performance on the current DPDK code.
note: there is a lot of room to improve code performance for DPDK primary and secondary application also.
QUESTION
I have followed below steps to install and run pktgen-dpdk. But I am getting "Illegal instruction" error and application stops.
System Information (Centos 8)
...ANSWER
Answered 2021-May-21 at 12:25Intel Xeon E5-2620
is Sandy Bridge CPU which officially supports AVX and not AVX2.
DPDK 20.11 meson build, ninja -C build
will generate code with AVX
instructions and not AVX2
. But (Based on the live debug) PKTGEN forces the compiler to add AVX2 to be inserted, thus causing illegal instruction.
Solution: edit meson.build
in line 22
from
QUESTION
Documentation of DPDK shows that rte_eal_remote_launch
can only be called by master lcore. Does it mean I can only launch extra threads in runtime with master thread? Can I assign it to slave threads?
ps: There is another question. The documentation also said things like:
Note: This function is not designed to offer optimum performance. It is just a practical way to launch a function on another lcore at initialization time.
What does it mean? Is there another more effiective way to launch a thread?
...ANSWER
Answered 2021-May-24 at 03:15Based on the logical cores specified as part of EAL Arguments
, one can choose either a single or multiple cores for DPDK LCORE. The DPDK API rte_eal_remote_launch helps to start a specific function with arguments under DPDK context on specific LCORE. If not invoked with the API, the thread will be in wait state (created and waiting to run user application). One should use the API in the context of the master core for launching new functions
to be running under DPDK EAL context.
Can I assign it to slave threads?
[Answer] One run alternative threads or worker threads other than DPDK lcore threads
also by using
- Service cores using rte_service API
- non-dpdk or non-eal threads using rte_thread_register
Please refer the DPDK documentation for sample with explanation for use of rte_remote_launch
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dpdk
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page