From: ogawa.yasufumi@lab.ntt.co.jp
To: ferruh.yigit@intel.com, spp@dpdk.org
Cc: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
Subject: [spp] [PATCH 2/2] docs: revise getting started guide
Date: Tue, 15 May 2018 10:21:13 +0900 [thread overview]
Message-ID: <20180515012113.8842-3-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <20180515012113.8842-1-ogawa.yasufumi@lab.ntt.co.jp>
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
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
<http://dpdk.org/ml/archives/dev/2014-September/005236.html>`_
.
-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
next prev parent reply other threads:[~2018-05-15 1:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 1:21 [spp] [PATCH 0/2] Revise setup manual ogawa.yasufumi
2018-05-15 1:21 ` [spp] [PATCH 1/2] docs: add instruction for disabling ASLR ogawa.yasufumi
2018-05-15 1:21 ` ogawa.yasufumi [this message]
2018-05-24 13:05 ` [spp] [PATCH 0/2] Revise setup manual Ferruh Yigit
2018-05-25 20:34 ` Yasufumi Ogawa
2018-05-28 9:47 ` Yasufumi Ogawa
2018-05-28 12:26 ` Ferruh Yigit
2018-05-28 12:27 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180515012113.8842-3-ogawa.yasufumi@lab.ntt.co.jp \
--to=ogawa.yasufumi@lab.ntt.co.jp \
--cc=ferruh.yigit@intel.com \
--cc=spp@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).