xref: /dpdk/doc/guides/prog_guide/source_org.rst (revision 10b71caecbe1cddcbb65c050ca775fba575e88db)
1..  SPDX-License-Identifier: BSD-3-Clause
2    Copyright(c) 2010-2014 Intel Corporation.
3
4**Part 2: Development Environment**
5
6Source Organization
7===================
8
9This section describes the organization of sources in the DPDK framework.
10
11Libraries
12---------
13
14Libraries are located in subdirectories of ``dpdk/lib``.
15By convention a library refers to any code that provides an API to an application.
16Typically, it generates an archive file (``.a``), but a kernel module would also go in the same directory.
17
18Drivers
19-------
20
21Drivers are special libraries which provide poll-mode driver implementations for
22devices: either hardware devices or pseudo/virtual devices. They are contained
23in the *drivers* subdirectory, classified by type, and each compiles to a
24library with the format ``librte_pmd_X.a`` where ``X`` is the driver name.
25
26.. note::
27
28   Several of the ``driver/net`` directories contain a ``base``
29   sub-directory. The ``base`` directory generally contains code the shouldn't
30   be modified directly by the user. Any enhancements should be done via the
31   ``X_osdep.c`` and/or ``X_osdep.h`` files in that directory. Refer to the
32   local README in the base directories for driver specific instructions.
33
34
35Applications
36------------
37
38Applications are source files that contain a ``main()`` function.
39They are located in the ``dpdk/app`` and ``dpdk/examples`` directories.
40
41The app directory contains sample applications that are used to test DPDK (such as autotests)
42or the Poll Mode Drivers (test-pmd).
43
44The examples directory contains :doc:`Sample applications<../sample_app_ug/index>` that show how libraries can be used.
45