From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id D5DC37D0A for ; Fri, 27 Apr 2018 20:09:29 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6FDD4212F4; Fri, 27 Apr 2018 14:09:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 27 Apr 2018 14:09:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=fYLYLN7SHcJaqUDZK+Kox1tYZ7 0R2Lfmt3Zz0EfKOQc=; b=aZ38NzBdQ3TWbuZev7a5HKIH9FolgQzkME3ExEF2qZ tjrZMjin3RAkMpCuxpQkWCLmPxQlolKtkGcP8k+9CrARaA+XG9LZAr/OO6vGhL3m 39SuQsHLFUzvMOCtk6L/ej5qhE2vnc23rCpfisnu9QFISgHAQDWoOldIFiVwJY9V 0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=fYLYLN 7SHcJaqUDZK+Kox1tYZ70R2Lfmt3Zz0EfKOQc=; b=fSxPDnhtUOgjkfOSJRtwFD NuBYzEXJvCdf72GwZ6gd/Zr0+0AfaIdokCbk+X7QfY5sPy5mTR3nCouDPO8TZbvQ M6qPQv67gLQfS0Cu7n/L06h3hnOCMqtXmnvJx/FLYQh/Ulea7k4Le68/xyAN/NRC sJQK6RtJk5OnLxnfhPQiUcv3TUoz5KVas4LvadAO+Ym7hWVYZPW+w546XDc+aMDw B6IiTLikG656rQwlInbwfJ+iDIn5mj6UKDQR/IulsnfN1ZuHaLQ3w4UjLqcqIDc1 E5GaBlUdIM6nOWmNlKNa1G+60tI+JLa0h2jFPc1FAaILCIs0rDs38EmkRP7OiqZg == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 31B04E4412; Fri, 27 Apr 2018 14:09:28 -0400 (EDT) From: Thomas Monjalon To: Yongseok Koh Cc: dev@dpdk.org, wenzhuo.lu@intel.com, jingjing.wu@intel.com, olivier.matz@6wind.com, konstantin.ananyev@intel.com, arybchenko@solarflare.com, stephen@networkplumber.org, adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Date: Fri, 27 Apr 2018 20:09:26 +0200 Message-ID: <15428823.W6WqeT6KmP@xps> In-Reply-To: <20180427172252.8153-1-yskoh@mellanox.com> References: <20180310012532.15809-1-yskoh@mellanox.com> <20180427172252.8153-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v8 1/2] mbuf: support attaching external buffer to mbuf 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: , X-List-Received-Date: Fri, 27 Apr 2018 18:09:30 -0000 27/04/2018 19:22, Yongseok Koh: > 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 > Acked-by: Andrew Rybchenko Series applied, thanks