]> git.proxmox.com Git - ceph.git/blame - ceph/src/seastar/dpdk/doc/guides/prog_guide/source_org.rst
import 15.2.0 Octopus source
[ceph.git] / ceph / src / seastar / dpdk / doc / guides / prog_guide / source_org.rst
CommitLineData
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
6Source Organization
7===================
8
9This section describes the organization of sources in the DPDK framework.
10
11Makefiles 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
22Makefiles that are provided by the DPDK libraries and applications are located in ``$(RTE_SDK)/mk``.
23
24Config templates are located in ``$(RTE_SDK)/config``. The templates describe the options that are enabled for each target.
25The config file also contains items that can be enabled and disabled for many of the DPDK libraries,
26including debug options.
27The user should look at the config file and become familiar with these options.
28The config file is also used to create a header file, which will be located in the new build directory.
29
30Libraries
31---------
32
33Libraries are located in subdirectories of ``$(RTE_SDK)/lib``.
34By convention a library refers to any code that provides an API to an application.
35Typically, it generates an archive file (``.a``), but a kernel module would also go in the same directory.
36
7c673cae
FG
37Drivers
38-------
39
40Drivers are special libraries which provide poll-mode driver implementations for
41devices: either hardware devices or pseudo/virtual devices. They are contained
42in the *drivers* subdirectory, classified by type, and each compiles to a
43library 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
54Applications
55------------
56
57Applications are source files that contain a ``main()`` function.
58They are located in the ``$(RTE_SDK)/app`` and ``$(RTE_SDK)/examples`` directories.
59
60The app directory contains sample applications that are used to test DPDK (such as autotests)
9f95a23c 61or the Poll Mode Drivers (test-pmd).
7c673cae 62
9f95a23c 63The examples directory contains :doc:`Sample applications<../sample_app_ug/index>` that show how libraries can be used.