Soft Patch Panel
 help / color / mirror / Atom feed
* [spp] [PATCH 0/2] Revise setup manual
@ 2018-05-15  1:21 ogawa.yasufumi
  2018-05-15  1:21 ` [spp] [PATCH 1/2] docs: add instruction for disabling ASLR ogawa.yasufumi
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: ogawa.yasufumi @ 2018-05-15  1:21 UTC (permalink / raw)
  To: ferruh.yigit, spp; +Cc: Yasufumi Ogawa

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

Hi,

SPP is a kind of DPDK multi-process application and ASLR should be
disabled to running SPP stably.  To use pcap PMD, DPDK should be
configured with CONFIG_RTE_LIBRTE_PMD_PCAP=y and compiled before SPP
compilation. This patch is for adding instruction for ASLR and pcap.

This patch also includes misc update for revising descriptions or
command examples.

Thanks,
Yasufumi


Yasufumi Ogawa (2):
  docs: add instruction for disabling ASLR
  docs: revise getting started guide

 docs/guides/setup/getting_started.rst | 70 ++++++++++++++++++++++-----
 1 file changed, 57 insertions(+), 13 deletions(-)

-- 
2.17.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [spp] [PATCH 1/2] docs: add instruction for disabling ASLR
  2018-05-15  1:21 [spp] [PATCH 0/2] Revise setup manual ogawa.yasufumi
@ 2018-05-15  1:21 ` ogawa.yasufumi
  2018-05-15  1:21 ` [spp] [PATCH 2/2] docs: revise getting started guide ogawa.yasufumi
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: ogawa.yasufumi @ 2018-05-15  1:21 UTC (permalink / raw)
  To: ferruh.yigit, spp; +Cc: Yasufumi Ogawa

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 | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/docs/guides/setup/getting_started.rst b/docs/guides/setup/getting_started.rst
index 75dc68d..d9ecc6e 100644
--- a/docs/guides/setup/getting_started.rst
+++ b/docs/guides/setup/getting_started.rst
@@ -110,6 +110,30 @@ For 1GB, the size of hugepage must be specified.
     nodev /mnt/huge_1GB hugetlbfs pagesize=1GB 0 0
 
 
+Disable ASLR
+~~~~~~~~~~~~
+
+SPP is a DPDK multi-process application and there are a number of
+`limitations
+<https://dpdk.org/doc/guides/prog_guide/multi_proc_support.html#multi-process-limitations>`_
+.
+
+Address-Space Layout Randomization (ASLR) is a security feature for
+memory protection, but may cause a failure of memory
+mapping while starting multi-process application as discussed in
+`dpdk-dev
+<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`.
+
+.. code-block:: console
+
+    # disable ASLR
+    $ sudo sysctl -w kernel.randomize_va_space=0
+
+
 Install DPDK and SPP
 --------------------
 
-- 
2.17.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [spp] [PATCH 2/2] docs: revise getting started guide
  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
  2018-05-24 13:05 ` [spp] [PATCH 0/2] Revise setup manual Ferruh Yigit
  2018-05-28 12:27 ` Ferruh Yigit
  3 siblings, 0 replies; 8+ messages in thread
From: ogawa.yasufumi @ 2018-05-15  1:21 UTC (permalink / raw)
  To: ferruh.yigit, spp; +Cc: Yasufumi Ogawa

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [spp] [PATCH 0/2] Revise setup manual
  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 ` [spp] [PATCH 2/2] docs: revise getting started guide ogawa.yasufumi
@ 2018-05-24 13:05 ` Ferruh Yigit
  2018-05-25 20:34   ` Yasufumi Ogawa
  2018-05-28 12:27 ` Ferruh Yigit
  3 siblings, 1 reply; 8+ messages in thread
From: Ferruh Yigit @ 2018-05-24 13:05 UTC (permalink / raw)
  To: ogawa.yasufumi, spp

On 5/15/2018 2:21 AM, ogawa.yasufumi@lab.ntt.co.jp wrote:
> From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
> 
> Hi,
> 
> SPP is a kind of DPDK multi-process application and ASLR should be
> disabled to running SPP stably.  To use pcap PMD, DPDK should be
> configured with CONFIG_RTE_LIBRTE_PMD_PCAP=y and compiled before SPP
> compilation. This patch is for adding instruction for ASLR and pcap.
> 
> This patch also includes misc update for revising descriptions or
> command examples.
> 
> Thanks,
> Yasufumi
> 
> 
> Yasufumi Ogawa (2):
>   docs: add instruction for disabling ASLR
>   docs: revise getting started guide

Hi Yasufumi,

I can't apply these patches on top of latest master, can you please check, or
did I missed some patches in the middle?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [spp] [PATCH 0/2] Revise setup manual
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Yasufumi Ogawa @ 2018-05-25 20:34 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: ogawa.yasufumi, spp

On 2018/05/24 6:05, Ferruh Yigit wrote:
> On 5/15/2018 2:21 AM, ogawa.yasufumi@lab.ntt.co.jp wrote:
>> From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
>>
>> Hi,
>>
>> SPP is a kind of DPDK multi-process application and ASLR should be
>> disabled to running SPP stably.  To use pcap PMD, DPDK should be
>> configured with CONFIG_RTE_LIBRTE_PMD_PCAP=y and compiled before SPP
>> compilation. This patch is for adding instruction for ASLR and pcap.
>>
>> This patch also includes misc update for revising descriptions or
>> command examples.
>>
>> Thanks,
>> Yasufumi
>>
>>
>> Yasufumi Ogawa (2):
>>    docs: add instruction for disabling ASLR
>>    docs: revise getting started guide
> Hi Yasufumi,
>
> I can't apply these patches on top of latest master, can you please check, or
> did I missed some patches in the middle?
Sorry! It might be my fault. I'd check and correct it.

