X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fprog_guide%2Fmempool_lib.rst;h=55838317b9daa8222cef65c8ef583bd18efb837c;hb=34fd4373ce76efd0236e59397c495762c2ec9e64;hp=e3e1f940bebfd2baa40bee330c4fbde310096b5c;hpb=5c307ba2a5b14abb70dcc80a1283ba5a128262d9;p=dpdk.git diff --git a/doc/guides/prog_guide/mempool_lib.rst b/doc/guides/prog_guide/mempool_lib.rst index e3e1f940be..55838317b9 100644 --- a/doc/guides/prog_guide/mempool_lib.rst +++ b/doc/guides/prog_guide/mempool_lib.rst @@ -17,14 +17,13 @@ This library is used by the :ref:`Mbuf Library `. Cookies ------- -In debug mode (CONFIG_RTE_LIBRTE_MEMPOOL_DEBUG is enabled), cookies are added at the beginning and end of allocated blocks. +In debug mode, cookies are added at the beginning and end of allocated blocks. The allocated objects then contain overwrite protection fields to help debugging buffer overflows. Stats ----- -In debug mode (CONFIG_RTE_LIBRTE_MEMPOOL_DEBUG is enabled), -statistics about get from/put in the pool are stored in the mempool structure. +In debug mode, statistics about get from/put in the pool are stored in the mempool structure. Statistics are per-lcore to avoid concurrent access to statistics counters. Memory Alignment Constraints on x86 architecture @@ -90,7 +89,7 @@ the speed at which a core can access its own cache for a specific memory pool wi The cache is composed of a small, per-core table of pointers and its length (used as a stack). This internal cache can be enabled or disabled at creation of the pool. -The maximum size of the cache is static and is defined at compilation time (CONFIG_RTE_MEMPOOL_CACHE_MAX_SIZE). +The maximum size of the cache is static and is defined at compilation time (RTE_MEMPOOL_CACHE_MAX_SIZE). :numref:`figure_mempool` shows a cache in operation. @@ -105,6 +104,8 @@ These user-owned caches can be explicitly passed to ``rte_mempool_generic_put()` The ``rte_mempool_default_cache()`` call returns the default internal cache if any. In contrast to the default caches, user-owned caches can be used by unregistered non-EAL threads too. +.. _Mempool_Handlers: + Mempool Handlers ------------------------ @@ -114,7 +115,7 @@ management systems and software based memory allocators, to be used with DPDK. There are two aspects to a mempool handler. * Adding the code for your new mempool operations (ops). This is achieved by - adding a new mempool ops code, and using the ``MEMPOOL_REGISTER_OPS`` macro. + adding a new mempool ops code, and using the ``RTE_MEMPOOL_REGISTER_OPS`` macro. * Using the new API to call ``rte_mempool_create_empty()`` and ``rte_mempool_set_ops_byname()`` to create a new mempool and specifying which