env: Add spdk_mempool_get_name
Purpose: To get the name of a mempool Change-Id: Ic23f93a03db9bcef54808dfd350b1403a47c21d7 Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/390937 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
edd03d6ce1
commit
2a4d18e391
@ -154,6 +154,11 @@ struct spdk_mempool;
|
||||
struct spdk_mempool *spdk_mempool_create(const char *name, size_t count,
|
||||
size_t ele_size, size_t cache_size, int socket_id);
|
||||
|
||||
/**
|
||||
* Get the name of a mempool
|
||||
*/
|
||||
char *spdk_mempool_get_name(struct spdk_mempool *mp);
|
||||
|
||||
/**
|
||||
* Free a memory pool.
|
||||
*/
|
||||
|
@ -177,6 +177,12 @@ spdk_mempool_create(const char *name, size_t count,
|
||||
return (struct spdk_mempool *)mp;
|
||||
}
|
||||
|
||||
char *
|
||||
spdk_mempool_get_name(struct spdk_mempool *mp)
|
||||
{
|
||||
return ((struct rte_mempool *)mp)->name;
|
||||
}
|
||||
|
||||
void
|
||||
spdk_mempool_free(struct spdk_mempool *mp)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user