From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9F8A4A054D; Thu, 11 Feb 2021 19:17:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D3F622A23D; Thu, 11 Feb 2021 19:17:13 +0100 (CET) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id 135C040147 for ; Thu, 11 Feb 2021 19:17:11 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 53CAC307; Thu, 11 Feb 2021 13:17:09 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 11 Feb 2021 13:17:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=bfpSaHfEq2rxu38z7sReZaxouB tT0rj6CAF090M7EpY=; b=jmHQNYJlGNRE8alEfZ75U7S5X81PYH9dUTz8cu8+rw HhutSC1avI9cBXZr3LIe/IGCrEOskcYqKILQuW3ZXJSIf/RT+/RSSETtMBlUofKF SMaQ2cided8AbBAQZHXwiMyixZeoGPs1Fa9peuOnqNnFvfZXd7dswuCtk3VErETR wTHjNDNnkz1IslngJ02uC0Rxm2p1WDY3JqfW4NBZ9GqVA9JstyTv59s16ZARtd4H wOHfe7SG1CXpyDaDiAbrfZdc8UYA7qK7QqW7XMeXUN4S5aYYEADtySMtsjP5sDF1 fGu0yQ51H66KYJ6PUxyV3K9Df98XlehMiWZje3qOHHCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=bfpSaHfEq2rxu38z7 sReZaxouBtT0rj6CAF090M7EpY=; b=L1kAFtRUurMYyH8fy4orwQ8Ma1NbRpetl Pj/d3XQG8y0MXthXMwQtDutj9e0GUXSte3JVbOly8FIn3/e54bZhwq0JP8gaPsLp fVc/ozJyYNWKQ+96p0Tpz5utuEVeHNMoGZT8OZNoqF+jQIQnvEVLSrcn8okOAipy RQWLmj+EIpEtrnrL5aYi+/Px74xkv9Bf9QReNuvyvyg4Tx+zD/E31weg9ORdv6mQ tqCoLlHxUn/Yh6fH8sb2rVP3Qz9IsaTm7gUbKZou9IYoxZ7GjmTqG0jI7+osCJ7a Y0Hdklg62KVAzLYtLcJlPjhq2v3TA1dS5rv7V/YTKbPU5BTC1cluQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheelgddutdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgrshcu ofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuggftrf grthhtvghrnhepvdelvdduhedvudduveeuvdevheegudelgeeigfejheduhedttdegudff jeeihffgnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhn rdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 0EC321080066; Thu, 11 Feb 2021 13:17:06 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Stephen Hemminger , Anoob Joseph , Ankur Dwivedi , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Maxime Coquelin , Chenbo Xia Date: Thu, 11 Feb 2021 19:16:59 +0100 Message-Id: <20210211181700.1273539-1-thomas@monjalon.net> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] doc: replace hugepages commands with dedicated tool X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The tool dpdk-hugepages.py, added in DPDK 20.11, is referenced in the guides instead of more complicate commands. The original Linux commands are kept in linux_gsg/sys_reqs.rst and nics/build_and_test.rst. Suggested-by: Stephen Hemminger Signed-off-by: Thomas Monjalon --- doc/guides/cryptodevs/octeontx.rst | 4 +--- doc/guides/cryptodevs/octeontx2.rst | 2 +- doc/guides/howto/lm_bond_virtio_sriov.rst | 6 +++--- doc/guides/howto/lm_virtio_vhost_user.rst | 6 +++--- doc/guides/linux_gsg/sys_reqs.rst | 2 ++ doc/guides/nics/build_and_test.rst | 6 ++++++ doc/guides/nics/mlx4.rst | 2 +- doc/guides/nics/mlx5.rst | 2 +- doc/guides/nics/virtio.rst | 2 +- doc/guides/sample_app_ug/vhost.rst | 2 +- 10 files changed, 20 insertions(+), 14 deletions(-) diff --git a/doc/guides/cryptodevs/octeontx.rst b/doc/guides/cryptodevs/octeontx.rst index d813cb2974..a39f3f3d02 100644 --- a/doc/guides/cryptodevs/octeontx.rst +++ b/doc/guides/cryptodevs/octeontx.rst @@ -107,9 +107,7 @@ applications. .. code-block:: console - echo 8 > /sys/kernel/mm/hugepages/hugepages-524288kB/nr_hugepages - mkdir /mnt/huge - mount -t hugetlbfs nodev /mnt/huge + dpdk-hugepages.py --setup 4G --pagesize 512M Example applications can now be executed with crypto operations offloaded to OCTEON TX crypto PMD. diff --git a/doc/guides/cryptodevs/octeontx2.rst b/doc/guides/cryptodevs/octeontx2.rst index a648a33cbc..d312eeb74c 100644 --- a/doc/guides/cryptodevs/octeontx2.rst +++ b/doc/guides/cryptodevs/octeontx2.rst @@ -123,7 +123,7 @@ Another way to bind the VF would be to use the ``dpdk-devbind.py`` script: * Ensure that sufficient huge pages are available for your application:: - echo 8 > /sys/kernel/mm/hugepages/hugepages-524288kB/nr_hugepages + dpdk-hugepages.py --setup 4G --pagesize 512M Refer to :ref:`linux_gsg_hugepages` for more details. diff --git a/doc/guides/howto/lm_bond_virtio_sriov.rst b/doc/guides/howto/lm_bond_virtio_sriov.rst index 16d86d122c..3e25480316 100644 --- a/doc/guides/howto/lm_bond_virtio_sriov.rst +++ b/doc/guides/howto/lm_bond_virtio_sriov.rst @@ -581,9 +581,9 @@ Set up DPDK in the Virtual Machine # virtio port is 03 # vf port is 04 - cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages - echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages - cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages + /root/dpdk/usertools/dpdk-hugepages.py --show + /root/dpdk/usertools/dpdk-hugepages.py --setup 2G + /root/dpdk/usertools/dpdk-hugepages.py --show ifconfig -a /root/dpdk/usertools/dpdk-devbind.py --status diff --git a/doc/guides/howto/lm_virtio_vhost_user.rst b/doc/guides/howto/lm_virtio_vhost_user.rst index e495ac976e..c5c48f10a9 100644 --- a/doc/guides/howto/lm_virtio_vhost_user.rst +++ b/doc/guides/howto/lm_virtio_vhost_user.rst @@ -411,9 +411,9 @@ setup_dpdk_virtio_in_vm.sh # virtio port is 03 # virtio port is 04 - cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages - echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages - cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages + /root/dpdk/usertools/dpdk-hugepages.py --show + /root/dpdk/usertools/dpdk-hugepages.py --setup 2G + /root/dpdk/usertools/dpdk-hugepages.py --show ifconfig -a /root/dpdk/usertools/dpdk-devbind.py --status diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst index a05b5bd816..4a401210de 100644 --- a/doc/guides/linux_gsg/sys_reqs.rst +++ b/doc/guides/linux_gsg/sys_reqs.rst @@ -181,6 +181,8 @@ 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. + .. note:: Some kernel versions may not allow reserving 1 GB hugepages at run time, diff --git a/doc/guides/nics/build_and_test.rst b/doc/guides/nics/build_and_test.rst index b47c684288..e83dd4628c 100644 --- a/doc/guides/nics/build_and_test.rst +++ b/doc/guides/nics/build_and_test.rst @@ -64,6 +64,12 @@ This section demonstrates how to setup and run ``testpmd`` in Linux. Hugepagesize: 2048 kB + Mount and request above can be achieved simply with this tool: + + .. code-block:: console + + dpdk-hugepages.py --setup 2G + #. Load ``igb_uio`` or ``vfio-pci`` driver: .. code-block:: console diff --git a/doc/guides/nics/mlx4.rst b/doc/guides/nics/mlx4.rst index 09cfb5c9cc..9742ddb268 100644 --- a/doc/guides/nics/mlx4.rst +++ b/doc/guides/nics/mlx4.rst @@ -405,7 +405,7 @@ devices managed by librte_net_mlx4. #. Request huge pages:: - echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages + dpdk-hugepages.py --setup 2G #. Start testpmd with basic parameters:: diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index d8c90419d0..7c50497fbc 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -1712,7 +1712,7 @@ ConnectX-4/ConnectX-5/ConnectX-6/BlueField devices managed by librte_net_mlx5. #. Request huge pages:: - echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages + dpdk-hugepages.py --setup 2G #. Start testpmd with basic parameters:: diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index 518adf4b1c..02e74a6e77 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics/virtio.rst @@ -152,7 +152,7 @@ Host2VM communication example .. code-block:: console modprobe uio - echo 512 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages + dpdk-hugepages.py --setup 1G modprobe uio_pci_generic ./usertools/dpdk-devbind.py -b uio_pci_generic 00:03.0 diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst index 15aaff2493..09b1b6c57d 100644 --- a/doc/guides/sample_app_ug/vhost.rst +++ b/doc/guides/sample_app_ug/vhost.rst @@ -188,7 +188,7 @@ Common Issues .. code-block:: console - cat /sys/kernel/mm/hugepages/hugepages-/nr_hugepages + dpdk-hugepages.py --show The command above indicates how many hugepages are free to support QEMU's allocation request. -- 2.30.0