summaryrefslogtreecommitdiffstats
path: root/src/vlib/dma/dma.h
diff options
context:
space:
mode:
authorMarvin Liu <yong.liu@intel.com>2023-03-14 23:43:28 +0800
committerFlorin Coras <florin.coras@gmail.com>2023-03-14 16:40:41 +0000
commit738aba7b5150b1c78953a5cd59791fed2ab539ab (patch)
treeae6ae58d482d2753b19ee8f696e2fefd39c44f37 /src/vlib/dma/dma.h
parent0d712c1a967b72b3e9134adad7b032989da999b8 (diff)
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
Diffstat (limited to 'src/vlib/dma/dma.h')
-rw-r--r--src/vlib/dma/dma.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vlib/dma/dma.h b/src/vlib/dma/dma.h
index eaeba8b13b7..62d04110aa6 100644
--- a/src/vlib/dma/dma.h
+++ b/src/vlib/dma/dma.h
@@ -38,6 +38,7 @@ typedef struct
};
u32 features;
};
+ u16 max_batches;
u16 max_transfers;
u32 max_transfer_size;
vlib_dma_batch_callback_fn *callback_fn;