1.. SPDX-License-Identifier: BSD-3-Clause 2 Copyright(c) 2010-2017 Intel Corporation. 3 4Introduction to the DPDK Sample Applications 5============================================ 6 7The DPDK Sample Applications are small standalone applications which 8demonstrate various features of DPDK. They can be considered as a cookbook of 9DPDK features. Users interested in getting started with DPDK can take the 10applications, try out the features, and then extend them to fit their needs. 11 12 13The DPDK Sample Applications 14---------------------------- 15 16Table :numref:`table_sample_apps` shows a list of some of the main sample 17applications that are available in the examples directory of DPDK: 18 19 .. _table_sample_apps: 20 21 .. table:: **Some of the DPDK Sample applications** 22 23 +---------------------------------------+--------------------------------------+ 24 | Bonding | Netmap Compatibility | 25 +---------------------------------------+--------------------------------------+ 26 | Command Line | Packet Ordering | 27 +---------------------------------------+--------------------------------------+ 28 | Distributor | Performance Thread | 29 +---------------------------------------+--------------------------------------+ 30 | Ethtool | Precision Time Protocol (PTP) Client | 31 +---------------------------------------+--------------------------------------+ 32 | Exception Path | Quality of Service (QoS) Metering | 33 +---------------------------------------+--------------------------------------+ 34 | Hello World | QoS Scheduler | 35 +---------------------------------------+--------------------------------------+ 36 | Internet Protocol (IP) Fragmentation | Quota and Watermark | 37 +---------------------------------------+--------------------------------------+ 38 | IP Pipeline | RX/TX Callbacks | 39 +---------------------------------------+--------------------------------------+ 40 | IP Reassembly | Server node EFD | 41 +---------------------------------------+--------------------------------------+ 42 | IPsec Security Gateway | Basic Forwarding/Skeleton App | 43 +---------------------------------------+--------------------------------------+ 44 | IPv4 multicast | Tunnel End Point (TEP) termination | 45 +---------------------------------------+--------------------------------------+ 46 | Kernel NIC Interface | Timer | 47 +---------------------------------------+--------------------------------------+ 48 | Network Layer 2 Forwarding + variants | Vhost | 49 +---------------------------------------+--------------------------------------+ 50 | Network Layer 3 Forwarding + variants | Vhost Xen | 51 +---------------------------------------+--------------------------------------+ 52 | Link Status Interrupt | VMDQ Forwarding | 53 +---------------------------------------+--------------------------------------+ 54 | Load Balancer | VMDQ and DCB Forwarding | 55 +---------------------------------------+--------------------------------------+ 56 | Multi-process | VM Power Management | 57 +---------------------------------------+--------------------------------------+ 58 59These examples range from simple to reasonably complex but most are designed 60to demonstrate one particular feature of DPDK. Some of the more interesting 61examples are highlighted below. 62 63 64* :doc:`Hello World<hello_world>`: As with most introductions to a 65 programming framework a good place to start is with the Hello World 66 application. The Hello World example sets up the DPDK Environment Abstraction 67 Layer (EAL), and prints a simple "Hello World" message to each of the DPDK 68 enabled cores. This application doesn't do any packet forwarding but it is a 69 good way to test if the DPDK environment is compiled and set up properly. 70 71* :doc:`Basic Forwarding/Skeleton Application<skeleton>`: The Basic 72 Forwarding/Skeleton contains the minimum amount of code required to enable 73 basic packet forwarding with DPDK. This allows you to test if your network 74 interfaces are working with DPDK. 75 76* :doc:`Network Layer 2 forwarding<l2_forward_real_virtual>`: The Network Layer 2 77 forwarding, or ``l2fwd`` application does forwarding based on Ethernet MAC 78 addresses like a simple switch. 79 80* :doc:`Network Layer 3 forwarding<l3_forward>`: The Network Layer3 81 forwarding, or ``l3fwd`` application does forwarding based on Internet 82 Protocol, IPv4 or IPv6 like a simple router. 83 84* :doc:`Packet Distributor<dist_app>`: The Packet Distributor 85 demonstrates how to distribute packets arriving on an Rx port to different 86 cores for processing and transmission. 87 88* :doc:`Multi-Process Application<multi_process>`: The 89 multi-process application shows how two DPDK processes can work together using 90 queues and memory pools to share information. 91 92* :doc:`RX/TX callbacks Application<rxtx_callbacks>`: The RX/TX 93 callbacks sample application is a packet forwarding application that 94 demonstrates the use of user defined callbacks on received and transmitted 95 packets. The application calculates the latency of a packet between RX 96 (packet arrival) and TX (packet transmission) by adding callbacks to the RX 97 and TX packet processing functions. 98 99* :doc:`IPSec Security Gateway<ipsec_secgw>`: The IPSec Security 100 Gateway application is minimal example of something closer to a real world 101 example. This is also a good example of an application using the DPDK 102 Cryptodev framework. 103 104* :doc:`Precision Time Protocol (PTP) client<ptpclient>`: The PTP 105 client is another minimal implementation of a real world application. 106 In this case the application is a PTP client that communicates with a PTP 107 master clock to synchronize time on a Network Interface Card (NIC) using the 108 IEEE1588 protocol. 109 110* :doc:`Quality of Service (QoS) Scheduler<qos_scheduler>`: The QoS 111 Scheduler application demonstrates the use of DPDK to provide QoS scheduling. 112 113There are many more examples shown in the following chapters. Each of the 114documented sample applications show how to compile, configure and run the 115application as well as explaining the main functionality of the code. 116