Crates.io | rpkt-dpdk |
lib.rs | rpkt-dpdk |
version | 0.1.0 |
source | src |
created_at | 2023-11-22 03:22:51.812294 |
updated_at | 2023-11-22 03:22:51.812294 |
description | a safe FFI library for DPDK |
homepage | |
repository | https://github.com/duanjp8617/rpkt |
max_upload_size | |
id | 1044840 |
size | 193,867 |
~/.cargo/config
:[target.x86_64-unknown-linux-gnu]
runner = 'sudo -E'
cargo test -- --test-threads=1
The contained examples are used to test the correctness of the implementation of various DPDK-related features.
Use two servers, one launches the loopback_tx.rs
to generate traffic. The other one launches the looback_rx.rs
to receive traffic and loop the traffic back at the same port.
loopback_tx.rs
.rss_rx.rs
. This program will print the number of IP/UDP flows received from each queue in each second.checksum_offload_tx.rs
. Note that this example accepts a command line argument in the range of 0-5 (4/5 generate a UDP packet with trailing unused bytes), and generates different kinds of traffic depending on this argument.checksum_offload_rx.rs
multiseg
feature enabled.For instance, if we add trailing unused bytes to the end of the UDP packet, while the tx offloading can correctly calculate the checksum value, the rx checksum will report invalid checksum. This is an interesting finding.
ip link set dev NAME mtu 9000
The NAME
refers the interface name in the Linux kernel, it can be checked with DPDK's dpdk-devbind.py
script.
GRUB_CMDLINE_LINUX
field of the /etc/default/grub
GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt hugepagesz=1G hugepages=16 default_hugepagesz=1G intel_pstate=disable"
grub-mkconfig -o /boot/grub/grub.cfg
cat /proc/cmdline
It seems that to correctly use Intel E810 driver, we need to install the correct device driver version. It seems that we need upgrade E810 firmware, upgrade Linux ICE driver version, and update the Intel DDP version.
Note:
By just upgrading the ICE driver to 1.11.14, we fix this problem. Go to intel official site
https://www.intel.com/content/www/us/en/download/19630/intel-network-adapter-driver-for-e810-series-devices-under-linux.html
And download the latest ICE driver version.
Untar the driver, switch to /src folder, issue the following commands:
make -j
sudo make install
sudo rmmod ice
sudo modprobe ice
To check whether ice driver version is correctly upgraded, use the following command:
modinfo ice
sudo ethtool -i DEVICE_NAME