diff options
author | Damjan Marion <damarion@cisco.com> | 2018-03-05 20:08:28 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-03-05 20:02:41 +0000 |
commit | 88c062119b5e94ef19e02f007e38ee119b02218f (patch) | |
tree | 319e63d64e6217db698674e92ed5a18c1728a44e /src/vlib/linux | |
parent | 3cf2d6403dd90083fe2c678c03565f6f483de9e3 (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')
-rw-r--r-- | src/vlib/linux/physmem.c | 8 | ||||
-rw-r--r-- | src/vlib/linux/vfio.c | 2 |
2 files changed, 5 insertions, 5 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* */ diff --git a/src/vlib/linux/vfio.c b/src/vlib/linux/vfio.c index dffe49ce7b2..e39bf01fdc0 100644 --- a/src/vlib/linux/vfio.c +++ b/src/vlib/linux/vfio.c @@ -57,7 +57,7 @@ linux_vfio_main_t vfio_main; static int map_regions (vlib_main_t * vm, int fd) { - vlib_physmem_main_t *vpm = &vm->physmem_main; + vlib_physmem_main_t *vpm = &physmem_main; vlib_physmem_region_t *pr; struct vfio_iommu_type1_dma_map dm = { 0 }; int i; |