aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/linux/physmem.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-03-05 20:08:28 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-05 20:02:41 +0000
commit88c062119b5e94ef19e02f007e38ee119b02218f (patch)
tree319e63d64e6217db698674e92ed5a18c1728a44e /src/vlib/linux/physmem.c
parent3cf2d6403dd90083fe2c678c03565f6f483de9e3 (diff)
physmem: keep only one physmem_main
We don't need per vlib_main physmem_main, so keep it separatelly instead of trying to keep them in sync. Change-Id: I0fbeecf4d9672d31af7a43c640a7d8f05dd6e46f Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/linux/physmem.c')
-rw-r--r--src/vlib/linux/physmem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vlib/linux/physmem.c b/src/vlib/linux/physmem.c
index f60a6f75adf..b3703388b84 100644
--- a/src/vlib/linux/physmem.c
+++ b/src/vlib/linux/physmem.c
@@ -114,7 +114,7 @@ unix_physmem_region_alloc (vlib_main_t * vm, char *name, u32 size,
u8 numa_node, u32 flags,
vlib_physmem_region_index_t * idx)
{
- vlib_physmem_main_t *vpm = &vm->physmem_main;
+ vlib_physmem_main_t *vpm = &physmem_main;
vlib_physmem_region_t *pr;
clib_error_t *error = 0;
clib_mem_vm_alloc_t alloc = { 0 };
@@ -208,7 +208,7 @@ done:
static void
unix_physmem_region_free (vlib_main_t * vm, vlib_physmem_region_index_t idx)
{
- vlib_physmem_main_t *vpm = &vm->physmem_main;
+ vlib_physmem_main_t *vpm = &physmem_main;
vlib_physmem_region_t *pr = vlib_physmem_get_region (vm, idx);
if (pr->fd > 0)
@@ -221,7 +221,7 @@ unix_physmem_region_free (vlib_main_t * vm, vlib_physmem_region_index_t idx)
clib_error_t *
unix_physmem_init (vlib_main_t * vm)
{
- vlib_physmem_main_t *vpm = &vm->physmem_main;
+ vlib_physmem_main_t *vpm = &physmem_main;
linux_vfio_main_t *lvm = &vfio_main;
clib_error_t *error = 0;
u64 *pt = 0;
@@ -254,7 +254,7 @@ static clib_error_t *
show_physmem (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
{
- vlib_physmem_main_t *vpm = &vm->physmem_main;
+ vlib_physmem_main_t *vpm = &physmem_main;
vlib_physmem_region_t *pr;
/* *INDENT-OFF* */