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 36F6FB469 for ; Wed, 18 Feb 2015 13:07:08 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 18 Feb 2015 04:03:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,512,1418112000"; d="scan'208";a="679710561" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga002.fm.intel.com with ESMTP; 18 Feb 2015 04:07:05 -0800 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX153.ger.corp.intel.com (163.33.192.75) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 18 Feb 2015 12:05:20 +0000 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.117]) by irsmsx155.ger.corp.intel.com ([169.254.14.159]) with mapi id 14.03.0195.001; Wed, 18 Feb 2015 12:05:19 +0000 From: "Ananyev, Konstantin" To: "Gonzalez Monroy, Sergio" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 0/2] Removal of RTE_MBUF_REFCNT Thread-Index: AQHQS2qjpB53zZbjpUSsboM8b3yVjJz2T0pw Date: Wed, 18 Feb 2015 12:05:19 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258213EF713@irsmsx105.ger.corp.intel.com> References: <1424102913-18944-1-git-send-email-sergio.gonzalez.monroy@intel.com> <1424257383-4177-1-git-send-email-sergio.gonzalez.monroy@intel.com> In-Reply-To: <1424257383-4177-1-git-send-email-sergio.gonzalez.monroy@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 0/2] Removal of RTE_MBUF_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: Wed, 18 Feb 2015 12:07:08 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sergio Gonzalez Monr= oy > Sent: Wednesday, February 18, 2015 11:03 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v2 0/2] Removal of RTE_MBUF_REFCNT >=20 > This patch tries to remove the RTE_MBUF_REFCNT config options and depende= ncies > by introducing a new mbuf flag IND_ATTACHED_MBUF that would indicate when= the mbuf > is an indirect attached mbuf, to differentiate between indirect mbufs and= mbufs > with external memory buffers (ie. vhost zero copy). >=20 > Previous discussion: > http://dpdk.org/ml/archives/dev/2014-October/007127.html >=20 > Currently for mbufs with refcnt, we cannot free mbufs with external memor= y > buffers (ie. vhost zero copy), as they are recognized as indirect > attached mbufs and therefore we free the direct mbuf it points to, > resulting in an error in the case of external memory buffers. >=20 > We solve the issue by introducing the IND_ATTACHED_MBUF flag, which indic= ates > that the mbuf is an indirect attached mbuf pointing to another mbuf. > When we free an mbuf, we only free the direct mbuf if the flag is set. > Freeing an mbuf with external buffer is the same as freeing a non attache= d mbuf. > The flag is set during attach and clear on detach. >=20 > So in the case of vhost zero copy where we have mbufs with external > buffers, by default we just free the mbuf and it is up to the user to dea= l with > the external buffer. >=20 > v2: > - Add missing parenthesis to RTE_MBUF_INDIRECT macro >=20 > Sergio Gonzalez Monroy (2): > mbuf: Introduce IND_ATTACHED_MBUF flag > Remove RTE_MBUF_REFCNT references >=20 > app/test/test_link_bonding.c | 15 ----------- > app/test/test_mbuf.c | 17 +++---------- > config/common_bsdapp | 1 - > config/common_linuxapp | 1 - > examples/Makefile | 4 +-- > examples/ip_fragmentation/Makefile | 4 --- > examples/ip_pipeline/Makefile | 3 --- > examples/ip_pipeline/main.c | 5 ---- > examples/ipv4_multicast/Makefile | 4 --- > examples/vhost/main.c | 19 +++----------- > lib/librte_ip_frag/Makefile | 4 --- > lib/librte_ip_frag/rte_ip_frag.h | 4 --- > lib/librte_mbuf/rte_mbuf.c | 2 -- > lib/librte_mbuf/rte_mbuf.h | 45 +++++++--------------------= ------ > lib/librte_pmd_bond/Makefile | 4 --- > lib/librte_pmd_bond/rte_eth_bond.h | 2 -- > lib/librte_pmd_bond/rte_eth_bond_args.c | 2 -- > lib/librte_pmd_bond/rte_eth_bond_pmd.c | 10 -------- > lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 8 ------ > lib/librte_port/Makefile | 4 --- > 20 files changed, 19 insertions(+), 139 deletions(-) >=20 Acked-by: Konstantin Ananyev > -- > 1.9.3