From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 9A2BA7E62 for ; Fri, 24 Oct 2014 12:39:07 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 24 Oct 2014 03:41:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,779,1406617200"; d="scan'208";a="610544231" Received: from bricha3-mobl.ger.corp.intel.com (HELO bricha3-mobl.ir.intel.com) ([10.243.20.25]) by fmsmga001.fm.intel.com with SMTP; 24 Oct 2014 03:47:33 -0700 Received: by bricha3-mobl.ir.intel.com (sSMTP sendmail emulation); Fri, 24 Oct 2014 11:47:32 +0001 Date: Fri, 24 Oct 2014 11:47:32 +0100 From: Bruce Richardson To: Thomas Monjalon Message-ID: <20141024104732.GB8052@BRICHA3-MOBL> References: <1414138209-24431-1-git-send-email-changchun.ouyang@intel.com> <11605757.Du0pTjUQ40@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11605757.Du0pTjUQ40@xps13> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 0/3] Vhost app removes dependency of REFCNT 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: Fri, 24 Oct 2014 10:39:08 -0000 On Fri, Oct 24, 2014 at 11:47:46AM +0200, Thomas Monjalon wrote: > 2014-10-24 16:10, Ouyang Changchun: > > To remove the dependency of RTE_MBUF_REFCNT for vhost zero copy, > > the mbuf need introduce EXTERNAL_MBUF(in ol_flags) to indicate it > > attaches to an external buffer, say, from guest space. And don't > > free the external buffer when freeing the mbuf itself in host, in > > addition, RX function in PMD need make sure not overwrite this flag > > when filling ol_flags from descriptors to mbuf. > > So you are replacing refcnt by something else which requires special > handling in drivers. > I feel this is not the right design. > Why do you want to remove refcnt dependency? > Ignoring the implementation of the patchset for now - as I haven't reviewed it in depth yet, I think the removal of the dependency on REFCNT in this vhost code is a good thing. This is the only place in DPDK which depends on the REFCNT being *disabled*. We have lots of things which rely on using having a reference count enabled in the mbuf, and lots and lots of #ifdefs in the code to work around the possibility of it being disabled. If we can remove the need for the reference count to be disabled here we can look to do some major cleanup, by removing completely the option to disable the reference counting. Regards, /Bruce