thread: add spdk_env_get_primary_core
Change-Id: I5b337477e41da7d424cccc48366ca6018b776ee2 Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2448 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
34ea308e12
commit
6194cb2e15
@ -467,6 +467,13 @@ uint32_t spdk_env_get_core_count(void);
|
|||||||
*/
|
*/
|
||||||
uint32_t spdk_env_get_current_core(void);
|
uint32_t spdk_env_get_current_core(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the index of the primary dedicated CPU core for this application.
|
||||||
|
*
|
||||||
|
* \return the index of the primary dedicated CPU core.
|
||||||
|
*/
|
||||||
|
uint32_t spdk_env_get_primary_core(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the index of the first dedicated CPU core for this application.
|
* Get the index of the first dedicated CPU core for this application.
|
||||||
*
|
*
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
spdk_mempool_lookup;
|
spdk_mempool_lookup;
|
||||||
spdk_env_get_core_count;
|
spdk_env_get_core_count;
|
||||||
spdk_env_get_current_core;
|
spdk_env_get_current_core;
|
||||||
|
spdk_env_get_primary_core;
|
||||||
spdk_env_get_first_core;
|
spdk_env_get_first_core;
|
||||||
spdk_env_get_last_core;
|
spdk_env_get_last_core;
|
||||||
spdk_env_get_next_core;
|
spdk_env_get_next_core;
|
||||||
|
@ -48,6 +48,12 @@ spdk_env_get_current_core(void)
|
|||||||
return rte_lcore_id();
|
return rte_lcore_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
spdk_env_get_primary_core(void)
|
||||||
|
{
|
||||||
|
return rte_get_master_lcore();
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
spdk_env_get_first_core(void)
|
spdk_env_get_first_core(void)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user