From 8c22b0ab1c3ab4f391e5480540889641b63745f1 Mon Sep 17 00:00:00 2001 From: Alexey Marchuk Date: Tue, 13 Jul 2021 16:43:48 +0300 Subject: [PATCH] event: Add parsing of env_context option For some reason we didn't parse this cli parameter Signed-off-by: Alexey Marchuk Change-Id: Ic046cac637c5b7c4f52030b0b025c3192ca3fe0b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8779 Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu Reviewed-by: Shuhei Matsumoto Reviewed-by: --- lib/event/app.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/event/app.c b/lib/event/app.c index 35b246a06..5bfed5a84 100644 --- a/lib/event/app.c +++ b/lib/event/app.c @@ -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 the base virtual address for DPDK (default: 0x200000000000)\n"); printf(" --num-trace-entries 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;