env: added support for lcore map
This patch adds support for lcore mapping list, which is needed by spdk if someone wants to use CPUs with IDs greater than RTE_MAX_LCORE (128). For such CPUs it is impossible to include them in the core mask (passed to dpdk as '-c <mask>') as the dpdk doesn't allow IDs greater than RTE_MAX_LCORE. Therefore they must be mapped to lower lcore values using '--lcores <maping_list>' passed to dpdk Change-Id: If68f15cef2bca9e42a3457bf35477793b58ec53d Signed-off-by: Marcin Spiewak <marcin.spiewak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17399 Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
c12d468d02
commit
63ee5362e2
@ -47,6 +47,7 @@ extern "C" {
|
|||||||
struct spdk_env_opts {
|
struct spdk_env_opts {
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *core_mask;
|
const char *core_mask;
|
||||||
|
const char *lcore_map;
|
||||||
int shm_id;
|
int shm_id;
|
||||||
int mem_channel;
|
int mem_channel;
|
||||||
int main_core;
|
int main_core;
|
||||||
|
@ -66,7 +66,6 @@ struct spdk_app_opts {
|
|||||||
|
|
||||||
/* Hole at bytes 17-23. */
|
/* Hole at bytes 17-23. */
|
||||||
uint8_t reserved17[7];
|
uint8_t reserved17[7];
|
||||||
|
|
||||||
const char *rpc_addr; /* Can be UNIX domain socket path or IP address + TCP port */
|
const char *rpc_addr; /* Can be UNIX domain socket path or IP address + TCP port */
|
||||||
const char *reactor_mask;
|
const char *reactor_mask;
|
||||||
const char *tpoint_group_mask;
|
const char *tpoint_group_mask;
|
||||||
@ -163,8 +162,14 @@ struct spdk_app_opts {
|
|||||||
* The vf_token is an UUID that shared between SR-IOV PF and VF.
|
* The vf_token is an UUID that shared between SR-IOV PF and VF.
|
||||||
*/
|
*/
|
||||||
const char *vf_token;
|
const char *vf_token;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to store lcore to CPU mappig to pass it to DPDK
|
||||||
|
*/
|
||||||
|
const char *lcore_map; /* lcore mapping */
|
||||||
|
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
SPDK_STATIC_ASSERT(sizeof(struct spdk_app_opts) == 216, "Incorrect size");
|
SPDK_STATIC_ASSERT(sizeof(struct spdk_app_opts) == 224, "Incorrect size");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the default value of opts
|
* Initialize the default value of opts
|
||||||
|
@ -525,7 +525,7 @@ app_copy_opts(struct spdk_app_opts *opts, struct spdk_app_opts *opts_user, size_
|
|||||||
|
|
||||||
/* You should not remove this statement, but need to update the assert statement
|
/* You should not remove this statement, but need to update the assert statement
|
||||||
* if you add a new field, and also add a corresponding SET_FIELD statement */
|
* if you add a new field, and also add a corresponding SET_FIELD statement */
|
||||||
SPDK_STATIC_ASSERT(sizeof(struct spdk_app_opts) == 216, "Incorrect size");
|
SPDK_STATIC_ASSERT(sizeof(struct spdk_app_opts) == 224, "Incorrect size");
|
||||||
|
|
||||||
#undef SET_FIELD
|
#undef SET_FIELD
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user