Remove spurious call to unix_physmem_init(...)
authorDave Barach <[email protected]>
Wed, 2 Mar 2016 14:48:04 +0000 (09:48 -0500)
committerDave Barach <[email protected]>
Wed, 2 Mar 2016 14:48:19 +0000 (09:48 -0500)
It turns out that unix_physmem_init(...) has been effectively disabled
for a very long time. The vnet library supplied a weak symbol override
for the vlib_app_physmem_init(...) which returned 1, meaning "do
nothing." When we switched libvnet.a -> libvnet.so, the symbol
override stopped working.

Presto: unix_physmem_init(...) romps all over the data set up by
vlib_buffer_pool_create(...), leading to ASSERT failures and/or bus
errors, but only when using worker threads. Even then, the failure
depended in some complicated way on library dynamic load order.

We should remove .../vlib/vlib/unix/physmem.c entirely once we're sure
we'll never want it back.

Change-Id: I27747edbeb0de88d2f2d8728f7f8eb3135e7f0cf
Signed-off-by: Dave Barach <[email protected]>
vlib/vlib/threads.c
vnet/vnet/devices/dpdk/init.c

index 1f3c141..15eb959 100644 (file)
@@ -674,8 +674,6 @@ static clib_error_t * start_workers (vlib_main_t * vm)
             clib_mem_set_heap (oldheap);
             vec_add1 (vlib_mains, vm_clone);
 
-            unix_physmem_init (vm_clone, 0 /* physmem not required */);
-
            vm_clone->error_main.counters =
              vec_dup(vlib_mains[0]->error_main.counters);
            vm_clone->error_main.counters_last_clear =
index 35285b8..e8fe554 100644 (file)
@@ -715,17 +715,6 @@ dpdk_lib_init (dpdk_main_t * dm)
   return 0;
 }
 
-/*
- * Tell the vlib physical memory allocator that we've handled
- * the initialization. We don't actually do so until
- * vlib_main(...) callls the dpdk config function.
- */
-int vlib_app_physmem_init (vlib_main_t * vm, physmem_main_t * pm,
-                           int physmem_required)
-{
-  return 1;
-}
-
 static clib_error_t *
 write_sys_fs (char * file_name, char * fmt, ...)
 {