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 2655142363; Thu, 12 Oct 2023 19:33:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EDA8D4029F; Thu, 12 Oct 2023 19:33:11 +0200 (CEST) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by mails.dpdk.org (Postfix) with ESMTP id 293A540042 for ; Thu, 12 Oct 2023 19:33:10 +0200 (CEST) Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-53142351997so409103a12.1 for ; Thu, 12 Oct 2023 10:33:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=youngcopy-com.20230601.gappssmtp.com; s=20230601; t=1697131990; x=1697736790; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PZ+5hnSeWAbDxu1q4oP/+7EcemzkFXDA2qDyrRZwITw=; b=B3INSJds9vbZqTzKqHXsIq+mYiDMrcroZY7XU9XV24pG7lOsf0Ua1ZujZE0qw+b/6F dhY3OqU0CBjOtDOonglExdaOoTNWXYs3GxVyZCGWTDlWBZYUduQiraLCS+yKEsYzwqcN mEjF0dq1nqXUcB2rWREvsJ2zPXliiUEpYz6lMThhSl99omxyeh4s2YtzNbRBhgCCjGTt kkRBgcnK1NLIBu+qsiTDMKQQgWlRWd3ExR+akAwh2jfUrD5/T6a0rYrTx/BgYNH8G8+Y VS/9lOoNqMkpbFnKw1DMOfN+tA7wILjGiLV1Kq2yeFPPhjsDbayZ+VAgkJjBRvbPgVN4 4yww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697131990; x=1697736790; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PZ+5hnSeWAbDxu1q4oP/+7EcemzkFXDA2qDyrRZwITw=; b=IrXUDus45Hu1bE+V5PQOwrRYvEAiSUoaeU/Vn3cLYMV0xDYYEvPx7bCJHX+qG4IBHq OkWenwIAdPDH148UL0WtPm3j3YcD5AEYssexa5RF1A9LiKz0B7Yt6I7bhyp+71amkt6G xpXa/Qh2suqeKpwjy+9mIGDGcFqjkVAPcxRyho9Y3baMO+fb3u5jHJfJN8p2m0PhR0Jt /gcbedt2Uu0iGEfuAPnqPWFSPmbitJ4hClEZLsA4vIT6CNqHPvoKDmVrHPxa1bdJ0AwX aU2FQm7FomqcvwIhcSgp/utdce7NkbX+O+vjWqMrVwHy/y6JV3Yy9U2uWX5Blgw1tgYp V8/Q== X-Gm-Message-State: AOJu0Yw9G9dgHI7c2gCOhGgFjyHbIDYcCtub3xrtc1WLgh+5w0lLm9n4 04ihgVWAxGFqDsWxBKX4unxly3Uv7DYRXcYgOLYpMg== X-Google-Smtp-Source: AGHT+IH4on2NeIetBg/nLL29f1mY7mqYEWJ7y++mzV8sKjoJpatQrel7Is2Vn59mrlELeK0Pk8NgP2y+mdNMLpK1f/s= X-Received: by 2002:a17:906:5185:b0:9a6:5340:c337 with SMTP id y5-20020a170906518500b009a65340c337mr19525492ejk.2.1697131989578; Thu, 12 Oct 2023 10:33:09 -0700 (PDT) MIME-Version: 1.0 References: <20230920154817.617-1-dave@youngcopy.com> <20230920154817.617-4-dave@youngcopy.com> <1ce43f7f-4f28-4761-89dd-35816497006d@amd.com> In-Reply-To: From: Dave Young Date: Thu, 12 Oct 2023 13:32:58 -0400 Message-ID: Subject: Re: [PATCH 3/6] Section 3: Setting up a System to Run DPDK Applications To: Bruce Richardson Cc: Ferruh Yigit , dev@dpdk.org Content-Type: multipart/alternative; boundary="000000000000604d4d06078855d4" 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 --000000000000604d4d06078855d4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I asked the following in the Slack channel, responding to Stephen and Thomas so asking in this thread as well to confirm: To confirm, the three steps in 3.1.1 Memory Setup: Reservering Hugepages at http://170.249.220.94/getting_started_guide/system_setup.html#system-setup-= for-linux can be replaced with the following: Memory Setup: Reserving Hugepages To simplify the hugepages setup, use the `dpdk-hugepages` script: sudo dpdk-hugepages --setup To confirm, the instructions in 3.1.2 Device Setup: VFIO at http://170.249.220.94/getting_started_guide/system_setup.html#device-setup-= vfio can be replaced with the following: Device Setup: VFIO For VFIO setup, please refer to the `Kernel Documentation for VFIO < https://www.kernel.org/doc/html/latest/driver-api/vfio.html>`_. Thanks! David Young Professional Copywriter/Technical Writer Young Copy +1 (678) 500-9550 https://www.youngcopy.com On Mon, Sep 25, 2023 at 8:22=E2=80=AFAM Bruce Richardson wrote: > On Mon, Sep 25, 2023 at 12:31:34PM +0100, Ferruh Yigit wrote: > > 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 > > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > + > > > +This section provides step-by-step instructions for setting up your > system to run DPDK applications. It covers system configurations for Linu= x, > FreeBSD, and Windows. Each section details the necessary memory and devic= e > 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 followin= g > command:: > > > + > > > + echo 1024 | sudo tee > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages > > > + > > > +2. To make the hugepages configuration persistent across reboots, ad= d > the following line to your `/etc/sysctl.conf` file, adjusting the number = of > hugepages as needed:: > > > + > > > + vm.nr_hugepages =3D 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. > > > Actually, if script can do all the basics - something I believe Stephen a= nd > Thomas also pointed out on a slack review earlier - then we should just > drop the manual steps from here. If we think the script is sufficiently > robust, we can drop them from the doc entirely, or if not, move them to a= n > appendix which we reference here. > > /Bruce > --000000000000604d4d06078855d4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I asked the following in the Slack channel, respondin= g to Stephen and Thomas so asking in this thread as well to confirm:
<= div>
To confirm, the three steps in 3.1.1 Memory Setup: Reservering Hugepages at= http://170.249.220.94/getting_started_guide/system_setup.h= tml#system-setup-for-linux can be replaced with the following:

