-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dmadev: introduce DMA device library
The 'dmadev' is a generic type of DMA device. This patch introduce the 'dmadev' device allocation functions. The infrastructure is prepared to welcome drivers in drivers/dma/ Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Kevin Laatz <kevin.laatz@intel.com> Reviewed-by: Conor Walsh <conor.walsh@intel.com>
- Loading branch information
1 parent
e9123c4
commit b36970f
Showing
17 changed files
with
868 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. SPDX-License-Identifier: BSD-3-Clause | ||
Copyright 2021 HiSilicon Limited | ||
DMA Device Drivers | ||
================== | ||
|
||
The following are a list of DMA device drivers, which can be used from | ||
an application through DMA API. | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:numbered: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
.. SPDX-License-Identifier: BSD-3-Clause | ||
Copyright 2021 HiSilicon Limited | ||
DMA Device Library | ||
================== | ||
|
||
The DMA library provides a DMA device framework for management and provisioning | ||
of hardware and software DMA poll mode drivers, defining generic API which | ||
support a number of different DMA operations. | ||
|
||
|
||
Design Principles | ||
----------------- | ||
|
||
The DMA framework provides a generic DMA device framework which supports both | ||
physical (hardware) and virtual (software) DMA devices, as well as a generic DMA | ||
API which allows DMA devices to be managed and configured, and supports DMA | ||
operations to be provisioned on DMA poll mode driver. | ||
|
||
.. _figure_dmadev: | ||
|
||
.. figure:: img/dmadev.* | ||
|
||
The above figure shows the model on which the DMA framework is built on: | ||
|
||
* The DMA controller could have multiple hardware DMA channels (aka. hardware | ||
DMA queues), each hardware DMA channel should be represented by a dmadev. | ||
* The dmadev could create multiple virtual DMA channels, each virtual DMA | ||
channel represents a different transfer context. | ||
* The DMA operation request must be submitted to the virtual DMA channel. | ||
|
||
|
||
Device Management | ||
----------------- | ||
|
||
Device Creation | ||
~~~~~~~~~~~~~~~ | ||
|
||
Physical DMA controllers are discovered during the PCI probe/enumeration of the | ||
EAL function which is executed at DPDK initialization, this is based on their | ||
PCI BDF (bus/bridge, device, function). Specific physical DMA controllers, like | ||
other physical devices in DPDK can be listed using the EAL command line options. | ||
|
||
The dmadevs are dynamically allocated by using the function | ||
``rte_dma_pmd_allocate`` based on the number of hardware DMA channels. | ||
|
||
|
||
Device Identification | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Each DMA device, whether physical or virtual is uniquely designated by two | ||
identifiers: | ||
|
||
- A unique device index used to designate the DMA device in all functions | ||
exported by the DMA API. | ||
|
||
- A device name used to designate the DMA device in console messages, for | ||
administration or debugging purposes. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.