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