From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v3 0/4] Allow using external memory without malloc Date: Thu, 20 Dec 2018 08:16:46 -0800 Message-ID: <20181220081646.55593779@xeon-e3> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, shahafs@mellanox.com, yskoh@mellanox.com, thomas@monjalon.net, shreyansh.jain@nxp.com To: Anatoly Burakov Return-path: Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 6392B1BCC2 for ; Thu, 20 Dec 2018 17:16:50 +0100 (CET) Received: by mail-pg1-f194.google.com with SMTP id v28so1097827pgk.10 for ; Thu, 20 Dec 2018 08:16:50 -0800 (PST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 20 Dec 2018 15:32:37 +0000 Anatoly Burakov wrote: > 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, as well as > no mem event callbacks are triggered. > > 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 Where are the examples for this? Give a sample application maybe. Also there are no test cases.