DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
To: thomas@monjalon.net, david.marchand@redhat.com,
	Honnappa.Nagarahalli@arm.com, ohilyard@iol.unh.edu,
	lijuan.tu@intel.com
Cc: dev@dpdk.org, "Juraj Linkeš" <juraj.linkes@pantheon.tech>
Subject: [RFC PATCH v1 21/24] dts: merge DTS doc/dts_gsg/usr_guide/setup_dut.rst to DPDK
Date: Wed,  6 Apr 2022 15:11:03 +0000	[thread overview]
Message-ID: <20220406151106.2915304-22-juraj.linkes@pantheon.tech> (raw)
In-Reply-To: <20220406151106.2915304-1-juraj.linkes@pantheon.tech>

---
 dts/doc/dts_gsg/usr_guide/setup_dut.rst | 150 ++++++++++++++++++++++++
 1 file changed, 150 insertions(+)
 create mode 100644 dts/doc/dts_gsg/usr_guide/setup_dut.rst

diff --git a/dts/doc/dts_gsg/usr_guide/setup_dut.rst b/dts/doc/dts_gsg/usr_guide/setup_dut.rst
new file mode 100644
index 0000000000..c47db8b781
--- /dev/null
+++ b/dts/doc/dts_gsg/usr_guide/setup_dut.rst
@@ -0,0 +1,150 @@
+Set up DUT
+===========
+
+This chapter describes the packages required to compile the DPDK in DUT.
+
+BIOS Setting Prerequisite on x86
+--------------------------------
+
+DPDK prefers devices bound to ``vfio-pci`` kernel module, therefore, `VT-x` and `VT-d` should be enabled.
+
+.. code-block:: console
+
+   Advanced -> Integrated IO Configuration -> Intel(R) VT for Directed I/O <Enabled>
+   Advanced -> Processor Configuration -> Intel(R) Virtualization Technology <Enabled>
+
+
+Set Hugepages
+------------------
+
+Hugepage support is required for the large memory pool allocation used for packet buffers
+(the HUGETLBFS option must be enabled in the running kernel as indicated the previous section).
+By using hugepage allocations, performance is increased since fewer pages are needed,
+and therefore less Translation Lookaside Buffers (TLBs, high speed translation caches),
+which reduce the time it takes to translate a virtual page address to a physical page address.
+Without hugepages, high TLB miss rates would occur with the standard 4k page size, slowing performance.
+
+
+Edit /etc/default/grub
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Set GRUB_CMDLINE_LINUX in etc/default/grub:
+
+for 2M pagesize::
+
+    GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt hugepagesz=2M hugepages=1024 default_hugepagesz=2M intel_pstate=disable"
+
+for 1G pagesize::
+
+    GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt hugepagesz=1G hugepages=16 default_hugepagesz=1G intel_pstate=disable"
+
+Execute grub-mkconfig
+~~~~~~~~~~~~~~~~~~~~~~~
+
+execute below command::
+
+    # grub-mkconfig -o /boot/grub/grub.cfg
+
+.. note::
+
+    some OS may need execute following command::
+
+        #grub2-mkconfig -o /boot/grub2/grub.cfg
+
+then reboot OS to make the hugepage setting take effect.
+
+Packages Required
+------------------
+
+**Required Tools and Libraries:**
+
+.. note::
+
+    The setup commands and installed packages needed on various systems may be different.
+    For details on Linux distributions and the versions tested, please consult the DPDK Release Notes.
+
+*   General development tools including a supported C compiler such as gcc (version 4.9+) or clang (version 3.4+).
+
+    * For RHEL/Fedora systems these can be installed using ``dnf groupinstall "Development Tools"``
+
+    * For Ubuntu/Debian systems these can be installed using ``apt install build-essential``
+
+*   Python 3.5 or later.
+
+*   Meson (version 0.49.2+) and ninja
+
+    * ``meson`` & ``ninja-build`` packages in most Linux distributions
+
+    * If the packaged version is below the minimum version, the latest versions
+      can be installed from Python's "pip" repository: ``pip3 install meson ninja``
+
+*   ``pyelftools`` (version 0.22+)
+
+    * For Fedora systems it can be installed using ``dnf install python-pyelftools``
+
+    * For RHEL/CentOS systems it can be installed using ``pip3 install pyelftools``
+
+    * For Ubuntu/Debian it can be installed using ``apt install python3-pyelftools``
+
+*   Library for handling NUMA (Non Uniform Memory Access).
+
+    * ``numactl-devel`` in RHEL/Fedora;
+
+    * ``libnuma-dev`` in Debian/Ubuntu;
+
+.. note::
+
+   Please ensure that the latest patches are applied to third party libraries
+   and software to avoid any known vulnerabilities.
+
+
+**Optional Tools:**
+
+*   Intel® C++ Compiler (icc). For installation, additional libraries may be required.
+    See the icc Installation Guide found in the Documentation directory under the compiler installation.
+
+*   IBM® Advance ToolChain for Powerlinux. This is a set of open source development tools and runtime libraries
+    which allows users to take leading edge advantage of IBM's latest POWER hardware features on Linux. To install
+    it, see the IBM official installation document.
+
+**Additional Libraries**
+
+A number of DPDK components, such as libraries and poll-mode drivers (PMDs) have additional dependencies.
+For DPDK builds, the presence or absence of these dependencies will be automatically detected
+enabling or disabling the relevant components appropriately.
+
+In each case, the relevant library development package (``-devel`` or ``-dev``) is needed to build the DPDK components.
+
+For libraries the additional dependencies include:
+
+*   libarchive: for some unit tests using tar to get their resources.
+
+*   libelf: to compile and use the bpf library.
+
+
+Compile DPDK
+-------------
+
+Now we can compile the DPDK to check whether the DUT ENV is OK.
+
+commands::
+
+    CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc
+    ninja -C x86_64-native-linuxapp-gcc -j 110
+
+if there are no errors occurred during the compilation and the DPDK apps have been generated,
+it means the DUT ENV is OK now.
+
+Check dpdk-testpmd::
+
+    root@dpdk:~/dpdk# ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd --help
+    EAL: Detected 72 lcore(s)
+    EAL: Detected 2 NUMA nodes
+
+    Usage: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd [options]
+
+    EAL common options:
+      -c COREMASK         Hexadecimal bitmask of cores to run on
+      -l CORELIST         List of cores to run on
+    ...
+    --match-allocations Free hugepages exactly as allocated
-- 
2.20.1


  parent reply	other threads:[~2022-04-06 15:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 15:10 [RFC PATCH v1 00/24] merge DTS documentation files " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 01/24] dts: merge DTS CONTRIBUTING.TXT " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 02/24] dts: merge DTS doc/dts_gsg/Makefile " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 03/24] dts: merge DTS doc/dts_gsg/conf.py " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 04/24] dts: merge DTS doc/dts_gsg/image/dts_network_arch.png " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 05/24] dts: merge DTS doc/dts_gsg/image/dts_result.png " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 06/24] dts: merge DTS doc/dts_gsg/image/dts_soft_arch.png " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 07/24] dts: merge DTS doc/dts_gsg/image/scene_pf_passthrough.svg " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 08/24] dts: merge DTS doc/dts_gsg/image/virt_flow.svg " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 09/24] dts: merge DTS doc/dts_gsg/index.rst " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 10/24] dts: merge DTS doc/dts_gsg/quick_start.rst " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 11/24] dts: merge DTS doc/dts_gsg/rel_notes/index.rst " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 12/24] dts: merge DTS doc/dts_gsg/rel_notes/release_21_11.rst " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 13/24] dts: merge DTS doc/dts_gsg/usr_guide/asan_test.rst " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 14/24] dts: merge DTS doc/dts_gsg/usr_guide/igb_uio.rst " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 15/24] dts: merge DTS doc/dts_gsg/usr_guide/image/dts_func_deploy.png " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 16/24] dts: merge DTS doc/dts_gsg/usr_guide/image/dts_result.png " Juraj Linkeš
