[dpdk-dev] [PATCH v19 4/7] dmadev: introduce DMA device library implementation

Kevin Laatz kevin.laatz at intel.com
Fri Sep 3 17:13:41 CEST 2021


On 02/09/2021 14:13, Chengwen Feng wrote:
> This patch introduce DMA device library implementation which includes
> configuration and I/O with the DMA devices.
>
> 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>
> ---
>   config/rte_config.h          |   3 +
>   lib/dmadev/meson.build       |   1 +
>   lib/dmadev/rte_dmadev.c      | 614 +++++++++++++++++++++++++++++++++++++++++++
>   lib/dmadev/rte_dmadev.h      | 118 ++++++++-
>   lib/dmadev/rte_dmadev_core.h |   2 +
>   lib/dmadev/version.map       |   1 +
>   6 files changed, 727 insertions(+), 12 deletions(-)
>   create mode 100644 lib/dmadev/rte_dmadev.c
>
> diff --git a/config/rte_config.h b/config/rte_config.h
> index 590903c..331a431 100644
> --- a/config/rte_config.h
> +++ b/config/rte_config.h
> @@ -81,6 +81,9 @@
>   /* rawdev defines */
>   #define RTE_RAWDEV_MAX_DEVS 64
>   
> +/* dmadev defines */
> +#define RTE_DMADEV_MAX_DEVS 64
> +
>   /* ip_fragmentation defines */
>   #define RTE_LIBRTE_IP_FRAG_MAX_FRAG 4
>   #undef RTE_LIBRTE_IP_FRAG_TBL_STAT
> diff --git a/lib/dmadev/meson.build b/lib/dmadev/meson.build
> index 833baf7..d2fc85e 100644
> --- a/lib/dmadev/meson.build
> +++ b/lib/dmadev/meson.build
> @@ -1,6 +1,7 @@
>   # SPDX-License-Identifier: BSD-3-Clause
>   # Copyright(c) 2021 HiSilicon Limited.
>   
> +sources = files('rte_dmadev.c')
>   headers = files('rte_dmadev.h')
>   indirect_headers += files('rte_dmadev_core.h')
>   driver_sdk_headers += files('rte_dmadev_pmd.h')
> diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c
> new file mode 100644
> index 0000000..877eead
> --- /dev/null
> +++ b/lib/dmadev/rte_dmadev.c
> @@ -0,0 +1,614 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2021 HiSilicon Limited.
> + * Copyright(c) 2021 Intel Corporation.
> + */
> +
> +#include <ctype.h>
> +#include <inttypes.h>
> +#include <stdint.h>
> +#include <stdio.h>
> +#include <stdlib.h>
> +#include <string.h>
> +
> +#include <rte_debug.h>
> +#include <rte_dev.h>
> +#include <rte_eal.h>
> +#include <rte_errno.h>
> +#include <rte_lcore.h>
> +#include <rte_log.h>
> +#include <rte_memory.h>
> +#include <rte_memzone.h>
> +#include <rte_malloc.h>
> +#include <rte_string_fns.h>
> +
> +#include "rte_dmadev.h"
> +#include "rte_dmadev_pmd.h"
> +

Many of these includes can be removed from this file, as they are 
already included elsewhere (eg. rte_common.h via rte_dmadev.h).

For example, you could remove: ctype.h, stdint.h, stdlib.h, rte_errno.h, 
rte_lcore.h, rte_memory.h, rte_malloc.h, rte_dev...

Please run test-meson-builds.sh after removing to make sure there are no 
missing dependencies.

<snip>


With the above comment addressed,

Reviewed-by: Kevin Laatz <kevin.laatz at intel.com>



More information about the dev mailing list