xref: /dpdk/doc/guides/sample_app_ug/intro.rst (revision bef33b0a9d58e638cf2f5e5f4e7e3ce355958d3c)
1..  BSD LICENSE
2    Copyright(c) 2010-2017 Intel Corporation. All rights reserved.
3    All rights reserved.
4
5    Redistribution and use in source and binary forms, with or without
6    modification, are permitted provided that the following conditions
7    are met:
8
9    * Redistributions of source code must retain the above copyright
10    notice, this list of conditions and the following disclaimer.
11    * Redistributions in binary form must reproduce the above copyright
12    notice, this list of conditions and the following disclaimer in
13    the documentation and/or other materials provided with the
14    distribution.
15    * Neither the name of Intel Corporation nor the names of its
16    contributors may be used to endorse or promote products derived
17    from this software without specific prior written permission.
18
19    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31Introduction to the DPDK Sample Applications
32============================================
33
34The DPDK Sample Applications are small standalone applications which
35demonstrate various features of DPDK. They can be considered as a cookbook of
36DPDK features.  Users interested in getting started with DPDK can take the
37applications, try out the features, and then extend them to fit their needs.
38
39
40The DPDK Sample Applications
41----------------------------
42
43Table :numref:`table_sample_apps` shows a list of some of the main sample
44applications that are available in the examples directory of DPDK:
45
46 .. _table_sample_apps:
47
48 .. table:: **Some of the DPDK Sample applications**
49
50    +---------------------------------------+--------------------------------------+
51    | Bonding                               | Netmap Compatibility                 |
52    +---------------------------------------+--------------------------------------+
53    | Command Line                          | Packet Ordering                      |
54    +---------------------------------------+--------------------------------------+
55    | Distributor                           | Performance Thread                   |
56    +---------------------------------------+--------------------------------------+
57    | Ethtool                               | Precision Time Protocol (PTP) Client |
58    +---------------------------------------+--------------------------------------+
59    | Exception Path                        | Quality of Service (QoS) Metering    |
60    +---------------------------------------+--------------------------------------+
61    | Hello World                           | QoS Scheduler                        |
62    +---------------------------------------+--------------------------------------+
63    | Internet Protocol (IP) Fragmentation  | Quota and Watermark                  |
64    +---------------------------------------+--------------------------------------+
65    | IP Pipeline                           | RX/TX Callbacks                      |
66    +---------------------------------------+--------------------------------------+
67    | IP Reassembly                         | Server node EFD                      |
68    +---------------------------------------+--------------------------------------+
69    | IPsec Security Gateway                | Basic Forwarding/Skeleton App        |
70    +---------------------------------------+--------------------------------------+
71    | IPv4 multicast                        | Tunnel End Point (TEP) termination   |
72    +---------------------------------------+--------------------------------------+
73    | Kernel NIC Interface                  | Timer                                |
74    +---------------------------------------+--------------------------------------+
75    | Network Layer 2 Forwarding + variants | Vhost                                |
76    +---------------------------------------+--------------------------------------+
77    | Network Layer 3 Forwarding + variants | Vhost Xen                            |
78    +---------------------------------------+--------------------------------------+
79    | Link Status Interrupt                 | VMDQ Forwarding                      |
80    +---------------------------------------+--------------------------------------+
81    | Load Balancer                         | VMDQ and DCB Forwarding              |
82    +---------------------------------------+--------------------------------------+
83    | Multi-process                         | VM Power Management                  |
84    +---------------------------------------+--------------------------------------+
85
86These examples range from simple to reasonably complex but most are designed
87to demonstrate one particular feature of DPDK. Some of the more interesting
88examples are highlighted below.
89
90
91* :doc:`Hello World<hello_world>`: As with most introductions to a
92  programming framework a good place to start is with the Hello World
93  application. The Hello World example sets up the DPDK Environment Abstraction
94  Layer (EAL), and prints a simple "Hello World" message to each of the DPDK
95  enabled cores. This application doesn't do any packet forwarding but it is a
96  good way to test if the DPDK environment is compiled and set up properly.
97
98* :doc:`Basic Forwarding/Skeleton Application<skeleton>`: The Basic
99  Forwarding/Skeleton contains the minimum amount of code required to enable
100  basic packet forwarding with DPDK. This allows you to test if your network
101  interfaces are working with DPDK.
102
103* :doc:`Network Layer 2 forwarding<l2_forward_real_virtual>`: The Network Layer 2
104  forwarding, or ``l2fwd`` application does forwarding based on Ethernet MAC
105  addresses like a simple switch.
106
107* :doc:`Network Layer 3 forwarding<l3_forward>`: The Network Layer3
108  forwarding, or ``l3fwd`` application does forwarding based on Internet
109  Protocol, IPv4 or IPv6 like a simple router.
110
111* :doc:`Packet Distributor<dist_app>`: The Packet Distributor
112  demonstrates how to distribute packets arriving on an Rx port to different
113  cores for processing and transmission.
114
115* :doc:`Multi-Process Application<multi_process>`: The
116  multi-process application shows how two DPDK processes can work together using
117  queues and memory pools to share information.
118
119* :doc:`RX/TX callbacks Application<rxtx_callbacks>`: The RX/TX
120  callbacks sample application is a packet forwarding application that
121  demonstrates the use of user defined callbacks on received and transmitted
122  packets. The application calculates the latency of a packet between RX
123  (packet arrival) and TX (packet transmission) by adding callbacks to the RX
124  and TX packet processing functions.
125
126* :doc:`IPSec Security Gateway<ipsec_secgw>`: The IPSec Security
127  Gateway application is minimal example of something closer to a real world
128  example. This is also a good example of an application using the DPDK
129  Cryptodev framework.
130
131* :doc:`Precision Time Protocol (PTP) client<ptpclient>`: The PTP
132  client is another minimal implementation of a real world application.
133  In this case the application is a PTP client that communicates with a PTP
134  master clock to synchronize time on a Network Interface Card (NIC) using the
135  IEEE1588 protocol.
136
137* :doc:`Quality of Service (QoS) Scheduler<qos_scheduler>`: The QoS
138  Scheduler application demonstrates the use of DPDK to provide QoS scheduling.
139
140There are many more examples shown in the following chapters. Each of the
141documented sample applications show how to compile, configure and run the
142application as well as explaining the main functionality of the code.
143