Memory Setup: Reserving Hugepages
To simplify the hugepages s= etup, use the `dpdk-hugepages` script:=C2=A0=C2=A0
sudo dpdk-hugepages --setup

To confirm, the instructions in 3.1.2 Device Setup: VFIO at http= ://170.249.220.94/getting_started_guide/system_setup.html#device-setup-vfio= can be replaced with the following:

Device Se= tup: VFIO
For VFIO setup, please refer to the `Kernel Documentation for VFIO &= lt;https:= //www.kernel.org/doc/html/latest/driver-api/vfio.html>`_.

Thanks!
David Young
Professional Copywriter/Technical Writer
Yo= ung Copy
+1 (678) 500-9550
=


On Mon, Sep 25, 2023 at 8:22=E2=80= =AFAM Bruce Richardson <br= uce.richardson@intel.com> wrote:
On Mon, Sep 25, 2023 at 12:31:34PM +0100, Ferruh Yi= git wrote:
> On 9/20/2023 4:48 PM, David Young wrote:
> > ---
> >=C2=A0 .../getting_started_guide/system_setup.rst=C2=A0 =C2=A0 | 1= 95 ++++++++++++++++++
> >=C2=A0 1 file changed, 195 insertions(+)
> >=C2=A0 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 @@
> > +..=C2=A0 SPDX-License-Identifier: BSD-3-Clause
> > +=C2=A0 =C2=A0 Copyright(c) 2010-2025 Intel Corporation.
> > +
> > +.. _memory_setup:
> > +
> > +.. |reg| unicode:: U+000AE
> > +
> > +Setting up a System to Run DPDK Applications
> > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > +
> > +This section provides step-by-step instructions for setting up y= our system to run DPDK applications. It covers system configurations for Li= nux, FreeBSD, and Windows. Each section details the necessary memory and de= vice setups for these operating systems.
> > +
> > +Navigate to the section that corresponds to your operating syste= m to begin the setup process.
> > +
>
> Not sure above sentences adds value.
>
>
>
> > +.. contents:: Table of Contents
> > +=C2=A0 =C2=A0:local:
> > +
> > +System Setup for Linux
> > +----------------------
> > +
> > +Memory Setup: Reserving Hugepages
> > +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > +
> > +For Linux, DPDK requires hugepages be reserved for its use on th= e system. To check if hugepages are are on your system, you can run the fol= lowing command::
> > +
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 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 e= xample, to allocate 1024 hugepages of 2MB each, you can use the following c= ommand::
> > +
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 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 num= ber of hugepages as needed::
> > +
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 vm.nr_hugepages =3D 1024
> > +
> > +3. Most distributions make hugepages available via `/dev/hugepag= es`, so this step may not be necessary. If you need to manually mount the h= ugepages filesystem, add the following line to your `/etc/fstab` file::
> > +
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 nodev /mnt/huge hugetlbfs defaults 0= 0
> > +
> > +=C2=A0 =C2=A0Then, create the mount directory and mount the file= system::
> > +
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 mkdir -p /mnt/huge
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 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<= br> > basics, but also may worth mentioning from script, it is more user
> friendly than above instructions.
>
Actually, if script can do all the basics - something I believe Stephen and=
Thomas also pointed out on a slack review earlier - then we should just
drop the manual steps from here. If we think the script is sufficiently
robust, we can drop them from the doc entirely, or if not, move them to an<= br> appendix which we reference here.

/Bruce
--000000000000604d4d06078855d4--