Skip to content

cxxuser/rust_dpdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust_DPDK

This project is a Rust package library for DPDK 20.11.By encapsulating the DPDK library written in C language, external Rust applications can directly use the functions in the DPDK library through the Rust API.This project currently only encapsulates about 200 commonly used APIs of DPDK, and the functions are still very imperfect. Users can add the DPDK functions they need according to the method of this project.

preparation

Configure DPDK environment

cd dpdk
sudo meson build
cd build
sudo ninja install

Set DPDK hugepages (runtime)

sudo chmod 777 /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

Load the linux driver, see in detail: http://doc.dpdk.org/guides/linux_gsg/linux_drivers.html。

Bind the network port

cd dpdk/usertools
//check the network card net_cd
ifconfig
sudo dpdk-devbind.py --bind=net_cd
//check the bindings
sudo dpdk-devbind.py --status

Running Result

Run the Helloworld program , which is in /dpdk/examples/helloworld

在这里插入图片描述

sudo cargo run,run DPDK application rewritten in Rust language

在这里插入图片描述

About

Rust binding to Intel DPDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published