From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [RFC PATCH v2] vhost: Add VHOST PMD Date: Wed, 21 Oct 2015 11:09:39 +0100 Message-ID: <20151021100939.GA16140@bricha3-MOBL3> References: <1440993326-21205-1-git-send-email-mukawa@igel.co.jp> <1440993326-21205-2-git-send-email-mukawa@igel.co.jp> <74F120C019F4A64C9B78E802F6AD4CC24CB97F66@IRSMSX106.ger.corp.intel.com> <5620B804.1050300@igel.co.jp> <74F120C019F4A64C9B78E802F6AD4CC24F7AC24F@IRSMSX106.ger.corp.intel.com> <562714FE.4030504@igel.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" , "ann.zhuangyanying@huawei.com" To: Tetsuya Mukawa Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 75A33936C for ; Wed, 21 Oct 2015 12:09:43 +0200 (CEST) Content-Disposition: inline In-Reply-To: <562714FE.4030504@igel.co.jp> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Oct 21, 2015 at 01:30:54PM +0900, Tetsuya Mukawa wrote: > On 2015/10/20 23:13, Loftus, Ciara wrote: > > > > I see that af_packet also frees the mbuf. I've checked the ixgbe and ring pmds though and they don't seem to free the buffers, although I may have missed something, the code for these is rather large and I am unfamiliar with most of it. If I am correct though, should this behaviour vary from PMD to PMD I wonder? > > I guess ring PMD is something special. > Because we don't want to copy data with this PMD, RX function doesn't > allocate buffers, also TX function doesn't free buffers. > But other normal PMD will allocate buffers when RX is called, and free > buffers when TX is called. > Yes, this is correct. Ring pmd is the exception since it automatically recycles buffers, and so does not need to alloc/free mbufs. (ixgbe frees the buffers post-TX as part of the TX ring cleanup) /Bruce