]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | .. SPDX-License-Identifier: BSD-3-Clause |
2 | Copyright(c) 2010-2014 Intel Corporation. | |
7c673cae FG |
3 | |
4 | **Part 2: Development Environment** | |
5 | ||
6 | Source Organization | |
7 | =================== | |
8 | ||
9 | This section describes the organization of sources in the DPDK framework. | |
10 | ||
11 | Makefiles and Config | |
12 | -------------------- | |
13 | ||
14 | .. note:: | |
15 | ||
16 | In the following descriptions, | |
17 | ``RTE_SDK`` is the environment variable that points to the base directory into which the tarball was extracted. | |
18 | See | |
19 | :ref:`Useful_Variables_Provided_by_the_Build_System` | |
20 | for descriptions of other variables. | |
21 | ||
22 | Makefiles that are provided by the DPDK libraries and applications are located in ``$(RTE_SDK)/mk``. | |
23 | ||
24 | Config templates are located in ``$(RTE_SDK)/config``. The templates describe the options that are enabled for each target. | |
25 | The config file also contains items that can be enabled and disabled for many of the DPDK libraries, | |
26 | including debug options. | |
27 | The user should look at the config file and become familiar with these options. | |
28 | The config file is also used to create a header file, which will be located in the new build directory. | |
29 | ||
30 | Libraries | |
31 | --------- | |
32 | ||
33 | Libraries are located in subdirectories of ``$(RTE_SDK)/lib``. | |
34 | By convention a library refers to any code that provides an API to an application. | |
35 | Typically, it generates an archive file (``.a``), but a kernel module would also go in the same directory. | |
36 | ||
7c673cae FG |
37 | Drivers |
38 | ------- | |
39 | ||
40 | Drivers are special libraries which provide poll-mode driver implementations for | |
41 | devices: either hardware devices or pseudo/virtual devices. They are contained | |
42 | in the *drivers* subdirectory, classified by type, and each compiles to a | |
43 | library with the format ``librte_pmd_X.a`` where ``X`` is the driver name. | |
44 | ||
7c673cae FG |
45 | .. note:: |
46 | ||
47 | Several of the ``driver/net`` directories contain a ``base`` | |
48 | sub-directory. The ``base`` directory generally contains code the shouldn't | |
49 | be modified directly by the user. Any enhancements should be done via the | |
50 | ``X_osdep.c`` and/or ``X_osdep.h`` files in that directory. Refer to the | |
51 | local README in the base directories for driver specific instructions. | |
52 | ||
53 | ||
54 | Applications | |
55 | ------------ | |
56 | ||
57 | Applications are source files that contain a ``main()`` function. | |
58 | They are located in the ``$(RTE_SDK)/app`` and ``$(RTE_SDK)/examples`` directories. | |
59 | ||
60 | The app directory contains sample applications that are used to test DPDK (such as autotests) | |
9f95a23c | 61 | or the Poll Mode Drivers (test-pmd). |
7c673cae | 62 | |
9f95a23c | 63 | The examples directory contains :doc:`Sample applications<../sample_app_ug/index>` that show how libraries can be used. |