diff options
author | Sean Hope <shope@cisco.com> | 2016-02-22 15:21:31 -0500 |
---|---|---|
committer | Todd Foggoa <tfoggoa@cisco.com> | 2016-03-01 10:16:42 -0500 |
commit | 98efd021195a39d10451fb72f800d6a98e282b1a (patch) | |
tree | 6bfa62d08056f8f1e7fed89021672d28f4a0dbd7 /vnet | |
parent | 2073cfe1e61e3732f944e099bdce905d1237b673 (diff) |
Dump DPDK physmem to stdout before allocating mbufs
Change-Id: I9dac27dc8b6b95cfb0ee77e3cff18240b4ec21d6
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/devices/dpdk/init.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c index 64c44dd3..35285b89 100644 --- a/vnet/vnet/devices/dpdk/init.c +++ b/vnet/vnet/devices/dpdk/init.c @@ -974,6 +974,7 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input) u8 no_pci = 0; u8 no_huge = 0; u8 huge_dir = 0; + u8 dump_physmem = 0; u8 file_prefix = 0; u8 * socket_mem = 0; @@ -1040,6 +1041,8 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input) } #endif + else if (unformat (input, "dump-physmem")) + dump_physmem = 1; else if (unformat (input, "num-mbufs %d", &dm->num_mbufs)) ; else if (unformat (input, "max-tx-queues %d", &dm->max_tx_queues)) @@ -1422,6 +1425,16 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input) dm->eal_init_args_str = format(dm->eal_init_args_str, "%s ", dm->eal_init_args[i]); + if (CLIB_DEBUG > 0) + { + int ix; + + clib_warning ("DPDK eal init args:\n"); + for (ix=0; ix<vec_len(dm->eal_init_args); ix++) { + clib_warning (" %s\n", dm->eal_init_args[ix]); + } + } + ret = rte_eal_init(vec_len(dm->eal_init_args), (char **) dm->eal_init_args); /* lazy umount hugepages */ @@ -1430,6 +1443,12 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input) if (ret < 0) return clib_error_return (0, "rte_eal_init returned %d", ret); + /* Dump the physical memory layout prior to creating the mbuf_pool */ + if (dump_physmem) { + fprintf(stdout, "DPDK physical memory layout:\n"); + rte_dump_physmem_layout(stdout); + } + /* main thread 1st */ error = vlib_buffer_pool_create(vm, dm->num_mbufs, MBUF_SIZE, rte_socket_id()); if (error) |