1fc1f2750SBernard Iremonger.. BSD LICENSE 2fc1f2750SBernard Iremonger Copyright(c) 2010-2014 Intel Corporation. All rights reserved. 3fc1f2750SBernard Iremonger All rights reserved. 4fc1f2750SBernard Iremonger 5fc1f2750SBernard Iremonger Redistribution and use in source and binary forms, with or without 6fc1f2750SBernard Iremonger modification, are permitted provided that the following conditions 7fc1f2750SBernard Iremonger are met: 8fc1f2750SBernard Iremonger 9fc1f2750SBernard Iremonger * Redistributions of source code must retain the above copyright 10fc1f2750SBernard Iremonger notice, this list of conditions and the following disclaimer. 11fc1f2750SBernard Iremonger * Redistributions in binary form must reproduce the above copyright 12fc1f2750SBernard Iremonger notice, this list of conditions and the following disclaimer in 13fc1f2750SBernard Iremonger the documentation and/or other materials provided with the 14fc1f2750SBernard Iremonger distribution. 15fc1f2750SBernard Iremonger * Neither the name of Intel Corporation nor the names of its 16fc1f2750SBernard Iremonger contributors may be used to endorse or promote products derived 17fc1f2750SBernard Iremonger from this software without specific prior written permission. 18fc1f2750SBernard Iremonger 19fc1f2750SBernard Iremonger THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20fc1f2750SBernard Iremonger "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21fc1f2750SBernard Iremonger LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22fc1f2750SBernard Iremonger A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23fc1f2750SBernard Iremonger OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24fc1f2750SBernard Iremonger SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25fc1f2750SBernard Iremonger LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26fc1f2750SBernard Iremonger DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27fc1f2750SBernard Iremonger THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28fc1f2750SBernard Iremonger (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29fc1f2750SBernard Iremonger OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30fc1f2750SBernard Iremonger 31fc1f2750SBernard Iremonger**Part 2: Development Environment** 32fc1f2750SBernard Iremonger 33fc1f2750SBernard IremongerSource Organization 34fc1f2750SBernard Iremonger=================== 35fc1f2750SBernard Iremonger 3648624fd9SSiobhan ButlerThis section describes the organization of sources in the DPDK framework. 37fc1f2750SBernard Iremonger 38fc1f2750SBernard IremongerMakefiles and Config 39fc1f2750SBernard Iremonger-------------------- 40fc1f2750SBernard Iremonger 41fc1f2750SBernard Iremonger.. note:: 42fc1f2750SBernard Iremonger 43fc1f2750SBernard Iremonger In the following descriptions, 44fc1f2750SBernard Iremonger RTE_SDK is the environment variable that points to the base directory into which the tarball was extracted. 45fc1f2750SBernard Iremonger See 46fc1f2750SBernard Iremonger :ref:`Useful Variables Provided by the Build System <Useful_Variables_Provided_by_the_Build_System>` 47fc1f2750SBernard Iremonger for descriptions of other variables. 48fc1f2750SBernard Iremonger 4948624fd9SSiobhan ButlerMakefiles that are provided by the DPDK libraries and applications are located in $(RTE_SDK)/mk. 50fc1f2750SBernard Iremonger 51fc1f2750SBernard IremongerConfig templates are located in $(RTE_SDK)/config. The templates describe the options that are enabled for each target. 5248624fd9SSiobhan ButlerThe config file also contains items that can be enabled and disabled for many of the DPDK libraries, 53fc1f2750SBernard Iremongerincluding debug options. 54fc1f2750SBernard IremongerThe user should look at the config file and become familiar with the options. 55fc1f2750SBernard IremongerThe config file is also used to create a header file, which will be located in the new build directory. 56fc1f2750SBernard Iremonger 57fc1f2750SBernard IremongerLibraries 58fc1f2750SBernard Iremonger--------- 59fc1f2750SBernard Iremonger 60fc1f2750SBernard IremongerLibraries are located in subdirectories of $(RTE_SDK)/lib. 61fc1f2750SBernard IremongerBy convention, we call a library any code that provides an API to an application. 62fc1f2750SBernard IremongerTypically, it generates an archive file (.a), but a kernel module should also go in the same directory. 63fc1f2750SBernard Iremonger 64fc1f2750SBernard IremongerThe lib directory contains:: 65fc1f2750SBernard Iremonger 66fc1f2750SBernard Iremonger lib 67fc1f2750SBernard Iremonger +-- librte_cmdline # command line interface helper 68fc1f2750SBernard Iremonger +-- librte_distributor # packet distributor 69fc1f2750SBernard Iremonger +-- librte_eal # environment abstraction layer 70fc1f2750SBernard Iremonger +-- librte_ether # generic interface to poll mode driver 71fc1f2750SBernard Iremonger +-- librte_hash # hash library 72fc1f2750SBernard Iremonger +-- librte_ip_frag # IP fragmentation library 73fc1f2750SBernard Iremonger +-- librte_ivshmem # QEMU IVSHMEM library 74fc1f2750SBernard Iremonger +-- librte_kni # kernel NIC interface 75fc1f2750SBernard Iremonger +-- librte_kvargs # argument parsing library 76fc1f2750SBernard Iremonger +-- librte_lpm # longest prefix match library 77fc1f2750SBernard Iremonger +-- librte_malloc # malloc-like functions 78fc1f2750SBernard Iremonger +-- librte_mbuf # packet and control mbuf manipulation library 79fc1f2750SBernard Iremonger +-- librte_mempool # memory pool manager (fixedsized objects) 80fc1f2750SBernard Iremonger +-- librte_meter # QoS metering library 81fc1f2750SBernard Iremonger +-- librte_net # various IP-related headers 82fc1f2750SBernard Iremonger +-- librte_pmd_vmxnet3 # VMXNET3 poll mode driver 83fc1f2750SBernard Iremonger +-- librte_pmd_xenvirt # Xen virtio poll mode driver 84fc1f2750SBernard Iremonger +-- librte_power # power management library 85fc1f2750SBernard Iremonger +-- librte_ring # software rings (act as lockless FIFOs) 86fc1f2750SBernard Iremonger +-- librte_sched # QoS scheduler and dropper library 87fc1f2750SBernard Iremonger +-- librte_timer # timer library 88fc1f2750SBernard Iremonger 89980ed498SBruce RichardsonDrivers 90980ed498SBruce Richardson------- 91980ed498SBruce Richardson 92980ed498SBruce RichardsonDrivers are special libraries which provide poll-mode driver implementations for 93980ed498SBruce Richardsondevices - either hardware devices or pseudo/virtual devices. They are contained 94980ed498SBruce Richardsonin the "drivers" subdirectory, classified by type, and each compiles to a 95980ed498SBruce Richardsonlibrary with the format "librte_pmd_X.a" where "X" is the driver name. 96980ed498SBruce Richardson 97980ed498SBruce RichardsonThe drivers directory has a net subdirectory which contains:: 98980ed498SBruce Richardson 99980ed498SBruce Richardson drivers/net 100df65e967SBruce Richardson +-- af_packet # poll mode driver based on linux af_packet 1013eb6bdd8SBruce Richardson +-- bonding # bonding poll mode driver 102d15fcf76SBruce Richardson +-- e1000 # 1GbE poll mode drivers (igb and em) 10372f3de30SBruce Richardson +-- enic # Cisco VIC Ethernet NIC Poll-mode Driver 104637bb769SBruce Richardson +-- fm10k # Host interface PMD driver for FM10000 Series 1055c922205SBruce Richardson +-- i40e # 40GbE poll mode driver 106abf7275bSBruce Richardson +-- ixgbe # 10GbE poll mode driver 10798a1f377SBruce Richardson +-- mlx4 # Mellanox ConnectX-3 poll mode driver 108b3b413f7SBruce Richardson +-- null # NULL poll mode driver for testing 109232771c7SBruce Richardson +-- pcap # PCAP poll mode driver 110f3aec9f0SBruce Richardson +-- ring # ring poll mode driver 111*6c3169a3SBruce Richardson +-- virtio # virtio poll mode driver 112980ed498SBruce Richardson 113fc1f2750SBernard IremongerApplications 114fc1f2750SBernard Iremonger------------ 115fc1f2750SBernard Iremonger 116fc1f2750SBernard IremongerApplications are sources that contain a main() function. 117fc1f2750SBernard IremongerThey are located in the $(RTE_SDK)/app and $(RTE_SDK)/examples directories. 118fc1f2750SBernard Iremonger 11948624fd9SSiobhan ButlerThe app directory contains sample applications that are used to test the DPDK (autotests). 120fc1f2750SBernard IremongerThe examples directory contains sample applications that show how libraries can be used. 121fc1f2750SBernard Iremonger 122fc1f2750SBernard Iremonger:: 123fc1f2750SBernard Iremonger 124fc1f2750SBernard Iremonger app 125fc1f2750SBernard Iremonger +-- chkincs # test prog to check include depends 126fc1f2750SBernard Iremonger +-- test # autotests, to validate DPDK features 127fc1f2750SBernard Iremonger `-- test-pmd # test and bench poll mode driver examples 128fc1f2750SBernard Iremonger 129fc1f2750SBernard Iremonger examples 130fc1f2750SBernard Iremonger +-- cmdline # Example of using cmdline library 131fc1f2750SBernard Iremonger +-- dpdk_qat # Example showing integration with Intel QuickAssist 132fea1d908SJohn McNamara +-- exception_path # Sending packets to and from Linux Ethernet device (TAP) 133fc1f2750SBernard Iremonger +-- helloworld # Helloworld basic example 134fc1f2750SBernard Iremonger +-- ip_reassembly # Example showing IP Reassembly 135fc1f2750SBernard Iremonger +-- ip_fragmentation # Example showing IPv4 Fragmentation 136fc1f2750SBernard Iremonger +-- ipv4_multicast # Example showing IPv4 Multicast 137fc1f2750SBernard Iremonger +-- kni # Kernel NIC Interface example 138fc1f2750SBernard Iremonger +-- l2fwd # L2 Forwarding example with and without SR-IOV 139fc1f2750SBernard Iremonger +-- l3fwd # L3 Forwarding example 140fc1f2750SBernard Iremonger +-- l3fwd-power # L3 Forwarding example with power management 141fc1f2750SBernard Iremonger +-- l3fwd-vf # L3 Forwarding example with SR-IOV 142fc1f2750SBernard Iremonger +-- link_status_interrupt # Link status change interrupt example 143fc1f2750SBernard Iremonger +-- load_balancer # Load balancing across multiple cores/sockets 144fc1f2750SBernard Iremonger +-- multi_process # Example applications with multiple DPDK processes 145fc1f2750SBernard Iremonger +-- qos_meter # QoS metering example 146fc1f2750SBernard Iremonger +-- qos_sched # QoS scheduler and dropper example 147fc1f2750SBernard Iremonger +-- timer # Example of using librte_timer library 148fc1f2750SBernard Iremonger +-- vmdq_dcb # Intel 82599 Ethernet Controller VMDQ and DCB receiving 149fc1f2750SBernard Iremonger +-- vmdq # Example of VMDQ receiving for both Intel 10G (82599) and 1G (82576, 82580 and I350) Ethernet Controllers 150fc1f2750SBernard Iremonger `-- vhost # Example of userspace vhost and switch 151fc1f2750SBernard Iremonger 152fc1f2750SBernard Iremonger.. note:: 153fc1f2750SBernard Iremonger 154fc1f2750SBernard Iremonger The actual examples directory may contain additional sample applications to those shown above. 15548624fd9SSiobhan Butler Check the latest DPDK source files for details. 156