summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAnatoly Burakov <anatoly.burakov@intel.com>2019-05-03 12:50:49 +0100
committerThomas Monjalon <thomas@monjalon.net>2019-05-09 17:49:32 +0200
commit3855b4150037142435b5c1f4195e44c142785f1f (patch)
tree40235ecfb6274197b0aa50269540fa1985914851 /doc
parentab96056d13c02b375c9557f09a5d3dc28731d488 (diff)
downloaddpdk-draft-windows-3855b4150037142435b5c1f4195e44c142785f1f.zip
dpdk-draft-windows-3855b4150037142435b5c1f4195e44c142785f1f.tar.gz
dpdk-draft-windows-3855b4150037142435b5c1f4195e44c142785f1f.tar.xz
ipc: add warnings about not using IPC with memory API
IPC and memory-related API's should not be mixed because memory relies on IPC internally. Add explicit warnings to IPC API and to the documentation about this. Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/guides/prog_guide/env_abstraction_layer.rst8
-rw-r--r--doc/guides/prog_guide/multi_proc_support.rst5
2 files changed, 13 insertions, 0 deletions
diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst
index c27f730..f15bcd9 100644
--- a/doc/guides/prog_guide/env_abstraction_layer.rst
+++ b/doc/guides/prog_guide/env_abstraction_layer.rst
@@ -147,6 +147,14 @@ A default validator callback is provided by EAL, which can be enabled with a
``--socket-limit`` command-line option, for a simple way to limit maximum amount
of memory that can be used by DPDK application.
+.. warning::
+ Memory subsystem uses DPDK IPC internally, so memory allocations/callbacks
+ and IPC must not be mixed: it is not safe to allocate/free memory inside
+ memory-related or IPC callbacks, and it is not safe to use IPC inside
+ memory-related callbacks. See chapter
+ :ref:`Multi-process Support <Multi-process_Support>` for more details about
+ DPDK IPC.
+
+ Legacy memory mode
This mode is enabled by specifying ``--legacy-mem`` command-line switch to the
diff --git a/doc/guides/prog_guide/multi_proc_support.rst b/doc/guides/prog_guide/multi_proc_support.rst
index 9660979..63d08b6 100644
--- a/doc/guides/prog_guide/multi_proc_support.rst
+++ b/doc/guides/prog_guide/multi_proc_support.rst
@@ -318,6 +318,11 @@ supported. However, since sending messages (not requests) does not involve an
IPC thread, sending messages while processing another message or request is
supported.
+Since the memory sybsystem uses IPC internally, memory allocations and IPC must
+not be mixed: it is not safe to use IPC inside a memory-related callback, nor is
+it safe to allocate/free memory inside IPC callbacks. Attempting to do so may
+lead to a deadlock.
+
Asynchronous request callbacks may be triggered either from IPC thread or from
interrupt thread, depending on whether the request has timed out. It is
therefore suggested to avoid waiting for interrupt-based events (such as alarms)