Skip to content

Commit

Permalink
dpdk: Stop dumping memzones to stdout.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Aaron Conole <[email protected]>
Signed-off-by: Ian Stokes <[email protected]>
  • Loading branch information
igsilya authored and istokes committed Mar 19, 2019
1 parent 21bc550 commit 450ff2b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion lib/dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 450ff2b

Please sign in to comment.