From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 20F39A04DB; Thu, 15 Oct 2020 07:14:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EB0601BC7E; Thu, 15 Oct 2020 07:14:41 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id E86FA1B694 for ; Thu, 15 Oct 2020 07:14:39 +0200 (CEST) IronPort-SDR: gJad/5NG7OQ8zlu9FXEnuZzDEb+ZGuklexZsUyK6x+rigdLW5WBmrVoo65toOcQOfaDSsQ+wy+ aUkzOyRbQ6MA== X-IronPort-AV: E=McAfee;i="6000,8403,9774"; a="166382809" X-IronPort-AV: E=Sophos;i="5.77,377,1596524400"; d="scan'208";a="166382809" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2020 22:14:37 -0700 IronPort-SDR: AufbAD4SxfCAEIq4rmyuDWAkuerurX7iJ+V++RALRrbui+mqQULa96uYD5blKYVf35ol7inJ/c c4LCm7Xg0hFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,377,1596524400"; d="scan'208";a="300150645" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga008.fm.intel.com with ESMTP; 14 Oct 2020 22:14:37 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 14 Oct 2020 22:14:36 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 15 Oct 2020 13:14:35 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Thu, 15 Oct 2020 13:14:35 +0800 From: "Hu, Jiayu" To: "Ananyev, Konstantin" , yang_y_yi CC: "dev@dpdk.org" , "olivier.matz@6wind.com" , "thomas@monjalon.net" , "yangyi01@inspur.com" Thread-Topic: Re:RE: [PATCH] gso: fix free issue of mbuf gso segments attach to Thread-Index: AQHWnrL4kCD/a91T7EmI02LJCsZxX6mVGaMwgAAQ4wCAAR+qUP//nXEAgACZjACAAaD1kA== Date: Thu, 15 Oct 2020 05:14:35 +0000 Message-ID: References: <20201010031020.349516-1-yang_y_yi@163.com> <43f71e6c9d2f4d5ba3ab56a921c5912d@intel.com> <6167423037704e3382f85275be79de30@intel.com> <9239b2e.2116.17525095531.Coremail.yang_y_yi@163.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] gso: fix free issue of mbuf gso segments attach to X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Ananyev, Konstantin > Sent: Wednesday, October 14, 2020 8:06 PM > To: yang_y_yi ; Hu, Jiayu > Cc: dev@dpdk.org; olivier.matz@6wind.com; thomas@monjalon.net; > yangyi01@inspur.com > Subject: RE: Re:RE: [PATCH] gso: fix free issue of mbuf gso segments atta= ch to >=20 >=20 > > From: yang_y_yi > > Sent: Wednesday, October 14, 2020 3:56 AM > > To: Hu, Jiayu > > Cc: Ananyev, Konstantin ; dev@dpdk.org; > olivier.matz@6wind.com; thomas@monjalon.net; > > yangyi01@inspur.com > > Subject: Re:RE: [PATCH] gso: fix free issue of mbuf gso segments attach= to > > > > I think it isn't a good idea to free it in rte_gso_segment, maybe appli= cation > will continue to use this pkt for other purpose, rte_gso_segment > > can't make decision for application without any notice, it is better to= return > this decision right backt to application. > > >=20 > I think, if user wants to keep original packet, he can always call > rte_pktmbuf_refcnt_update(pkt, 1) > just before calling gso function. >=20 > Also, as I remember in some cases it is not safe to do free() for input p= acket > (as pkt_out[] can contain input pkt itself). Would it also be user respon= sibility > to determine > such situations? In what case will pkt_out[] contain the input pkt? Can you give an example? Thanks, Jiayu >=20 > P.S. Please don't reply on the top. >=20 > Konstantin >=20 > > > > > > > >