2022-04-06 15:10 ` [RFC PATCH v1 17/24] dts: merge DTS doc/dts_gsg/usr_guide/index.rst " Juraj Linkeš
2022-04-06 15:11 ` [RFC PATCH v1 18/24] dts: merge DTS doc/dts_gsg/usr_guide/intro.rst " Juraj Linkeš
2022-04-06 15:11 ` [RFC PATCH v1 19/24] dts: merge DTS doc/dts_gsg/usr_guide/ixia.rst " Juraj Linkeš
2022-04-06 15:11 ` [RFC PATCH v1 20/24] dts: merge DTS doc/dts_gsg/usr_guide/results.rst " Juraj Linkeš
2022-04-06 15:11 ` Juraj Linkeš [this message]
2022-04-06 15:11 ` [RFC PATCH v1 22/24] dts: merge DTS doc/dts_gsg/usr_guide/sys_reqs.rst " Juraj Linkeš
2022-04-06 15:11 ` [RFC PATCH v1 23/24] dts: merge DTS doc/dts_gsg/usr_guide/trex.rst " Juraj Linkeš
2022-04-06 15:11 ` [RFC PATCH v1 24/24] dts: merge DTS doc/dts_gsg/usr_guide/usage.rst " Juraj Linkeš

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220406151106.2915304-22-juraj.linkes@pantheon.tech \
    --to=juraj.linkes@pantheon.tech \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=lijuan.tu@intel.com \
    --cc=ohilyard@iol.unh.edu \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).