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

Conor Walsh conor.walsh at intel.com
Fri Sep 3 17:35:57 CEST 2021


> 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>
> ---
<snip>
> +
> +static int
> +dmadev_shared_data_prepare(void)
> +{
> +	const struct rte_memzone *mz;
> +
> +	if (dmadev_shared_data == NULL) {
> +		if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
> +			/* Allocate port data and ownership shared memory. */
> +			mz = rte_memzone_reserve(mz_rte_dmadev_data,
> +					 sizeof(*dmadev_shared_data),
> +					 rte_socket_id(), 0);
> +		} else
> +			mz = rte_memzone_lookup(mz_rte_dmadev_data);
> +		if (mz == NULL)
> +			return -ENOMEM;

This memzone is not free'd anywhere in the library, I would suggest 
freeing as part of the release pmd function.

<snip>

Reviewed-by: Conor Walsh <conor.walsh at intel.com>



More information about the dev mailing list