Getting Started Guide for Linux — Data Plane Development Kit 23.11.0 documentation (dpdk.org)
文章目录
1.dpdk build with isa-l
ISA-L Compression Poll Mode Driver
2.System Requirements
1.启用iommu
ubuntu
cat /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash, intel_iommu=on"
grub-mkconfig --output=/boot/grub/grub.cfg
3.Running DPDK Applications
The reservation of hugepages can be performed at run time. This is done by echoing the number of hugepages required to a nr_hugepages
file in the /sys/kernel/
directory corresponding to a specific page size (in Kilobytes). For a single-node system, the command to use is as follows (assuming that 1024 of 2MB pages are required):
echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
On a NUMA machine, the above command will usually divide the number of hugepages equally across all NUMA nodes (assuming there is enough memory on all NUMA nodes). However, pages can also be reserved explicitly on individual NUMA nodes using a nr_hugepages
file in the /sys/devices/
directory:
echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
The tool dpdk-hugepages.py
can be used to manage hugepages.
3.1. dpdk-hugepages Application
The dpdk-hugepages
tool is a Data Plane Development Kit (DPDK) utility that helps in reserving hugepages. As well as checking for current settings.
3.1.1. Running the Application
The tool has a number of command line options:
dpdk-hugepages [options]
3.1.2. Options
-
-h, --help
Display usage information and quit
-
-s, --show
Print the current huge page configuration
-
-c driver, --clear
Clear existing huge page reservation
-
-m, --mount
Mount the huge page filesystem
-
-u, --unmount
Unmount the huge page filesystem
-
-n NODE, --node=NODE
Set NUMA node to reserve pages on
-
-p SIZE, --pagesize=SIZE
-
Select hugepage size to use.
If not specified the default system huge page size is used.
-
-
-r SIZE, --reserve=SIZE
-
Reserve huge pages.
Size is in bytes with K, M or G suffix.
-
-
--setup SIZE
Short cut to clear, unmount, reserve and mount.
Warning
While any user can run the dpdk-hugepages.py
script to view the status of huge pages, modifying the setup requires root privileges.
3.1.3. Examples
To display current huge