xref: /dpdk/doc/guides/prog_guide/source_org.rst (revision a49ae04e853f0ed41c4d7b5d5326fe890008d6bc)
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_bond     # bonding poll mode driver
83fc1f2750SBernard Iremonger    +-- librte_pmd_e1000    # 1GbE poll mode drivers (igb and em)
84*a49ae04eSChen Jing D(Mark)    +-- librte_pmd_fm10k    # Host interface PMD driver for FM10000 Series
85fc1f2750SBernard Iremonger    +-- librte_pmd_ixgbe    # 10GbE poll mode driver
86fc1f2750SBernard Iremonger    +-- librte_pmd_i40e     # 40GbE poll mode driver
87399a4d76SAdrien Mazarguil    +-- librte_pmd_mlx4     # Mellanox ConnectX-3 poll mode driver
88fc1f2750SBernard Iremonger    +-- librte_pmd_pcap     # PCAP poll mode driver
89fc1f2750SBernard Iremonger    +-- librte_pmd_ring     # ring poll mode driver
90fc1f2750SBernard Iremonger    +-- librte_pmd_virtio   # virtio poll mode driver
91fc1f2750SBernard Iremonger    +-- librte_pmd_vmxnet3  # VMXNET3 poll mode driver
92fc1f2750SBernard Iremonger    +-- librte_pmd_xenvirt  # Xen virtio poll mode driver
93fc1f2750SBernard Iremonger    +-- librte_power        # power management library
94fc1f2750SBernard Iremonger    +-- librte_ring         # software rings (act as lockless FIFOs)
95fc1f2750SBernard Iremonger    +-- librte_sched        # QoS scheduler and dropper library
96fc1f2750SBernard Iremonger    +-- librte_timer        # timer library
97fc1f2750SBernard Iremonger
98fc1f2750SBernard IremongerApplications
99fc1f2750SBernard Iremonger------------
100fc1f2750SBernard Iremonger
101fc1f2750SBernard IremongerApplications are sources that contain a main() function.
102fc1f2750SBernard IremongerThey are located in the $(RTE_SDK)/app and $(RTE_SDK)/examples directories.
103fc1f2750SBernard Iremonger
10448624fd9SSiobhan ButlerThe app directory contains sample applications that are used to test the DPDK (autotests).
105fc1f2750SBernard IremongerThe examples directory contains sample applications that show how libraries can be used.
106fc1f2750SBernard Iremonger
107fc1f2750SBernard Iremonger::
108fc1f2750SBernard Iremonger
109fc1f2750SBernard Iremonger    app
110fc1f2750SBernard Iremonger    +-- chkincs            # test prog to check include depends
111fc1f2750SBernard Iremonger    +-- test               # autotests, to validate DPDK features
112fc1f2750SBernard Iremonger    `-- test-pmd           # test and bench poll mode driver examples
113fc1f2750SBernard Iremonger
114fc1f2750SBernard Iremonger    examples
115fc1f2750SBernard Iremonger    +-- cmdline            # Example of using cmdline library
116fc1f2750SBernard Iremonger    +-- dpdk_qat           # Example showing integration with Intel QuickAssist
117fc1f2750SBernard Iremonger    +-- exception_path     # Sending packets to and from Linux ethernet device (TAP)
118fc1f2750SBernard Iremonger    +-- helloworld         # Helloworld basic example
119fc1f2750SBernard Iremonger    +-- ip_reassembly      # Example showing IP Reassembly
120fc1f2750SBernard Iremonger    +-- ip_fragmentation   # Example showing IPv4 Fragmentation
121fc1f2750SBernard Iremonger    +-- ipv4_multicast     # Example showing IPv4 Multicast
122fc1f2750SBernard Iremonger    +-- kni                # Kernel NIC Interface example
123fc1f2750SBernard Iremonger    +-- l2fwd              # L2 Forwarding example with and without SR-IOV
124fc1f2750SBernard Iremonger    +-- l3fwd              # L3 Forwarding example
125fc1f2750SBernard Iremonger    +-- l3fwd-power        # L3 Forwarding example with power management
126fc1f2750SBernard Iremonger    +-- l3fwd-vf           # L3 Forwarding example with SR-IOV
127fc1f2750SBernard Iremonger    +-- link_status_interrupt # Link status change interrupt example
128fc1f2750SBernard Iremonger    +-- load_balancer      # Load balancing across multiple cores/sockets
129fc1f2750SBernard Iremonger    +-- multi_process      # Example applications with multiple DPDK processes
130fc1f2750SBernard Iremonger    +-- qos_meter          # QoS metering example
131fc1f2750SBernard Iremonger    +-- qos_sched          # QoS scheduler and dropper example
132fc1f2750SBernard Iremonger    +-- timer              # Example of using librte_timer library
133fc1f2750SBernard Iremonger    +-- vmdq_dcb           # Intel 82599 Ethernet Controller VMDQ and DCB receiving
134fc1f2750SBernard Iremonger    +-- vmdq               # Example of VMDQ receiving for both Intel 10G (82599) and 1G (82576, 82580 and I350) Ethernet Controllers
135fc1f2750SBernard Iremonger    `-- vhost              # Example of userspace vhost and switch
136fc1f2750SBernard Iremonger
137fc1f2750SBernard Iremonger.. note::
138fc1f2750SBernard Iremonger
139fc1f2750SBernard Iremonger    The actual examples directory may contain additional sample applications to those shown above.
14048624fd9SSiobhan Butler    Check the latest DPDK source files for details.
141