xref: /dpdk/doc/guides/prog_guide/source_org.rst (revision aaee1d15cbb224a1c526c0707eabfb1cb22ba824)
15630257fSFerruh Yigit..  SPDX-License-Identifier: BSD-3-Clause
25630257fSFerruh Yigit    Copyright(c) 2010-2014 Intel Corporation.
3fc1f2750SBernard Iremonger
4fc1f2750SBernard IremongerSource Organization
5fc1f2750SBernard Iremonger===================
6fc1f2750SBernard Iremonger
748624fd9SSiobhan ButlerThis section describes the organization of sources in the DPDK framework.
8fc1f2750SBernard Iremonger
9fc1f2750SBernard IremongerLibraries
10fc1f2750SBernard Iremonger---------
11fc1f2750SBernard Iremonger
123cc6ecfdSCiara PowerLibraries are located in subdirectories of ``dpdk/lib``.
130e03fe74SJohn McNamaraBy convention a library refers to any code that provides an API to an application.
140e03fe74SJohn McNamaraTypically, it generates an archive file (``.a``), but a kernel module would also go in the same directory.
15fc1f2750SBernard Iremonger
16980ed498SBruce RichardsonDrivers
17980ed498SBruce Richardson-------
18980ed498SBruce Richardson
19980ed498SBruce RichardsonDrivers are special libraries which provide poll-mode driver implementations for
200e03fe74SJohn McNamaradevices: either hardware devices or pseudo/virtual devices. They are contained
210e03fe74SJohn McNamarain the *drivers* subdirectory, classified by type, and each compiles to a
22*8809f78cSBruce Richardsonlibrary with the format ``librte_X_Y.a`` where ``X`` is the device class
23*8809f78cSBruce Richardsonname and ``Y`` is the driver name.
24980ed498SBruce Richardson
250e03fe74SJohn McNamara.. note::
260e03fe74SJohn McNamara
270e03fe74SJohn McNamara   Several of the ``driver/net`` directories contain a ``base``
280e03fe74SJohn McNamara   sub-directory. The ``base`` directory generally contains code the shouldn't
290e03fe74SJohn McNamara   be modified directly by the user. Any enhancements should be done via the
300e03fe74SJohn McNamara   ``X_osdep.c`` and/or ``X_osdep.h`` files in that directory. Refer to the
310e03fe74SJohn McNamara   local README in the base directories for driver specific instructions.
320e03fe74SJohn McNamara
330e03fe74SJohn McNamara
34fc1f2750SBernard IremongerApplications
35fc1f2750SBernard Iremonger------------
36fc1f2750SBernard Iremonger
370e03fe74SJohn McNamaraApplications are source files that contain a ``main()`` function.
383cc6ecfdSCiara PowerThey are located in the ``dpdk/app`` and ``dpdk/examples`` directories.
39fc1f2750SBernard Iremonger
400e03fe74SJohn McNamaraThe app directory contains sample applications that are used to test DPDK (such as autotests)
41e5062369SDavid Marchandor the Poll Mode Drivers (test-pmd).
42fc1f2750SBernard Iremonger
43e5062369SDavid MarchandThe examples directory contains :doc:`Sample applications<../sample_app_ug/index>` that show how libraries can be used.
44