From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mogw0439.ocn.ad.jp (mogw0439.ocn.ad.jp [118.23.109.22]) by dpdk.org (Postfix) with ESMTP id C34141C6A6 for ; Tue, 15 May 2018 03:21:27 +0200 (CEST) Received: from mf-smf-ucb026c1 (mf-smf-ucb026c1.ocn.ad.jp [153.153.66.166]) by mogw0439.ocn.ad.jp (Postfix) with ESMTP id 6BCD04200CD; Tue, 15 May 2018 10:21:26 +0900 (JST) Received: from ntt.pod01.mv-mta-ucb023 ([153.149.142.86]) by mf-smf-ucb026c1 with ESMTP id IOeYfgL5MBX55IOecfkz6O; Tue, 15 May 2018 10:21:26 +0900 Received: from smtp.ocn.ne.jp ([153.149.227.166]) by ntt.pod01.mv-mta-ucb023 with id mRMS1x0033c2f7501RMSbk; Tue, 15 May 2018 01:21:26 +0000 Received: from localhost.localdomain (p5164-ipngn8501marunouchi.tokyo.ocn.ne.jp [153.214.228.164]) by smtp.ocn.ne.jp (Postfix) with ESMTPA; Tue, 15 May 2018 10:21:26 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: ferruh.yigit@intel.com, spp@dpdk.org Cc: Yasufumi Ogawa Date: Tue, 15 May 2018 10:21:13 +0900 Message-Id: <20180515012113.8842-3-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180515012113.8842-1-ogawa.yasufumi@lab.ntt.co.jp> References: <20180515012113.8842-1-ogawa.yasufumi@lab.ntt.co.jp> Subject: [spp] [PATCH 2/2] docs: revise getting started guide X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2018 01:21:28 -0000 From: Yasufumi Ogawa Signed-off-by: Yasufumi Ogawa --- docs/guides/setup/getting_started.rst | 50 +++++++++++++++++++-------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/docs/guides/setup/getting_started.rst b/docs/guides/setup/getting_started.rst index d9ecc6e..2b55d77 100644 --- a/docs/guides/setup/getting_started.rst +++ b/docs/guides/setup/getting_started.rst @@ -53,11 +53,12 @@ For 1GB page, hugepage setting must be activated while booting system. It must be defined in boot loader configuration, usually is ``/etc/default/grub``. Add an entry to define pagesize and the number of pages. -Here is an example. `` hugepagesz`` is for the size and ``hugepages`` +Here is an example. ``hugepagesz`` is for the size and ``hugepages`` is for the number of pages. .. code-block:: console + # /etc/default/grub GRUB_CMDLINE_LINUX="default_hugepagesz=1G hugepagesz=1G hugepages=8" .. note:: @@ -90,8 +91,8 @@ Make the memory available for using hugepages from DPDK. .. code-block:: console - mkdir /mnt/huge - mount -t hugetlbfs nodev /mnt/huge + $ mkdir /mnt/huge + $ mount -t hugetlbfs nodev /mnt/huge It is also available while booting by adding a configuration of mount point in ``/etc/fstab``, or after booted. @@ -101,12 +102,14 @@ For 2MB, it is no need to declare the size of hugepages explicity. .. code-block:: console + # /etc/fstab nodev /mnt/huge hugetlbfs defaults 0 0 For 1GB, the size of hugepage must be specified. .. code-block:: console + # /etc/fstab nodev /mnt/huge_1GB hugetlbfs pagesize=1GB 0 0 @@ -125,14 +128,23 @@ mapping while starting multi-process application as discussed in `_ . -ASLR can be disabled by assigning `kernel.randomize_va_space` to `0`, -or be enabled by assigning to `2`. +ASLR can be disabled by assigning ``kernel.randomize_va_space`` to +``0``, or be enabled by assigning it to ``2``. .. code-block:: console # disable ASLR $ sudo sysctl -w kernel.randomize_va_space=0 + # enable ASLR + $ sudo sysctl -w kernel.randomize_va_space=2 + +You can check the value as following. + +.. code-block:: console + + $ sysctl -n kernel.randomize_va_space + Install DPDK and SPP -------------------- @@ -148,16 +160,26 @@ DPDK ~~~~ First, download and compile DPDK in any directory. -Compiling DPDK takes a few minutes. .. code-block:: console $ cd /path/to/any $ git clone http://dpdk.org/git/dpdk + + +SPP provides libpcap-based PMD for dumping packet to a file or retrieve +it from the file. +You should enable pcap while compiling DPDK because it is disabled as +default. +Compiling DPDK takes a few minutes. + +.. code-block:: console + $ cd dpdk $ export RTE_SDK=$(pwd) $ export RTE_TARGET=x86_64-native-linuxapp-gcc # depends on your env - $ make install T=$RTE_TARGET + $ make install T=$RTE_TARGET CONFIG_RTE_LIBRTE_PMD_PCAP=y + SPP ~~~ @@ -206,8 +228,8 @@ or ``vfio-pci``. .. code-block:: console - sudo modprobe uio - sudo insmod kmod/igb_uio.ko + $ sudo modprobe uio + $ sudo insmod kmod/igb_uio.ko Binding Network Ports ~~~~~~~~~~~~~~~~~~~~~ @@ -278,10 +300,8 @@ cannot find it by using ``ifconfig`` or ``ip``. Confirm DPDK is setup properly ------------------------------ -You had better to run DPDK sample application before SPP -as checking DPDK is setup properly. - -Try ``l2fwd`` as an example. +You should run DPDK sample application ``l2fwd`` before SPP +to confirm that DPDK is setup properly. .. code-block:: console @@ -294,13 +314,13 @@ Try ``l2fwd`` as an example. In this case, run this application with two options. - - -c: core mask + - -l: core list - -p: port mask .. code-block:: console $ sudo ./build/app/l2fwd \ - -c 0x03 \ + -l 1-2 \ -- -p 0x3 It must be separated with ``--`` to specify which option is -- 2.17.0