aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/unix
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-07-10 15:06:17 +0200
committerDave Barach <openvpp@barachs.net>2017-07-10 19:35:57 +0000
commit04a7f05e91e919f51eaecaee476435484076655b (patch)
treeb7cbd12430c4a16b6289300b5b604835791bd780 /src/vlib/unix
parent28160f38488743b8cee0a7bd62b432a9dd8f4bfd (diff)
vlib: store buffer memory information in the buffer_main
Currently, buffer index is calculated as a offset to the physmem region shifted by log2_cacheline size. When DPDK is used we "hack" physmem data with information taken from dpdk mempool. This makes physmem code not usable with DPDK. This change makes buffer memory start and size independent of physmem basically allowing physmem to be used when DPDK plugin is loaded. Change-Id: Ieb399d398f147583b9baab467152a352d58c9c31 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/unix')
-rw-r--r--src/vlib/unix/physmem.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/vlib/unix/physmem.c b/src/vlib/unix/physmem.c
index 8d10ad2e88d..933cc63b7f4 100644
--- a/src/vlib/unix/physmem.c
+++ b/src/vlib/unix/physmem.c
@@ -45,14 +45,10 @@ static void *
unix_physmem_alloc_aligned (vlib_physmem_main_t * vpm, uword n_bytes,
uword alignment)
{
- vlib_main_t *vm = vlib_get_main ();
physmem_main_t *pm = &physmem_main;
uword lo_offset, hi_offset;
uword *to_free = 0;
- if (vm->buffer_main->extern_buffer_mgmt)
- clib_warning ("unsafe alloc!");
-
/* IO memory is always at least cache aligned. */
alignment = clib_max (alignment, CLIB_CACHE_LINE_BYTES);
@@ -270,11 +266,6 @@ show_physmem (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
{
physmem_main_t *pm = &physmem_main;
- if (vm->buffer_main->extern_buffer_mgmt)
- {
- vlib_cli_output (vm, "Not supported with external buffer management.");
- return 0;
- }
if (pm->heap)
vlib_cli_output (vm, "%U", format_mheap, pm->heap, /* verbose */ 1);