aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/linux/physmem.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-03-09 16:05:56 +0100
committerFlorin Coras <florin.coras@gmail.com>2018-03-09 19:20:32 +0000
commit51c52c0adc9bf79ca6508ee1327d3b972e80b5c6 (patch)
tree70936cd041b0faf511592c46c5c69948e7a95f91 /src/vlib/linux/physmem.c
parentfef3f7bd0ae43586540533e7ee1a7cc910ccb16d (diff)
dpdk: move DPDK vfio hack to dpdk plugin
Change-Id: I806cbf8c6c49643fe6c317bcceab93c1b9d441ab Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/linux/physmem.c')
-rw-r--r--src/vlib/linux/physmem.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/vlib/linux/physmem.c b/src/vlib/linux/physmem.c
index cf2961b4cf9..1a449921857 100644
--- a/src/vlib/linux/physmem.c
+++ b/src/vlib/linux/physmem.c
@@ -174,16 +174,8 @@ unix_physmem_region_alloc (vlib_main_t * vm, char *name, u32 size,
}
}
-#if 0
- if ((vpm->flags & VLIB_PHYSMEM_MAIN_F_HAVE_IOMMU) ||
- (vpm->flags & VLIB_PHYSMEM_MAIN_F_HAVE_PAGEMAP) == 0)
- for (i = 0; i < pr->n_pages; i++)
- vec_add1 (pr->page_table, pointer_to_uword (pr->mem) +
- i * (1 << pr->log2_page_size));
- else
-#endif
- pr->page_table = clib_mem_vm_get_paddr (pr->mem, pr->log2_page_size,
- pr->n_pages);
+ pr->page_table = clib_mem_vm_get_paddr (pr->mem, pr->log2_page_size,
+ pr->n_pages);
linux_vfio_dma_map_regions (vm);
@@ -224,7 +216,6 @@ clib_error_t *
unix_physmem_init (vlib_main_t * vm)
{
vlib_physmem_main_t *vpm = &physmem_main;
- linux_vfio_main_t *lvm = &vfio_main;
clib_error_t *error = 0;
u64 *pt = 0;
@@ -241,9 +232,6 @@ unix_physmem_init (vlib_main_t * vm)
if ((error = linux_vfio_init (vm)))
return error;
- if (lvm->flags & LINUX_VFIO_F_HAVE_IOMMU)
- vpm->flags |= VLIB_PHYSMEM_MAIN_F_HAVE_IOMMU;
-
vm->os_physmem_alloc_aligned = unix_physmem_alloc_aligned;
vm->os_physmem_free = unix_physmem_free;
vm->os_physmem_region_alloc = unix_physmem_region_alloc;