From e560d53c1299a9fc81dd6a2a5f309d945922e9ba Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Fri, 28 Jul 2017 18:20:20 +0200 Subject: [PATCH] env: silence rte_vhost logs about each received message rte_vhost currently logs every received vhost message as a separate log entry. Every VM (re)boot results in over 100 lines of output printed for every queue in every vhost controller. In our vhost initiator test suite we've got over 5k lines of those in total. These logs do not help in any debugging, so we disable them now. We'll still print vhost messages of log level >= NOTICE. Change-Id: Ief3f4230056478472412b13efc4da438b92b1d18 Signed-off-by: Darek Stojaczyk Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/371691 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/env_dpdk/init.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/env_dpdk/init.c b/lib/env_dpdk/init.c index ed349d258..400da1957 100644 --- a/lib/env_dpdk/init.c +++ b/lib/env_dpdk/init.c @@ -306,6 +306,16 @@ spdk_build_eal_cmdline(const struct spdk_env_opts *opts) return -1; } + /* `user1` log type is used by rte_vhost, which prints an INFO log for each received + * vhost user message. We don't want that. The same log type is also used by a couple + * of other DPDK libs, but none of which we make use right now. If necessary, this can + * be overridden via opts->env_context. + */ + args = spdk_push_arg(args, &argcount, strdup("--log-level=user1:6")); + if (args == NULL) { + return -1; + } + if (opts->env_context) { args = spdk_push_arg(args, &argcount, strdup(opts->env_context)); if (args == NULL) {