[PATCH 3/6] Section 3: Setting up a System to Run DPDK Applications
Ferruh Yigit
ferruh.yigit at amd.com
Mon Sep 25 13:31:34 CEST 2023
On 9/20/2023 4:48 PM, David Young wrote:
> ---
> .../getting_started_guide/system_setup.rst | 195 ++++++++++++++++++
> 1 file changed, 195 insertions(+)
> create mode 100644 doc/guides/getting_started_guide/system_setup.rst
>
> diff --git a/doc/guides/getting_started_guide/system_setup.rst b/doc/guides/getting_started_guide/system_setup.rst
> new file mode 100644
> index 0000000000..fa9d249ec7
> --- /dev/null
> +++ b/doc/guides/getting_started_guide/system_setup.rst
> @@ -0,0 +1,195 @@
> +.. SPDX-License-Identifier: BSD-3-Clause
> + Copyright(c) 2010-2025 Intel Corporation.
> +
> +.. _memory_setup:
> +
> +.. |reg| unicode:: U+000AE
> +
> +Setting up a System to Run DPDK Applications
> +============================================
> +
> +This section provides step-by-step instructions for setting up your system to run DPDK applications. It covers system configurations for Linux, FreeBSD, and Windows. Each section details the necessary memory and device setups for these operating systems.
> +
> +Navigate to the section that corresponds to your operating system to begin the setup process.
> +
Not sure above sentences adds value.
> +.. contents:: Table of Contents
> + :local:
> +
> +System Setup for Linux
> +----------------------
> +
> +Memory Setup: Reserving Hugepages
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +For Linux, DPDK requires hugepages be reserved for its use on the system. To check if hugepages are are on your system, you can run the following command::
> +
> + grep HugePages_Total /proc/meminfo
> +
> +If hugepages are not reserved, you will need to reserve them by following these steps:
> +
> +1. Determine the number of hugepages you want to allocate. For example, to allocate 1024 hugepages of 2MB each, you can use the following command::
> +
> + echo 1024 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
> +
> +2. To make the hugepages configuration persistent across reboots, add the following line to your `/etc/sysctl.conf` file, adjusting the number of hugepages as needed::
> +
> + vm.nr_hugepages = 1024
> +
> +3. Most distributions make hugepages available via `/dev/hugepages`, so this step may not be necessary. If you need to manually mount the hugepages filesystem, add the following line to your `/etc/fstab` file::
> +
> + nodev /mnt/huge hugetlbfs defaults 0 0
> +
> + Then, create the mount directory and mount the filesystem::
> +
> + mkdir -p /mnt/huge
> + mount -a
> +
>
We have './usertools/dpdk-hugepages.py' script for this, which I am
using regularly.
Script is wrapper to what described above, so I think good to explain
basics, but also may worth mentioning from script, it is more user
friendly than above instructions.
More information about the dev
mailing list