summaryrefslogtreecommitdiffstats
path: root/doc/book-enea-nfv-access-reference-guide-intel/doc/dpdk.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/book-enea-nfv-access-reference-guide-intel/doc/dpdk.xml')
-rw-r--r--doc/book-enea-nfv-access-reference-guide-intel/doc/dpdk.xml115
1 files changed, 0 insertions, 115 deletions
diff --git a/doc/book-enea-nfv-access-reference-guide-intel/doc/dpdk.xml b/doc/book-enea-nfv-access-reference-guide-intel/doc/dpdk.xml
deleted file mode 100644
index 523a2d5..0000000
--- a/doc/book-enea-nfv-access-reference-guide-intel/doc/dpdk.xml
+++ /dev/null
@@ -1,115 +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.</para>
17
18 <para>For DPDK documentation, see <ulink
19 url="http://dpdk.org/doc/guides-18.02/index.html">http://dpdk.org/doc/guides-18.02/index.html</ulink></para>
20
21 <section id="pktgen">
22 <title>Pktgen</title>
23
24 <para>In addition to DPDK, Enea NFV Access includes Pktgen, a software
25 traffic generator that is powered by the DPDK packet processing framework.
26 Pktgen can act as a transmitter or receiver and is capable of generating
27 10Gbit wire rate traffic with 64 byte frames.</para>
28
29 <para>Pktgen is installed in <literal>/usr/share/apps/pktgen/</literal>
30 and needs to be executed from this directory.</para>
31
32 <para>For Pktgen documentation, see <ulink
33 url="http://pktgen-dpdk.readthedocs.io">http://pktgen-dpdk.readthedocs.io</ulink></para>
34 </section>
35
36 <section id="dpdk-setup">
37 <title>DPDK setup instructions</title>
38
39 <para>The following setup instructions apply to both host and
40 guest.</para>
41
42 <orderedlist>
43 <listitem>
44 <para>To make the hugepage memory available for DPDK, it must be
45 mounted:</para>
46
47 <programlisting>$ mkdir /mnt/huge
48mount -t hugetlbfs nodev /mnt/huge</programlisting>
49 </listitem>
50
51 <listitem>
52 <para>Load the vfio-pci kernel module:</para>
53
54 <programlisting>$ modprobe vfio-pci</programlisting>
55 </listitem>
56
57 <listitem>
58 <para>Bind the device to the vfio-pci driver:</para>
59
60 <para><programlisting>$ dpdk-devbind --bind=vfio-pci &lt;PCI device number&gt;</programlisting>The
61 DPDK provides the dpdk-devbind tool to help binding/unbinding devices
62 from specific drivers. See <ulink
63 url="http://dpdk.org/doc/guides-18.02/tools/devbind.html">http://dpdk.org/doc/guides-18.02/tools/devbind.html</ulink>
64 for more information.</para>
65 </listitem>
66 </orderedlist>
67
68 <para>To print the current status of all known network
69 interfaces:<programlisting>$ dpdk-devbind --status</programlisting></para>
70
71 <para>At this point the system is ready to run DPDK applications.</para>
72 </section>
73
74 <section id="dpdk-example-test-setup">
75 <title>DPDK example test setup</title>
76
77 <para>This is a simple DPDK test setup using two boards connected
78 back-to-back. One board generates traffic using the Pktgen application,
79 and the other board runs the DPDK testpmd example to forward packets back
80 on the same interface.</para>
81
82 <programlisting>Pktgen [DPDK] - Board 1 PHY &lt;--&gt; Board 2 PHY - [DPDK] testpmd</programlisting>
83
84 <orderedlist>
85 <listitem>
86 <para>Setup DPDK on both boards, following the instructions in <xref
87 linkend="dpdk-setup" />.</para>
88 </listitem>
89
90 <listitem>
91 <para>On board 1, start the Pktgen application:</para>
92
93 <programlisting>cd /usr/share/apps/pktgen/
94./pktgen -c 0x7 -n 4 --socket-mem 1024 -- -P -m "[1:2].0"</programlisting>
95
96 <para>In the Pktgen console, run:</para>
97
98 <programlisting>start 0</programlisting>
99
100 <para>The Pktgen output will display the traffic configuration and
101 statistics.</para>
102 </listitem>
103
104 <listitem>
105 <para>On board 2, start the testpmd application:</para>
106
107 <programlisting>testpmd -c 0x7 -n 4 -- --txd=512 --rxd=512 --port-topology=chained</programlisting>
108
109 <para>For more information, refer to the testpmd application user
110 guide: <ulink
111 url="http://dpdk.org/doc/guides-18.02/testpmd_app_ug/index.html">http://dpdk.org/doc/guides-18.02/testpmd_app_ug/index.html</ulink>.</para>
112 </listitem>
113 </orderedlist>
114 </section>
115</chapter>