vlib: pre-alloc dma backend batches 75/38475/2
authorMarvin Liu <yong.liu@intel.com>
Tue, 14 Mar 2023 15:43:28 +0000 (23:43 +0800)
committerFlorin Coras <florin.coras@gmail.com>
Tue, 14 Mar 2023 16:40:41 +0000 (16:40 +0000)
commit738aba7b5150b1c78953a5cd59791fed2ab539ab
treeae6ae58d482d2753b19ee8f696e2fefd39c44f37
parent0d712c1a967b72b3e9134adad7b032989da999b8
vlib: pre-alloc dma backend batches

Allocate and initialize dma batch structure when adding dma config.
The number of required dma batches is set by max_batches parameter.
Thus dma batches are not allocated dynamically in worker thread.
Application need to check the return value of vlib_dma_batch_new.

Type: improvement

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Change-Id: I5d05a67b59634cf2862a377d5ab77cb1040343ce
src/plugins/dma_intel/dsa.c
src/vlib/dma/dma.h