From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 21 Oct 2015 03:09:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,711,1437462000"; d="scan'208";a="585220483" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.65]) by FMSMGA003.fm.intel.com with SMTP; 21 Oct 2015 03:09:40 -0700 Received: by (sSMTP sendmail emulation); Wed, 21 Oct 2015 11:09:39 +0025 Date: Wed, 21 Oct 2015 11:09:39 +0100 From: Bruce Richardson To: Tetsuya Mukawa 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 Content-Disposition: inline In-Reply-To: <562714FE.4030504@igel.co.jp> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "dev@dpdk.org" , "ann.zhuangyanying@huawei.com" Subject: Re: [dpdk-dev] [RFC PATCH v2] vhost: Add VHOST PMD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2015 10:09:44 -0000 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