On 2/11/2021 6:16 PM, Thomas Monjalon wrote:
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 <step...@networkplumber.org>
Signed-off-by: Thomas Monjalon <tho...@monjalon.net>
---
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
Wouldn't be better to use 'dpdk-hugepages.py' only, or perhaps
'./usertools/dpdk-hugepages.py' but not full path.
The dpdk path, '/root/dpdk/', assumption can be missleading.