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 574FB5955 for ; Sat, 25 Oct 2014 02:53:09 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 24 Oct 2014 17:55:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="405655100" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by FMSMGA003.fm.intel.com with ESMTP; 24 Oct 2014 17:53:50 -0700 Received: from kmsmsx152.gar.corp.intel.com (172.21.73.87) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sat, 25 Oct 2014 09:01:38 +0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.110.14) by KMSMSX152.gar.corp.intel.com (172.21.73.87) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sat, 25 Oct 2014 09:01:37 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.156]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.207]) with mapi id 14.03.0195.001; Sat, 25 Oct 2014 09:01:36 +0800 From: "Ouyang, Changchun" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH 0/3] Vhost app removes dependency of REFCNT Thread-Index: AQHP72H18LrZhcHdEU+4TUdTg3NpIJw+ekAAgAGCBlA= Date: Sat, 25 Oct 2014 01:01:35 +0000 Message-ID: References: <1414138209-24431-1-git-send-email-changchun.ouyang@intel.com> <11605757.Du0pTjUQ40@xps13> In-Reply-To: <11605757.Du0pTjUQ40@xps13> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Sat, 25 Oct 2014 00:53:10 -0000 Hi Thomas > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Friday, October 24, 2014 5:48 PM > To: Ouyang, Changchun > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 0/3] Vhost app removes dependency of > REFCNT >=20 > 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. >=20 > So you are replacing refcnt by something else which requires special hand= ling > in drivers. To some extent, You are right, but I'd like regard as: our current mbuf imp= lement has no consideration of external buffer.=20 While vhost zero copy need it work well when it is external buffer, so need= this special handling. Very appreciate if you have a better solution, design idea and let me know= . =20 > I feel this is not the right design. > Why do you want to remove refcnt dependency? >=20 Bruce has some explanation about the reason in another mail. For vhost zero copy itself, it doesn't depend on most of code REFCNT, it ju= st need mbuf can support external buffer. Before the change, undefine the REFCNT, make mbuf has workaround for suppor= ting external buffer. Thanks and regards, Changchun