From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatoly Burakov Subject: [PATCH 0/4] Allow using external memory without malloc Date: Thu, 29 Nov 2018 13:48:31 +0000 Message-ID: Cc: shahafs@mellanox.com, yskoh@mellanox.com, thomas@monjalon.net, shreyansh.jain@nxp.com To: dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id EDEDF322C for ; Thu, 29 Nov 2018 14:48:39 +0100 (CET) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Currently, the only way to use externally allocated memory is through rte_malloc API's. While this is fine for a lot of use cases, it may not be suitable for certain other use cases like manual memory management, etc. This patchset adds another API to register memory segments with DPDK (so that API's like ``rte_mem_virt2memseg`` could be relied on by PMD's and such), but not create a malloc heap out of them. Aside from the obvious (not adding memory to a heap), the other major difference between this API and the ``rte_malloc_heap_*`` external memory functions is the fact that no DMA mapping is performed automatically. This really draws a line in the sand, and there are now two ways of doing things - do everything automatically (using the ``rte_malloc_heap_*`` API's), or do everything manually (``rte_extmem_*`` and future DMA mapping API [1] that would replace ``rte_vfio_dma_map``). This way, the consistency of API is kept, and flexibility is also allowed. [1] https://mails.dpdk.org/archives/dev/2018-November/118175.html Note: at the time of this writing, there's no release notes template, so no release notes updates in this patchset. They will be added in later revisions. Anatoly Burakov (4): malloc: separate creating memseg list and malloc heap malloc: separate destroying memseg list and heap data mem: allow registering external memory areas mem: allow usage of non-heap external memory in multiprocess .../prog_guide/env_abstraction_layer.rst | 63 +++++++-- lib/librte_eal/common/eal_common_memory.c | 116 +++++++++++++++++ lib/librte_eal/common/include/rte_memory.h | 122 ++++++++++++++++++ lib/librte_eal/common/malloc_heap.c | 104 +++++++++++---- lib/librte_eal/common/malloc_heap.h | 15 ++- lib/librte_eal/common/rte_malloc.c | 115 +++++++---------- lib/librte_eal/rte_eal_version.map | 4 + 7 files changed, 434 insertions(+), 105 deletions(-) -- 2.17.1