Go to file
Anatoly Burakov 6258f1c942 eal: map shared config into exact same address as primary process
Shared config is shared across primary and secondary processes.
However,when using rte_malloc, the malloc elements keep references to
the heap inside themselves. This heap reference might not be referencing
a local heap because the heap reference points to the heap of whatever
process has allocated that malloc element. Therefore, there can be
situations when malloc elements in a given heap actually reference
different addresses for the same heap - depending on which process has
allocated the element. This can lead to segmentation faults when dealing
with malloc elements allocated on the same heap by different processes.

To fix this problem, heaps will now have the same addresses across
processes. In order to achieve that, a new field in a shared mem_config
(a structure that holds the heaps, and which is shared across processes)
was added to keep the address of where this config is mapped in the
primary process.

Secondary process will now map the config in two stages - first, it'll
map it into an arbitrary address and read the address the primary
process has allocated for the shared config. Then, the config is
unmapped and re-mapped using the address previously read.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2014-07-22 17:47:51 +02:00
app ring: simplify unit tests 2014-07-22 16:44:37 +02:00
config vmxnet3: enable for FreeBSD 2014-07-22 16:38:01 +02:00
doc doc: remove extraneous comma 2014-07-16 09:45:47 +02:00
examples virtio: fix incorrect parens 2014-07-22 15:00:00 +02:00
lib eal: map shared config into exact same address as primary process 2014-07-22 17:47:51 +02:00
mk mk: add clang toolchain 2014-07-19 01:54:26 +02:00
pkg version: 1.7.0 2014-07-04 10:18:07 +02:00
scripts scripts: fix filtering of config comments on bsd 2014-06-19 00:57:50 +02:00
tools tools: allow nic status query without igb_uio 2014-06-27 03:08:18 +02:00
.gitignore init DPDK repository 2013-03-07 10:57:42 +01:00
GNUmakefile remove trailing whitespaces 2014-06-11 00:29:34 +02:00
LICENSE.GPL doc: GPL/LGPL licenses 2013-07-25 14:43:06 +02:00
LICENSE.LGPL doc: fix file format (dos to unix) 2013-09-06 11:43:07 +02:00
Makefile remove trailing whitespaces 2014-06-11 00:29:34 +02:00