summaryrefslogtreecommitdiffstats
path: root/doc/book-enea-nfv-access-guide/doc/dpdk.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/book-enea-nfv-access-guide/doc/dpdk.xml')
-rw-r--r--doc/book-enea-nfv-access-guide/doc/dpdk.xml125
1 files changed, 0 insertions, 125 deletions
diff --git a/doc/book-enea-nfv-access-guide/doc/dpdk.xml b/doc/book-enea-nfv-access-guide/doc/dpdk.xml
deleted file mode 100644
index bc3f479..0000000
--- a/doc/book-enea-nfv-access-guide/doc/dpdk.xml
+++ /dev/null
@@ -1,125 +0,0 @@
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4<chapter id="dpdk">
5 <title>Data Plane Development Kit</title>
6
7 <para>The Intel Data Plane Development Kit (DPDK) is a set of user-space
8 libraries and drivers that provides a programming framework for high-speed
9 packet processing applications. The DPDK includes a number of Poll Mode
10 Drivers that enable direct packet transfer between the physical NIC and
11 user-space without using interrupts, bypassing the Linux kernel network
12 stack entirely.</para>
13
14 <para>In order to take advantage of DPDK, Linux <ulink
15 url="https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt">huge
16 pages</ulink> must be enabled in the system. The allocation of huge pages
17 should preferably be done at boot time by passing parameters on the kernel
18 command line. Add the following to the kernel boot parameters:</para>
19
20 <programlisting>default_hugepagesz=512MB hugepagesz=512MB hugepages=20</programlisting>
21
22 <para>For DPDK documentation, see <ulink
23 url="http://dpdk.org/doc/guides-17.08/index.html">http://dpdk.org/doc/guides-17.08/index.html</ulink></para>
24
25 <section id="pktgen">
26 <title>Pktgen</title>
27
28 <para>In addition to DPDK, Enea NFV Access includes Pktgen, a software
29 traffic generator that is powered by the DPDK packet processing framework.
30 Pktgen can act as a transmitter or receiver and is capable of generating
31 10Gbit wire rate traffic with 64 byte frames.</para>
32
33 <para>Pktgen is installed in <literal>/usr/share/apps/pktgen/</literal>
34 and needs to be executed from this directory.</para>
35
36 <para>For Pktgen documentation, see <ulink
37 url="http://pktgen-dpdk.readthedocs.io">http://pktgen-dpdk.readthedocs.io</ulink></para>
38 </section>
39
40 <section id="dpdk-setup">
41 <title>DPDK setup instructions</title>
42
43 <para>The following setup instructions apply to both host and
44 guest.</para>
45
46 <orderedlist>
47 <listitem>
48 <para>To make the hugepage memory available for DPDK, it must be
49 mounted:</para>
50
51 <programlisting>mkdir /mnt/huge
52mount -t hugetlbfs nodev /mnt/huge</programlisting>
53 </listitem>
54
55 <listitem>
56 <para>Load the DPDK vfio-pci kernel module:</para>
57
58 <programlisting>modprobe vfio-pci</programlisting>
59 </listitem>
60
61 <listitem>
62 <para>Bind the device to the vfio-pci driver:</para>
63
64 <para><programlisting>dpdk-devbind --bind=vfio-pci &lt;PCI device number&gt;</programlisting>The
65 DPDK provides the dpdk-devbind tool to help bind or unbind devices
66 from specific drivers. See <ulink
67 url="http://dpdk.org/doc/guides-17.08/tools/devbind.html">http://dpdk.org/doc/guides-17.08/tools/devbind.html</ulink>
68 for more information.</para>
69 </listitem>
70
71 <listitem>
72 <para>VFIO-NOMMU needs to be set if run on VM: <programlisting>echo 1 &gt; /sys/module/vfio/parameters/enable_unsafe_noiommu_mode</programlisting></para>
73 </listitem>
74 </orderedlist>
75
76 <para>To print the current status of all known network
77 interfaces:<programlisting>dpdk-devbind --status</programlisting></para>
78
79 <para>At this point the system is ready to run DPDK applications.</para>
80 </section>
81
82 <section id="dpdk-example-test-setup">
83 <title>DPDK example test setup</title>
84
85 <para>This is a simple DPDK test setup using two boards connected
86 back-to-back. One board generates traffic using the Pktgen application,
87 and the other board runs the DPDK testpmd example to forward packets back
88 on the same interface.</para>
89
90 <programlisting>Pktgen [DPDK] - Board 1 PHY &lt;--&gt; Board 2 PHY - [DPDK] testpmd</programlisting>
91
92 <orderedlist>
93 <listitem>
94 <para>Setup DPDK on both boards, following the instructions in <xref
95 linkend="dpdk-setup" />.</para>
96 </listitem>
97
98 <listitem>
99 <para>On board 1, start the Pktgen application:</para>
100
101 <programlisting>cd /usr/share/apps/pktgen/
102./pktgen -v -c 0x7 -n 4 --proc-type auto -d \
103/usr/lib/librte_pmd_thunderx_nicvf.so.1.1 -w &lt;PCI device number&gt; -- -P -m "[1:2].0"</programlisting>
104
105 <para>In the Pktgen console, run:</para>
106
107 <programlisting>start 0</programlisting>
108
109 <para>The Pktgen output will display the traffic configuration and
110 statistics.</para>
111 </listitem>
112
113 <listitem>
114 <para>On board 2, start the testpmd application:</para>
115
116 <programlisting>testpmd -v -c 0x3 -n 4 -d /usr/lib/librte_pmd_thunderx_nicvf.so.1.1 -w &lt;PCI device \
117number&gt; -- -i --disable-hw-vlan-filter --no-flush-rx --port-topology=chained</programlisting>
118
119 <para>For more information, refer to the testpmd application user
120 guide: <ulink
121 url="http://dpdk.org/doc/guides-17.08/testpmd_app_ug/index.html">http://dpdk.org/doc/guides-17.08/testpmd_app_ug/index.html</ulink>.</para>
122 </listitem>
123 </orderedlist>
124 </section>
125</chapter> \ No newline at end of file