Thanks,
Yasufumi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [spp] [PATCH 0/2] Revise setup manual
  2018-05-25 20:34   ` Yasufumi Ogawa
@ 2018-05-28  9:47     ` Yasufumi Ogawa
  2018-05-28 12:26       ` Ferruh Yigit
  0 siblings, 1 reply; 8+ messages in thread
From: Yasufumi Ogawa @ 2018-05-28  9:47 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: spp

On 2018/05/26 5:34, Yasufumi Ogawa wrote:
> On 2018/05/24 6:05, Ferruh Yigit wrote:
>> On 5/15/2018 2:21 AM, ogawa.yasufumi@lab.ntt.co.jp wrote:
>>> From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
>>>
>>> Hi,
>>>
>>> SPP is a kind of DPDK multi-process application and ASLR should be
>>> disabled to running SPP stably.  To use pcap PMD, DPDK should be
>>> configured with CONFIG_RTE_LIBRTE_PMD_PCAP=y and compiled before SPP
>>> compilation. This patch is for adding instruction for ASLR and pcap.
>>>
>>> This patch also includes misc update for revising descriptions or
>>> command examples.
>>>
>>> Thanks,
>>> Yasufumi
>>>
>>>
>>> Yasufumi Ogawa (2):
>>>    docs: add instruction for disabling ASLR
>>>    docs: revise getting started guide
>> Hi Yasufumi,
>>
>> I can't apply these patches on top of latest master, can you please check, or
>> did I missed some patches in the middle?
> Sorry! It might be my fault. I'd check and correct it.
> 
> Thanks,
> Yasufumi
Hi Ferruh,

I tried to merge my patches to the latest repository cloned from dpdk.org and it's applied without any problem. So, could you 
try it again?

Thanks,
Yasufumi
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [spp] [PATCH 0/2] Revise setup manual
  2018-05-28  9:47     ` Yasufumi Ogawa
@ 2018-05-28 12:26       ` Ferruh Yigit
  0 siblings, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2018-05-28 12:26 UTC (permalink / raw)
  To: Yasufumi Ogawa; +Cc: spp

On 5/28/2018 10:47 AM, Yasufumi Ogawa wrote:
> On 2018/05/26 5:34, Yasufumi Ogawa wrote:
>> On 2018/05/24 6:05, Ferruh Yigit wrote:
>>> On 5/15/2018 2:21 AM, ogawa.yasufumi@lab.ntt.co.jp wrote:
>>>> From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
>>>>
>>>> Hi,
>>>>
>>>> SPP is a kind of DPDK multi-process application and ASLR should be
>>>> disabled to running SPP stably.  To use pcap PMD, DPDK should be
>>>> configured with CONFIG_RTE_LIBRTE_PMD_PCAP=y and compiled before SPP
>>>> compilation. This patch is for adding instruction for ASLR and pcap.
>>>>
>>>> This patch also includes misc update for revising descriptions or
>>>> command examples.
>>>>
>>>> Thanks,
>>>> Yasufumi
>>>>
>>>>
>>>> Yasufumi Ogawa (2):
>>>>    docs: add instruction for disabling ASLR
>>>>    docs: revise getting started guide
>>> Hi Yasufumi,
>>>
>>> I can't apply these patches on top of latest master, can you please check, or
>>> did I missed some patches in the middle?
>> Sorry! It might be my fault. I'd check and correct it.
>>
>> Thanks,
>> Yasufumi
> Hi Ferruh,
> 
> I tried to merge my patches to the latest repository cloned from dpdk.org and it's applied without any problem. So, could you 
> try it again?

It did work indeed, I must did something wrong last time. Will push the patches.

> 
> Thanks,
> Yasufumi
>>
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [spp] [PATCH 0/2] Revise setup manual
  2018-05-15  1:21 [spp] [PATCH 0/2] Revise setup manual ogawa.yasufumi
                   ` (2 preceding siblings ...)
  2018-05-24 13:05 ` [spp] [PATCH 0/2] Revise setup manual Ferruh Yigit
@ 2018-05-28 12:27 ` Ferruh Yigit
  3 siblings, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2018-05-28 12:27 UTC (permalink / raw)
  To: ogawa.yasufumi, spp

On 5/15/2018 2:21 AM, ogawa.yasufumi@lab.ntt.co.jp wrote:
> From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
> 
> Hi,
> 
> SPP is a kind of DPDK multi-process application and ASLR should be
> disabled to running SPP stably.  To use pcap PMD, DPDK should be
> configured with CONFIG_RTE_LIBRTE_PMD_PCAP=y and compiled before SPP
> compilation. This patch is for adding instruction for ASLR and pcap.
> 
> This patch also includes misc update for revising descriptions or
> command examples.
> 
> Thanks,
> Yasufumi
> 
> 
> Yasufumi Ogawa (2):
>   docs: add instruction for disabling ASLR
>   docs: revise getting started guide

Applied, thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-05-28 12:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [spp] [PATCH 2/2] docs: revise getting started guide ogawa.yasufumi
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

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).