From 173892cbf8bc32f49ce7f5ea2cabc4a760f4b1e3 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Fri, 6 Sep 2019 11:23:53 -0700 Subject: [PATCH] env_dpdk: fix compatibility with DPDK 17.11 Support for these options was not introduced until DPDK commit 7f0bb634a1406b132ff15c9cd56a0a9f33e5f11d Signed-off-by: Benjamin Saunders Change-Id: Id6db73dd48ac01aa1b05eca4c920c5753e8cc6f0 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467703 Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto Tested-by: SPDK CI Jenkins --- lib/env_dpdk/init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/env_dpdk/init.c b/lib/env_dpdk/init.c index e087e1479..b193182c3 100644 --- a/lib/env_dpdk/init.c +++ b/lib/env_dpdk/init.c @@ -298,6 +298,8 @@ spdk_build_eal_cmdline(const struct spdk_env_opts *opts) } } + /* The following log-level options are not understood by older DPDKs */ +#if RTE_VERSION >= RTE_VERSION_NUM(18, 05, 0, 0) /* Lower default EAL loglevel to RTE_LOG_NOTICE - normal, but significant messages. * This can be overridden by specifying the same option in opts->env_context */ @@ -323,6 +325,7 @@ spdk_build_eal_cmdline(const struct spdk_env_opts *opts) if (args == NULL) { return -1; } +#endif if (opts->env_context) { args = spdk_push_arg(args, &argcount, strdup(opts->env_context));