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 52CA85901 for ; Mon, 16 May 2016 10:50:08 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 16 May 2016 01:50:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,626,1455004800"; d="scan'208";a="981863535" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga002.fm.intel.com with ESMTP; 16 May 2016 01:50:06 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.130]) by IRSMSX151.ger.corp.intel.com ([169.254.4.7]) with mapi id 14.03.0248.002; Mon, 16 May 2016 09:50:00 +0100 From: "Ananyev, Konstantin" To: Hiroyuki MIKITA , "olivier.matz@6wind.com" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] mbuf: decrease refcnt when detaching Thread-Index: AQHRrsGVKDrl7AtDt0q3TC/7GwfELp+6rwIggAAc6ICAAG90sA== Date: Mon, 16 May 2016 08:49:59 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836B5109C@irsmsx105.ger.corp.intel.com> References: <1463327436-6863-1-git-send-email-h.mikita89@gmail.com> <2601191342CEEE43887BDE71AB97725836B50F15@irsmsx105.ger.corp.intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] mbuf: decrease refcnt when detaching 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: Mon, 16 May 2016 08:50:08 -0000 SGkgSGlyb3l1a2ksDQoNC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