From patchwork Wed Jun 16 06:20:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Dong X-Patchwork-Id: 94292 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 41AEEA0C48; Wed, 16 Jun 2021 08:20:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16F4D4067A; Wed, 16 Jun 2021 08:20:43 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 4A10F40140 for ; Wed, 16 Jun 2021 08:20:41 +0200 (CEST) IronPort-SDR: 2x+EQaV0f3OqMOdz2VKYa4MoO5ieDyrApwViJPV6IxJ+hz8z7yBPgPcDhIVtvp8fF55hZcLpFq 2gwGaE0yjRPg== X-IronPort-AV: E=McAfee;i="6200,9189,10016"; a="186498829" X-IronPort-AV: E=Sophos;i="5.83,277,1616482800"; d="scan'208";a="186498829" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2021 23:20:40 -0700 IronPort-SDR: LrqPQfbaRDGD5XCMvBg2vL5R16l4roPbm4DgyOP/VYJ8jQXP/K6BxKn4St03q6WMc43a6KBIx2 DVq2tjOklNDQ== X-IronPort-AV: E=Sophos;i="5.83,277,1616482800"; d="scan'208";a="484763633" Received: from shwdenpg197.ccr.corp.intel.com ([10.240.182.157]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2021 23:20:38 -0700 From: Jun Dong To: dts@dpdk.org Cc: junx.dong@intel.com, Zhimin Huang Date: Wed, 16 Jun 2021 14:20:32 +0800 Message-Id: <20210616062033.1825-1-junx.dong@intel.com> X-Mailer: git-send-email 2.24.1.windows.2 MIME-Version: 1.0 Subject: [dts] [PATCH V1 1/2] doc/dts_gsg: update some commands X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" From: Zhimin Huang 1. update installing ssh service command 2. correct installing python modules by requirements.txt Signed-off-by: Jun Dong --- doc/dts_gsg/quick_start.rst | 6 +++--- doc/dts_gsg/usr_guide/sys_reqs.rst | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/dts_gsg/quick_start.rst b/doc/dts_gsg/quick_start.rst index b26cf26a..78352a73 100644 --- a/doc/dts_gsg/quick_start.rst +++ b/doc/dts_gsg/quick_start.rst @@ -90,8 +90,8 @@ Tester and DUT should have one interface connected to the same internet, so that .. code-block:: console - apt-get install sshd # download / install ssh software - systemctl enable ssh # start ssh service + apt-get install openssh-server # download / install ssh software + service ssh start # start ssh service .. note:: @@ -110,7 +110,7 @@ Please install them as the following: .. code-block:: console apt-get install python3 - python3 -m pip install requirements.txt + python3 -m pip install -r requirements.txt BIOS setting for DUT ~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/dts_gsg/usr_guide/sys_reqs.rst b/doc/dts_gsg/usr_guide/sys_reqs.rst index 8b70abb0..b91eef9d 100644 --- a/doc/dts_gsg/usr_guide/sys_reqs.rst +++ b/doc/dts_gsg/usr_guide/sys_reqs.rst @@ -23,8 +23,8 @@ Since DPDK Test Suite Tester communicates with DUT via SSH, please install and s .. code-block:: console - apt-get install sshd - systemctl enable ssh + apt-get install openssh-server # download / install ssh software + service ssh start # start ssh service Generally DTS use Linux username and password to login, but it also supports to use authorized login. For create authorized login session, user needs to generate RSA authentication keys to ssh connectioni: From patchwork Wed Jun 16 06:20:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jun Dong X-Patchwork-Id: 94293 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 45CE7A0C48; Wed, 16 Jun 2021 08:20:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A41140DFD; Wed, 16 Jun 2021 08:20:47 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 4C5C340140 for ; Wed, 16 Jun 2021 08:20:45 +0200 (CEST) IronPort-SDR: JEWgoKcVSmuRl9Zd4upwpf81Lj8jCxGG142jTzkYIEw6fp8YRnK+v3YEAwtIL7QS/Tn1T6Oq5c 9lDugYQ78Vmw== X-IronPort-AV: E=McAfee;i="6200,9189,10016"; a="186498834" X-IronPort-AV: E=Sophos;i="5.83,277,1616482800"; d="scan'208";a="186498834" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2021 23:20:44 -0700 IronPort-SDR: gmqeT0d82p80BIA5CWlDN8opb3MNrpC4zL/8nI1YJW8kox9dlS7UMaGFdlCCddrESZaT17jNwK hJ6gGrlKDH9w== X-IronPort-AV: E=Sophos;i="5.83,277,1616482800"; d="scan'208";a="484763675" Received: from shwdenpg197.ccr.corp.intel.com ([10.240.182.157]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2021 23:20:43 -0700 From: Jun Dong To: dts@dpdk.org Cc: junx.dong@intel.com, Zhimin Huang Date: Wed, 16 Jun 2021 14:20:33 +0800 Message-Id: <20210616062033.1825-2-junx.dong@intel.com> X-Mailer: git-send-email 2.24.1.windows.2 In-Reply-To: <20210616062033.1825-1-junx.dong@intel.com> References: <20210616062033.1825-1-junx.dong@intel.com> MIME-Version: 1.0 Subject: [dts] [PATCH V1 2/2] user_guide: add setup_dut X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" From: Zhimin Huang Signed-off-by: Jun Dong --- doc/dts_gsg/usr_guide/index.rst | 1 + doc/dts_gsg/usr_guide/setup_dut.rst | 150 ++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+) create mode 100644 doc/dts_gsg/usr_guide/setup_dut.rst diff --git a/doc/dts_gsg/usr_guide/index.rst b/doc/dts_gsg/usr_guide/index.rst index f4104f85..04a71dc7 100644 --- a/doc/dts_gsg/usr_guide/index.rst +++ b/doc/dts_gsg/usr_guide/index.rst @@ -35,6 +35,7 @@ User Guide intro sys_reqs + setup_dut usage results trex diff --git a/doc/dts_gsg/usr_guide/setup_dut.rst b/doc/dts_gsg/usr_guide/setup_dut.rst new file mode 100644 index 00000000..c47db8b7 --- /dev/null +++ b/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 + Advanced -> Processor Configuration -> Intel(R) Virtualization Technology + + +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