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 82a49ae04eSChen Jing D(Mark) +-- librte_pmd_fm10k # Host interface PMD driver for FM10000 Series 83fc1f2750SBernard Iremonger +-- librte_pmd_ixgbe # 10GbE poll mode driver 84fc1f2750SBernard Iremonger +-- librte_pmd_i40e # 40GbE poll mode driver 85399a4d76SAdrien Mazarguil +-- librte_pmd_mlx4 # Mellanox ConnectX-3 poll mode driver 86fc1f2750SBernard Iremonger +-- librte_pmd_pcap # PCAP poll mode driver 87fc1f2750SBernard Iremonger +-- librte_pmd_ring # ring poll mode driver 88fc1f2750SBernard Iremonger +-- librte_pmd_virtio # virtio poll mode driver 89fc1f2750SBernard Iremonger +-- librte_pmd_vmxnet3 # VMXNET3 poll mode driver 90fc1f2750SBernard Iremonger +-- librte_pmd_xenvirt # Xen virtio poll mode driver 91fc1f2750SBernard Iremonger +-- librte_power # power management library 92fc1f2750SBernard Iremonger +-- librte_ring # software rings (act as lockless FIFOs) 93fc1f2750SBernard Iremonger +-- librte_sched # QoS scheduler and dropper library 94fc1f2750SBernard Iremonger +-- librte_timer # timer library 95fc1f2750SBernard Iremonger 96980ed498SBruce RichardsonDrivers 97980ed498SBruce Richardson------- 98980ed498SBruce Richardson 99980ed498SBruce RichardsonDrivers are special libraries which provide poll-mode driver implementations for 100980ed498SBruce Richardsondevices - either hardware devices or pseudo/virtual devices. They are contained 101980ed498SBruce Richardsonin the "drivers" subdirectory, classified by type, and each compiles to a 102980ed498SBruce Richardsonlibrary with the format "librte_pmd_X.a" where "X" is the driver name. 103980ed498SBruce Richardson 104980ed498SBruce RichardsonThe drivers directory has a net subdirectory which contains:: 105980ed498SBruce Richardson 106980ed498SBruce Richardson drivers/net 107df65e967SBruce Richardson +-- af_packet # poll mode driver based on linux af_packet 1083eb6bdd8SBruce Richardson +-- bonding # bonding poll mode driver 109d15fcf76SBruce Richardson +-- e1000 # 1GbE poll mode drivers (igb and em) 110*72f3de30SBruce Richardson +-- enic # Cisco VIC Ethernet NIC Poll-mode Driver 111980ed498SBruce Richardson 112fc1f2750SBernard IremongerApplications 113fc1f2750SBernard Iremonger------------ 114fc1f2750SBernard Iremonger 115fc1f2750SBernard IremongerApplications are sources that contain a main() function. 116fc1f2750SBernard IremongerThey are located in the $(RTE_SDK)/app and $(RTE_SDK)/examples directories. 117fc1f2750SBernard Iremonger 11848624fd9SSiobhan ButlerThe app directory contains sample applications that are used to test the DPDK (autotests). 119fc1f2750SBernard IremongerThe examples directory contains sample applications that show how libraries can be used. 120fc1f2750SBernard Iremonger 121fc1f2750SBernard Iremonger:: 122fc1f2750SBernard Iremonger 123fc1f2750SBernard Iremonger app 124fc1f2750SBernard Iremonger +-- chkincs # test prog to check include depends 125fc1f2750SBernard Iremonger +-- test # autotests, to validate DPDK features 126fc1f2750SBernard Iremonger `-- test-pmd # test and bench poll mode driver examples 127fc1f2750SBernard Iremonger 128fc1f2750SBernard Iremonger examples 129fc1f2750SBernard Iremonger +-- cmdline # Example of using cmdline library 130fc1f2750SBernard Iremonger +-- dpdk_qat # Example showing integration with Intel QuickAssist 131fea1d908SJohn McNamara +-- exception_path # Sending packets to and from Linux Ethernet device (TAP) 132fc1f2750SBernard Iremonger +-- helloworld # Helloworld basic example 133fc1f2750SBernard Iremonger +-- ip_reassembly # Example showing IP Reassembly 134fc1f2750SBernard Iremonger +-- ip_fragmentation # Example showing IPv4 Fragmentation 135fc1f2750SBernard Iremonger +-- ipv4_multicast # Example showing IPv4 Multicast 136fc1f2750SBernard Iremonger +-- kni # Kernel NIC Interface example 137fc1f2750SBernard Iremonger +-- l2fwd # L2 Forwarding example with and without SR-IOV 138fc1f2750SBernard Iremonger +-- l3fwd # L3 Forwarding example 139fc1f2750SBernard Iremonger +-- l3fwd-power # L3 Forwarding example with power management 140fc1f2750SBernard Iremonger +-- l3fwd-vf # L3 Forwarding example with SR-IOV 141fc1f2750SBernard Iremonger +-- link_status_interrupt # Link status change interrupt example 142fc1f2750SBernard Iremonger +-- load_balancer # Load balancing across multiple cores/sockets 143fc1f2750SBernard Iremonger +-- multi_process # Example applications with multiple DPDK processes 144fc1f2750SBernard Iremonger +-- qos_meter # QoS metering example 145fc1f2750SBernard Iremonger +-- qos_sched # QoS scheduler and dropper example 146fc1f2750SBernard Iremonger +-- timer # Example of using librte_timer library 147fc1f2750SBernard Iremonger +-- vmdq_dcb # Intel 82599 Ethernet Controller VMDQ and DCB receiving 148fc1f2750SBernard Iremonger +-- vmdq # Example of VMDQ receiving for both Intel 10G (82599) and 1G (82576, 82580 and I350) Ethernet Controllers 149fc1f2750SBernard Iremonger `-- vhost # Example of userspace vhost and switch 150fc1f2750SBernard Iremonger 151fc1f2750SBernard Iremonger.. note:: 152fc1f2750SBernard Iremonger 153fc1f2750SBernard Iremonger The actual examples directory may contain additional sample applications to those shown above. 15448624fd9SSiobhan Butler Check the latest DPDK source files for details. 155