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 DCA0A199AE; Mon, 9 Oct 2017 03:48:55 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Oct 2017 18:48:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,497,1500966000"; d="scan'208";a="136505520" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 08 Oct 2017 18:48:52 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 8 Oct 2017 18:48:13 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 8 Oct 2017 18:48:13 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.152]) with mapi id 14.03.0319.002; Mon, 9 Oct 2017 09:47:09 +0800 From: "Wu, Jingjing" To: "Zhang, Qi Z" , "Xing, Beilei" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/i40e: fix unexpected mbuf free in vPMD Thread-Index: AQHTQJoAHUUMRWQiaEyhhhuxNGhaRaLav0vQ Date: Mon, 9 Oct 2017 01:47:08 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810E8E2F1@SHSMSX103.ccr.corp.intel.com> References: <20171009085345.46357-1-qi.z.zhang@intel.com> In-Reply-To: <20171009085345.46357-1-qi.z.zhang@intel.com> Accept-Language: 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 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 01:48:56 -0000 Hi, qi Is your patch duplicated with this http://www.dpdk.org/dev/patchwork/patch/= 29814/ ? Thanks Jingjing > -----Original Message----- > From: Zhang, Qi Z > Sent: Monday, October 9, 2017 4:54 PM > To: Wu, Jingjing ; Xing, Beilei > Cc: dev@dpdk.org; Zhang, Qi Z ; stable@dpdk.org > Subject: [PATCH] net/i40e: fix unexpected mbuf free in vPMD >=20 > 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. >=20 > Fixes: b4669bb95038 ("i40e: add vector Tx") > Cc: stable@dpdk.org >=20 > Signed-off-by: Qi Zhang > --- > drivers/net/i40e/i40e_rxtx_vec_common.h | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h > b/drivers/net/i40e/i40e_rxtx_vec_common.h > index 39a6da0..ed51b4d 100644 > --- a/drivers/net/i40e/i40e_rxtx_vec_common.h > +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h > @@ -124,11 +124,13 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq) > */ > txep =3D &txq->sw_ring[txq->tx_next_dd - (n - 1)]; > m =3D rte_pktmbuf_prefree_seg(txep[0].mbuf); > + txep[0].mbuf =3D NULL; > if (likely(m !=3D NULL)) { > free[0] =3D m; > nb_free =3D 1; > for (i =3D 1; i < n; i++) { > m =3D rte_pktmbuf_prefree_seg(txep[i].mbuf); > + txep[i].mbuf =3D NULL; > if (likely(m !=3D NULL)) { > if (likely(m->pool =3D=3D free[0]->pool)) { > free[nb_free++] =3D m; > @@ -145,6 +147,7 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq) > } else { > for (i =3D 1; i < n; i++) { > m =3D rte_pktmbuf_prefree_seg(txep[i].mbuf); > + txep[i].mbuf =3D NULL; > if (m !=3D NULL) > rte_mempool_put(m->pool, m); > } > -- > 2.9.5