dpdk | comprehensive rust binding for DPDK allowing high speed | Networking library

 by   lemonrock Rust Version: Current License: Non-SPDX

kandi X-RAY | dpdk Summary

kandi X-RAY | dpdk Summary

dpdk is a Rust library typically used in Networking applications. dpdk has no bugs and it has low support. However dpdk has 1 vulnerabilities and it has a Non-SPDX License. You can download it from GitHub.

A comprehensive rust binding for DPDK allowing high speed userspace networking across 256 cores and 32 NICs
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              dpdk has a low active ecosystem.
              It has 26 star(s) with 5 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              dpdk has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of dpdk is current.

            kandi-Quality Quality

              dpdk has no bugs reported.

            kandi-Security Security

              dpdk has 1 vulnerability issues reported (0 critical, 1 high, 0 medium, 0 low).

            kandi-License License

              dpdk has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              dpdk releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dpdk
            Get all kandi verified functions for this library.

            dpdk Key Features

            No Key Features are available at this moment for dpdk.

            dpdk Examples and Code Snippets

            No Code Snippets are available at this moment for dpdk.

            Community Discussions

            QUESTION

            DPDK Compilation fails inside WSL2 Docker Desktop's containers
            Asked 2021-Jun-13 at 14:09

            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:36

            Inside 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*:

            Source https://stackoverflow.com/questions/67942680

            QUESTION

            How to run send and receive traffic over 2 instances of dpdk-testpmd running on the same host?
            Asked 2021-Jun-13 at 05:04

            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:04

            Note: 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?

            Source https://stackoverflow.com/questions/67950798

            QUESTION

            How to compile DPDK application such as examples to support C++?
            Asked 2021-Jun-09 at 15:07

            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:12

            You need to modify the makefile inorder to adapt C++:
            You need to change CFLAGS to CPPFLAGS See below reference example:

            Source https://stackoverflow.com/questions/67900845

            QUESTION

            Not able to receive packets using DPDK over vmxnet3
            Asked 2021-Jun-08 at 06:11

            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

            1. VMShpere vswitch: connected between only 2 VMs backed as 10Gbps VMXNET3 NIC
            2. DPDK verion: 18.11
            3. Guest os: Ubuntu 20.04 (tried Ubuntu 16.04 as well)
            4. 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

            1. VM-1 receives and transmit packets
            2. VM-2 receives and transmit packets
            3. there is a physical interface also connected which forwards packets.
            4. set the IP address of VM-1 to '12.12.12.1' and IP address of VM-2 to '12.12.12.2'
            5. Run iperf3 between VM-1 and VM-2, it fails.
            6. 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.

            Source https://stackoverflow.com/questions/67645371

            QUESTION

            Uninstalling dpdk installed using ninja
            Asked 2021-Jun-07 at 12:36

            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:36

            Assuming 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

            1. ignore the libraries installed from DPDK 19.08, simply execute sudo ninja install. This overrides all libraries, drivers and include.
            2. if want to do it cleanly, go to DPDK 19.08 build folder, execute sudo ninja uninstall. This will remove your previous installation. Then build Dpdk 20.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]

            Source https://stackoverflow.com/questions/67868677

            QUESTION

            How to address the error "MBUF: error setting mempool handler" seen with DPDK 20.11
            Asked 2021-Jun-04 at 07:10

            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

            1. Installing Mellanox libverbs affects the cflags and ldflags for dpdk libdpdk.pc
            2. DPDK 21.11.1 meson build (meson -Dexamples=l2fwd build; ninja -C install) does not match l2fwd Makefile option of make static
            3. 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

            Source https://stackoverflow.com/questions/67795725

            QUESTION

            how QEMU guest can send packets to NIC of the host?
            Asked 2021-Jun-04 at 03:56

            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:56

            XDP (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.

            Source https://stackoverflow.com/questions/67815287

            QUESTION

            DPDK bad throughput, is the configurations' fault? How to improve?
            Asked 2021-May-29 at 09:39

            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

            1. Host system was not using CPU which were isolated for VM
            2. KVM-QEMU CPU threads were not pinned
            3. QEMU was not using huge page backed memory
            4. emulator and io threads of QEMU were not pinned.
            5. Inside VM the kernel boot parameter was set to 1GB, which was causing TLB to miss on the host.

            Corrected configuration:

            1. setup host with 4 * 1GB huge page on host
            2. edit qemu XML to reflect VCPU, iothread, emulator threads on desired host CPU
            3. edit qemu to use host 4 * 1GB page
            4. edit VM grub to have isolate CPU and use 2MB pages.
            5. run DPDK application using isolated core on VM
            6. 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.

            Source https://stackoverflow.com/questions/67658301

            QUESTION

            Not able to run pktgen-dpdk (error: Illegal instruction)
            Asked 2021-May-24 at 16:08

            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:25

            Intel 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

            Source https://stackoverflow.com/questions/67620374

            QUESTION

            Does DPDK support to launch a new thread by slave?
            Asked 2021-May-24 at 03:15

            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:15

            Based 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

            1. Service cores using rte_service API
            2. 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

            Source https://stackoverflow.com/questions/67666038

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install dpdk

            You can download it from GitHub.
            Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/lemonrock/dpdk.git

          • CLI

            gh repo clone lemonrock/dpdk

          • sshUrl

            git@github.com:lemonrock/dpdk.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Networking Libraries

            Moya

            by Moya

            diaspora

            by diaspora

            kcptun

            by xtaci

            cilium

            by cilium

            kcp

            by skywind3000

            Try Top Libraries by lemonrock

            linux-support

            by lemonrockRust

            predicator

            by lemonrockRust

            assembler

            by lemonrockRust

            context-allocator

            by lemonrockRust

            css

            by lemonrockRust