wget command to download the DPDK 23.11 source code tarball from the official repository and extract it.wget https://fast.dpdk.org/rel/dpdk-23.11.tar.gztar -xf dpdk-23.11.tar.gzcd dpdk-23.11
numactl-devel dependency library (root privileges are required).yum install numactl-devel -y
pip3 install meson ninja pyelftools
meson to build the project, setting the maximum number of logical cores to 1024.meson build -Dmax_lcores=1024
ninja to compile the project.ninja -C build
git clone http://dpdk.org/git/dpdk-kmods
git clone git://dpdk.org/dpdk-kmods
igb_uio directory and compile the code.cd ./dpdk-kmods/linux/igb_uiomake
uio and igb_uio kernel modules (root privileges are required).modprobe uioinsmod ./dpdk-kmods/linux/igb_uio/igb_uio.ko
ethtool -i eth0 | grep bus-info

ifconfig eth0 down
igb_uio driver (replace with the actual PCI address)../usertools/dpdk-devbind.py --bind=igb_uio 0000:02:01.0 # Replace 0000:02:01.0 with the actual PCI address of your network interface card.
echo 8192 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
C=4; Q=32; ./build/app/dpdk-testpmd -l 0-47 --proc-type primary --file-prefix bench -a 0000:1b:00.0 -- --burst=128 --nb-cores=$C --txd=4096 --rxd=4096 --txq=$Q --rxq=$Q --forward-mode=rxonly --stats-period=1
C=4; Q=32; S=10.31.0.80; D=10.31.0.240; ./build/app/dpdk-testpmd -l 0-47 --proc-type primary --file-prefix bench -a 0000:1b:00.0 -- --burst=128 --nb-cores=$C --tx-ip $S,$D --txonly-multi-flow --txpkts=64 --txd=4096 --rxd=4096 --txq=$Q --rxq=$Q --forward-mode=txonly --stats-period=1
Parameter | Description |
-a 0000:1b:00.0 | Specify the PCI address of the network card to be used, which must be replaced according to the actual environment. |
--tx-ip S,D | The destination IP address for packets sent from the TX end, which must be replaced according to the CVM's network card address. |
--txonly-multi-flow | Enable multi-flow transmission mode (if not set, only a single flow is sent). |
--txpkts=64 | Packet length (in bytes, including the MAC header). A value of 64 is recommended for PPS testing scenarios. |
-l 0-47 | Specify the CPU core number range to be used, adjust it as needed, and in cross-NUMA scenarios, you can obtain the information by viewing the queue cross-NUMA distribution. |
--txq / --rxq = $Q | The number of transmit/receive queues, which can be viewed by running ethtool -l eth0 | grep Combined. |
--nb-cores=$C | The number of CPU cores actually participating in the test. A value of C between 2 and Q (inclusive) is recommended. |
--stats-period=1 | Outputs statistical information once per second. |

dpdk-devbind.py tool to restore the network interface card to its default driver:./usertools/dpdk-devbind.py -b virtio-pci 0000:00:08.0 # Note: Replace 0000:00:08.0 with the actual PCI address.
echo 0000:1b:00.0 > /sys/bus/pci/drivers/vfio-pci/unbind #Replace 0000:1b:00.0 as needed.echo virtio-pci > /sys/bus/pci/devices/0000\\:1b\\:00.0/driver_override #Set driver_override to virtio-pci.echo 0000:1b:00.0 > /sys/bus/pci/drivers/virtio-pci/bind #Rebind to virtio-pci.
echo 0 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
ifconfig eth1 up
wget https://lag-dpdk-1326316016.cos.ap-guangzhou.myqcloud.com/dpdk_core_advisor.sh
sh dpdk_core_advisor.sh eth0
lag_dpdk.patch.lag_dpdk.patch patch script.wget https://lag-dpdk-1326316016.cos.ap-guangzhou.myqcloud.com/lag_dpdk.patch
git apply lag_dpdk.patch# Equivalent commands (choose one)patch -p1 < lag_dpdk.patch
meson build -Dmax_lcores=1024ninja -C build
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback