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 CF8511B1A9; Mon, 9 Oct 2017 15:21:03 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2017 06:21:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,500,1500966000"; d="scan'208";a="908168180" Received: from bricha3-mobl3.ger.corp.intel.com ([10.252.13.248]) by FMSMGA003.fm.intel.com with SMTP; 09 Oct 2017 06:20:59 -0700 Received: by (sSMTP sendmail emulation); Mon, 09 Oct 2017 14:20:58 +0100 Date: Mon, 9 Oct 2017 14:20:58 +0100 From: Bruce Richardson To: "Ananyev, Konstantin" Cc: "Zhang, Qi Z" , "Wu, Jingjing" , "Xing, Beilei" , "dev@dpdk.org" , "stable@dpdk.org" Message-ID: <20171009132057.GA31632@bricha3-MOBL3.ger.corp.intel.com> References: <20171009085345.46357-1-qi.z.zhang@intel.com> <2601191342CEEE43887BDE71AB9772585FAA647D@IRSMSX103.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB9772585FAA647D@IRSMSX103.ger.corp.intel.com> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.8.3 (2017-05-23) Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix unexpected mbuf free in vPMD 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: , X-List-Received-Date: Mon, 09 Oct 2017 13:21:04 -0000 On Mon, Oct 09, 2017 at 12:44:25PM +0000, Ananyev, Konstantin wrote: > Hi Zhang, > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qi Zhang > > Sent: Monday, October 9, 2017 9:54 AM > > To: Wu, Jingjing ; Xing, Beilei > > Cc: dev@dpdk.org; Zhang, Qi Z ; stable@dpdk.org > > Subject: [dpdk-dev] [PATCH] net/i40e: fix unexpected mbuf free in vPMD > > > > The patch reset tx queue sw_ring's mbuf to NULL after it is free in > > i40_tx_free_bufs, this prevent same mbuf be free again in > > i40e_dev_tx_queue_release. This fix follow the same implemenation of > > non-vPMD. > > Wonder why we can't change i40e_dev_tx_queue_release() instead, > so it will only go through the TXDs that were really armed? > Let say from txq->tx_next_dd - tx_rs_thresh - 1 till txq->tx_tail? > Let say _ixgbe_tx_queue_release_mbufs_vec() works that way. > Then we probably can keep our runtime code intact. > Konstantin > +1 to this. We should avoid adding writes to the TX path. Instead we should ensure that other routines properly track the buffers to be freed using the appropriate indexes. /Bruce