From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Rybchenko Subject: Re: [PATCH v7 1/2] mbuf: support attaching external buffer to mbuf Date: Fri, 27 Apr 2018 10:22:31 +0300 Message-ID: <5a7f368a-8b1b-705a-2186-be76c59720cf@solarflare.com> References: <20180310012532.15809-1-yskoh@mellanox.com> <20180427000123.31888-1-yskoh@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , , , , To: Yongseok Koh , , , Return-path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id B2B7B72FB for ; Fri, 27 Apr 2018 09:22:44 +0200 (CEST) In-Reply-To: <20180427000123.31888-1-yskoh@mellanox.com> Content-Language: en-GB 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 04/27/2018 03:01 AM, Yongseok Koh wrote: > This patch introduces a new way of attaching an external buffer to a mbuf. > > Attaching an external buffer is quite similar to mbuf indirection in > replacing buffer addresses and length of a mbuf, but a few differences: > - When an indirect mbuf is attached, refcnt of the direct mbuf would be > 2 as long as the direct mbuf itself isn't freed after the attachment. > In such cases, the buffer area of a direct mbuf must be read-only. But > external buffer has its own refcnt and it starts from 1. Unless > multiple mbufs are attached to a mbuf having an external buffer, the > external buffer is writable. > - There's no need to allocate buffer from a mempool. Any buffer can be > attached with appropriate free callback. > - Smaller metadata is required to maintain shared data such as refcnt. > > Signed-off-by: Yongseok Koh > Acked-by: Konstantin Ananyev > Acked-by: Olivier Matz Many thanks, Acked-by: Andrew Rybchenko