Commit 8c22b0ab authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Tomasz Zawadzki
Browse files

event: Add parsing of env_context option



For some reason we didn't parse this cli parameter

Signed-off-by: default avatarAlexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ic046cac637c5b7c4f52030b0b025c3192ca3fe0b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8779


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatar <dongx.yi@intel.com>
parent 4ec7d1ef
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
 *
 *   Copyright (c) Intel Corporation. All rights reserved.
 *   Copyright (c) 2019 Mellanox Technologies LTD. All rights reserved.
 *   Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 *
 *   Redistribution and use in source and binary forms, with or without
 *   modification, are permitted provided that the following conditions
@@ -140,6 +141,8 @@ static const struct option g_cmdline_options[] = {
	{"iova-mode",			required_argument,	NULL, IOVA_MODE_OPT_IDX},
#define BASE_VIRTADDR_OPT_IDX	265
	{"base-virtaddr",		required_argument,	NULL, BASE_VIRTADDR_OPT_IDX},
#define ENV_CONTEXT_OPT_IDX	266
	{"env-context",			required_argument,	NULL, ENV_CONTEXT_OPT_IDX},
};

static void
@@ -685,6 +688,7 @@ usage(void (*app_usage)(void))
	printf("     --base-virtaddr <addr>      the base virtual address for DPDK (default: 0x200000000000)\n");
	printf("     --num-trace-entries <num>   number of trace entries for each core, must be power of 2, setting 0 to disable trace (default %d)\n",
	       SPDK_APP_DEFAULT_NUM_TRACE_ENTRIES);
	printf("     --env-context         Opaque context for use of the env implementation\n");
	spdk_log_usage(stdout, "-L");
	spdk_trace_mask_usage(stdout, "-e");
	if (app_usage) {
@@ -916,6 +920,9 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts,
		case MAX_REACTOR_DELAY_OPT_IDX:
			SPDK_ERRLOG("Deprecation warning: The maximum allowed latency parameter is no longer supported.\n");
			break;
		case ENV_CONTEXT_OPT_IDX:
			opts->env_context = optarg;
			break;
		case VERSION_OPT_IDX:
			printf(SPDK_VERSION_STRING"\n");
			retval = SPDK_APP_PARSE_ARGS_HELP;