[dpdk-dev] [PATCH v25 2/6] dmadev: add control plane API support
Bruce Richardson
bruce.richardson at intel.com
Mon Oct 11 17:44:36 CEST 2021
On Mon, Oct 11, 2021 at 03:33:44PM +0800, Chengwen Feng wrote:
> This patch add control plane API for dmadev.
>
> Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
> Acked-by: Morten Brørup <mb at smartsharesystems.com>
> Reviewed-by: Kevin Laatz <kevin.laatz at intel.com>
> Reviewed-by: Conor Walsh <conor.walsh at intel.com>
> ---
> doc/guides/prog_guide/dmadev.rst | 38 ++
> doc/guides/rel_notes/release_21_11.rst | 1 +
> lib/dmadev/rte_dmadev.c | 360 +++++++++++++++++++
> lib/dmadev/rte_dmadev.h | 464 +++++++++++++++++++++++++
> lib/dmadev/rte_dmadev_pmd.h | 61 ++++
> lib/dmadev/version.map | 9 +
> 6 files changed, 933 insertions(+)
>
<snip>
> +/**
> + * A structure used to retrieve the information of a DMA device.
> + *
> + * @see rte_dma_info_get
> + */
> +struct rte_dma_info {
> + /** Device capabilities (RTE_DMA_CAPA_*). */
> + uint64_t dev_capa;
> + /** Maximum number of virtual DMA channels supported. */
> + uint16_t max_vchans;
> + /** Maximum allowed number of virtual DMA channel descriptors. */
> + uint16_t max_desc;
> + /** Minimum allowed number of virtual DMA channel descriptors. */
> + uint16_t min_desc;
> + /** Maximum number of source or destination scatter-gather entry
> + * supported.
> + * If the device does not support COPY_SG capability, this value can be
> + * zero.
> + * If the device supports COPY_SG capability, then rte_dma_copy_sg()
> + * parameter nb_src/nb_dst should not exceed this value.
> + */
> + uint16_t max_sges;
> + /** NUMA node connection, -1 if unknown. */
> + int16_t numa_node;
> + /** Number of virtual DMA channel configured. */
> + uint16_t nb_vchans;
> +};
> +
Since we really don't want apps to have to access the rte_dma_devices
array, I think we should add "const char *name" to the info struct. Apps may
find it useful for debugging or logging, and certainly the unit tests will
use it.
/Bruce
More information about the dev
mailing list