From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 94DF4A0524; Mon, 24 Feb 2020 18:58:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6DB5F1BFAB; Mon, 24 Feb 2020 18:58:18 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 288D91BE85 for ; Mon, 24 Feb 2020 18:58:17 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from viacheslavo@mellanox.com) with ESMTPS (AES256-SHA encrypted); 24 Feb 2020 19:58:16 +0200 Received: from pegasus11.mtr.labs.mlnx (pegasus11.mtr.labs.mlnx [10.210.16.104]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 01OHwGno001054 for ; Mon, 24 Feb 2020 19:58:16 +0200 Received: from pegasus11.mtr.labs.mlnx (localhost [127.0.0.1]) by pegasus11.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id 01OHwGJ4032734 for ; Mon, 24 Feb 2020 17:58:16 GMT Received: (from viacheslavo@localhost) by pegasus11.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id 01OHwG7e032730 for dev@dpdk.org; Mon, 24 Feb 2020 17:58:16 GMT X-Authentication-Warning: pegasus11.mtr.labs.mlnx: viacheslavo set sender to viacheslavo@mellanox.com using -f From: Viacheslav Ovsiienko To: dev@dpdk.org Date: Mon, 24 Feb 2020 17:58:15 +0000 Message-Id: <1582567095-32692-1-git-send-email-viacheslavo@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] doc: describe the pktmbuf pool with pinned extarnal memory X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Document the new mbuf pools with external pinned buffers. Signed-off-by: Viacheslav Ovsiienko --- doc/guides/prog_guide/mbuf_lib.rst | 34 ++++++++++++++++++++++++++++++++++ doc/guides/rel_notes/release_20_02.rst | 5 +++++ 2 files changed, 39 insertions(+) diff --git a/doc/guides/prog_guide/mbuf_lib.rst b/doc/guides/prog_guide/mbuf_lib.rst index 0d3223b..d7be5dd 100644 --- a/doc/guides/prog_guide/mbuf_lib.rst +++ b/doc/guides/prog_guide/mbuf_lib.rst @@ -240,6 +240,40 @@ the memory pool for indirect buffers should be configured to indicate the reduce Examples of the initialization of a memory pool for indirect buffers (as well as use case examples for indirect buffers) can be found in several of the sample applications, for example, the IPv4 Multicast sample application. +.. _external_pinned_buffer: + +External Pinned Buffers +----------------------- + +The regular pktmbuf pools contain only mbufs with no external buffers. +This means data buffer for the mbuf should be placed right after the +mbuf structure (and the private data if any). + +On some cases, the application would want to have the buffers allocated +from a different device in the platform. This is in order to do zero +copy for the packet directly to the device memory. Examples for such +devices can be GPU or storage device. For such cases the regular pktmbuf +pool does not fit since each mbuf would need to point to external +buffer. + +To support above, the new type of pktmbuf pool is introduced - the pktmbuf +pool with pinned external memory. The pool of such type is populated with +mbufs pointing to the device buffers using the mbuf external buffer feature. +The PMD populates its receive queues with those buffers, so that +every packet received will be scattered directly to the device memory. +On the other direction, embedding the buffer pointer to the transmit +queues of the NIC, will make the DMA to fetch device memory +using peer to peer communication. + +Such mbuf with external buffer should be handled with care when mbuf is +freed. Mainly the external buffer should not be detached, so that it can +be reused for the next packet receive. To support this pool feature the PMDs +should be aware that pool mbuf allocator might return the buffers with +EXT_ATTACHED_MBUF flag set. + +To create the pktmbuf pool with the pinned external memory the dedicated +routine rte_pktmbuf_pool_create_extbuf() is provided. + Debug ----- diff --git a/doc/guides/rel_notes/release_20_02.rst b/doc/guides/rel_notes/release_20_02.rst index dfebc46..a0e6734 100644 --- a/doc/guides/rel_notes/release_20_02.rst +++ b/doc/guides/rel_notes/release_20_02.rst @@ -65,6 +65,10 @@ New Features New APIs have been added to support rings with custom element size. +* **Added rte_mbuf pool with Pinned External Memory.** + + Added support for new type of pktsmbuf pool. + * **Updated rte_flow api to support L2TPv3 over IP flows.** Added support for new flow item to handle L2TPv3 over IP rte_flow patterns. @@ -132,6 +136,7 @@ New Features * Added support for RSS using L3/L4 source/destination only. * Added support for matching on GTP tunnel header item. + * Added support for the mbufs with external pinned buffers. * Removed limitation of matching on tagged/untagged packets (when using DV flow engine). * Added BlueField-2 integrated ConnectX-6 Dx device support. -- 1.8.3.1