env_dpdk: expose base virtaddr as an option
This might be helpful if secondary processes cannot start due to conflicts in address map. Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com> Change-Id: I180dc09b4cad3b0064f009b0f553f5929de6566c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2776 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
37051fa670
commit
b3767a239d
@ -84,6 +84,7 @@ struct spdk_env_opts {
|
|||||||
const char *hugedir;
|
const char *hugedir;
|
||||||
struct spdk_pci_addr *pci_blacklist;
|
struct spdk_pci_addr *pci_blacklist;
|
||||||
struct spdk_pci_addr *pci_whitelist;
|
struct spdk_pci_addr *pci_whitelist;
|
||||||
|
uint64_t base_virtaddr;
|
||||||
|
|
||||||
/** Opaque context for use of the env implementation. */
|
/** Opaque context for use of the env implementation. */
|
||||||
void *env_context;
|
void *env_context;
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
|
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
||||||
|
|
||||||
SO_VER := 3
|
SO_VER := 4
|
||||||
SO_MINOR := 0
|
SO_MINOR := 0
|
||||||
|
|
||||||
CFLAGS += $(ENV_CFLAGS)
|
CFLAGS += $(ENV_CFLAGS)
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
#define SPDK_ENV_DPDK_DEFAULT_MASTER_CORE -1
|
#define SPDK_ENV_DPDK_DEFAULT_MASTER_CORE -1
|
||||||
#define SPDK_ENV_DPDK_DEFAULT_MEM_CHANNEL -1
|
#define SPDK_ENV_DPDK_DEFAULT_MEM_CHANNEL -1
|
||||||
#define SPDK_ENV_DPDK_DEFAULT_CORE_MASK "0x1"
|
#define SPDK_ENV_DPDK_DEFAULT_CORE_MASK "0x1"
|
||||||
|
#define SPDK_ENV_DPDK_DEFAULT_BASE_VIRTADDR 0x200000000000
|
||||||
|
|
||||||
static char **g_eal_cmdline;
|
static char **g_eal_cmdline;
|
||||||
static int g_eal_cmdline_argcount;
|
static int g_eal_cmdline_argcount;
|
||||||
@ -136,6 +137,7 @@ spdk_env_opts_init(struct spdk_env_opts *opts)
|
|||||||
opts->mem_size = SPDK_ENV_DPDK_DEFAULT_MEM_SIZE;
|
opts->mem_size = SPDK_ENV_DPDK_DEFAULT_MEM_SIZE;
|
||||||
opts->master_core = SPDK_ENV_DPDK_DEFAULT_MASTER_CORE;
|
opts->master_core = SPDK_ENV_DPDK_DEFAULT_MASTER_CORE;
|
||||||
opts->mem_channel = SPDK_ENV_DPDK_DEFAULT_MEM_CHANNEL;
|
opts->mem_channel = SPDK_ENV_DPDK_DEFAULT_MEM_CHANNEL;
|
||||||
|
opts->base_virtaddr = SPDK_ENV_DPDK_DEFAULT_BASE_VIRTADDR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -449,7 +451,7 @@ build_eal_cmdline(const struct spdk_env_opts *opts)
|
|||||||
*
|
*
|
||||||
* Ref: https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm
|
* Ref: https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm
|
||||||
*/
|
*/
|
||||||
args = push_arg(args, &argcount, _sprintf_alloc("--base-virtaddr=0x200000000000"));
|
args = push_arg(args, &argcount, _sprintf_alloc("--base-virtaddr=0x%" PRIx64, opts->base_virtaddr));
|
||||||
if (args == NULL) {
|
if (args == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user