env: Add SPDK wrapper for rte_mempool_get_bulk()
Needed for crypto vbdev work. Change-Id: Ib18ce3aaecf2388cf2cdc4dea110db514c8c1f1b Signed-off-by: Paul Luse <paul.e.luse@intel.com> Reviewed-on: https://review.gerrithub.io/408256 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
ddeaeeec19
commit
2536874e85
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## v18.04: (Upcoming Release)
|
## v18.04: (Upcoming Release)
|
||||||
|
|
||||||
|
## Env
|
||||||
|
|
||||||
|
Add wrapper for DPDK rte_mempool_get_bulk() via spdk_mempool_get_bulk().
|
||||||
|
|
||||||
### Bdev
|
### Bdev
|
||||||
|
|
||||||
Add new optional bdev module interface function, init_complete, to notify bdev modules
|
Add new optional bdev module interface function, init_complete, to notify bdev modules
|
||||||
|
@ -284,6 +284,17 @@ void spdk_mempool_free(struct spdk_mempool *mp);
|
|||||||
*/
|
*/
|
||||||
void *spdk_mempool_get(struct spdk_mempool *mp);
|
void *spdk_mempool_get(struct spdk_mempool *mp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get multiple elements from a memory pool.
|
||||||
|
*
|
||||||
|
* \param mp Memory pool to get multiple elements from.
|
||||||
|
* \param ele_arr Array of the elements to fill.
|
||||||
|
* \param count Count of elements to get.
|
||||||
|
*
|
||||||
|
* \return 0 on success, negative errno on failure.
|
||||||
|
*/
|
||||||
|
int spdk_mempool_get_bulk(struct spdk_mempool *mp, void **ele_arr, size_t count);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Put an element back into the memory pool.
|
* Put an element back into the memory pool.
|
||||||
*
|
*
|
||||||
|
@ -224,6 +224,12 @@ spdk_mempool_get(struct spdk_mempool *mp)
|
|||||||
return ele;
|
return ele;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
spdk_mempool_get_bulk(struct spdk_mempool *mp, void **ele_arr, size_t count)
|
||||||
|
{
|
||||||
|
return rte_mempool_get_bulk((struct rte_mempool *)mp, ele_arr, count);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
spdk_mempool_put(struct spdk_mempool *mp, void *ele)
|
spdk_mempool_put(struct spdk_mempool *mp, void *ele)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user