1.. BSD LICENSE 2 Copyright(c) 2010-2014 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 31**Part 2: Development Environment** 32 33Source Organization 34=================== 35 36This section describes the organization of sources in the DPDK framework. 37 38Makefiles and Config 39-------------------- 40 41.. note:: 42 43 In the following descriptions, 44 RTE_SDK is the environment variable that points to the base directory into which the tarball was extracted. 45 See 46 :ref:`Useful Variables Provided by the Build System <Useful_Variables_Provided_by_the_Build_System>` 47 for descriptions of other variables. 48 49Makefiles that are provided by the DPDK libraries and applications are located in $(RTE_SDK)/mk. 50 51Config templates are located in $(RTE_SDK)/config. The templates describe the options that are enabled for each target. 52The config file also contains items that can be enabled and disabled for many of the DPDK libraries, 53including debug options. 54The user should look at the config file and become familiar with the options. 55The config file is also used to create a header file, which will be located in the new build directory. 56 57Libraries 58--------- 59 60Libraries are located in subdirectories of $(RTE_SDK)/lib. 61By convention, we call a library any code that provides an API to an application. 62Typically, it generates an archive file (.a), but a kernel module should also go in the same directory. 63 64The lib directory contains:: 65 66 lib 67 +-- librte_cmdline # command line interface helper 68 +-- librte_distributor # packet distributor 69 +-- librte_eal # environment abstraction layer 70 +-- librte_ether # generic interface to poll mode driver 71 +-- librte_hash # hash library 72 +-- librte_ip_frag # IP fragmentation library 73 +-- librte_ivshmem # QEMU IVSHMEM library 74 +-- librte_kni # kernel NIC interface 75 +-- librte_kvargs # argument parsing library 76 +-- librte_lpm # longest prefix match library 77 +-- librte_malloc # malloc-like functions 78 +-- librte_mbuf # packet and control mbuf manipulation library 79 +-- librte_mempool # memory pool manager (fixedsized objects) 80 +-- librte_meter # QoS metering library 81 +-- librte_net # various IP-related headers 82 +-- librte_pmd_bond # bonding poll mode driver 83 +-- librte_pmd_e1000 # 1GbE poll mode drivers (igb and em) 84 +-- librte_pmd_ixgbe # 10GbE poll mode driver 85 +-- librte_pmd_i40e # 40GbE poll mode driver 86 +-- librte_pmd_pcap # PCAP poll mode driver 87 +-- librte_pmd_ring # ring poll mode driver 88 +-- librte_pmd_virtio # virtio poll mode driver 89 +-- librte_pmd_vmxnet3 # VMXNET3 poll mode driver 90 +-- librte_pmd_xenvirt # Xen virtio poll mode driver 91 +-- librte_power # power management library 92 +-- librte_ring # software rings (act as lockless FIFOs) 93 +-- librte_sched # QoS scheduler and dropper library 94 +-- librte_timer # timer library 95 96Applications 97------------ 98 99Applications are sources that contain a main() function. 100They are located in the $(RTE_SDK)/app and $(RTE_SDK)/examples directories. 101 102The app directory contains sample applications that are used to test the DPDK (autotests). 103The examples directory contains sample applications that show how libraries can be used. 104 105:: 106 107 app 108 +-- chkincs # test prog to check include depends 109 +-- test # autotests, to validate DPDK features 110 `-- test-pmd # test and bench poll mode driver examples 111 112 examples 113 +-- cmdline # Example of using cmdline library 114 +-- dpdk_qat # Example showing integration with Intel QuickAssist 115 +-- exception_path # Sending packets to and from Linux ethernet device (TAP) 116 +-- helloworld # Helloworld basic example 117 +-- ip_reassembly # Example showing IP Reassembly 118 +-- ip_fragmentation # Example showing IPv4 Fragmentation 119 +-- ipv4_multicast # Example showing IPv4 Multicast 120 +-- kni # Kernel NIC Interface example 121 +-- l2fwd # L2 Forwarding example with and without SR-IOV 122 +-- l3fwd # L3 Forwarding example 123 +-- l3fwd-power # L3 Forwarding example with power management 124 +-- l3fwd-vf # L3 Forwarding example with SR-IOV 125 +-- link_status_interrupt # Link status change interrupt example 126 +-- load_balancer # Load balancing across multiple cores/sockets 127 +-- multi_process # Example applications with multiple DPDK processes 128 +-- qos_meter # QoS metering example 129 +-- qos_sched # QoS scheduler and dropper example 130 +-- timer # Example of using librte_timer library 131 +-- vmdq_dcb # Intel 82599 Ethernet Controller VMDQ and DCB receiving 132 +-- vmdq # Example of VMDQ receiving for both Intel 10G (82599) and 1G (82576, 82580 and I350) Ethernet Controllers 133 `-- vhost # Example of userspace vhost and switch 134 135.. note:: 136 137 The actual examples directory may contain additional sample applications to those shown above. 138 Check the latest DPDK source files for details. 139