2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

dpdk: Stop dumping memzones to stdout.

Information about memzones reserved on init is not much useful.
Anyway, we need to log it in more civilized manner, i.e. through
the OVS logging subsystem.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
Ilya Maximets
2019-03-14 17:43:48 +03:00
committed by Ian Stokes
parent 21bc550ec1
commit 450ff2bcd7

View File

@@ -403,7 +403,23 @@ dpdk_init__(const struct smap *ovs_other_config)
return false;
}
rte_memzone_dump(stdout);
if (VLOG_IS_DBG_ENABLED()) {
size_t size;
char *response = NULL;
FILE *stream = open_memstream(&response, &size);
if (stream) {
rte_memzone_dump(stream);
fclose(stream);
if (size) {
VLOG_DBG("rte_memzone_dump:\n%s", response);
}
free(response);
} else {
VLOG_DBG("Could not dump memzone. Unable to open memstream: %s.",
ovs_strerror(errno));
}
}
/* We are called from the main thread here */
RTE_PER_LCORE(_lcore_id) = NON_PMD_CORE_ID;