From: "Roger B. Melton" Subject: Re: [PATCH] net/i40e: Improve i40evf buffer cleanup in tx vector mode Date: Thu, 5 Oct 2017 19:42:53 -0400 Message-ID: <7098ec62-43ed-51c8-6711-a57cb92277d7@cisco.com> References: <20171005191111.27557-1-rmelton@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org To: jingjing.wu@intel.com Return-path: Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) by dpdk.org (Postfix) with ESMTP id 28EAA1B1A5 for ; Fri, 6 Oct 2017 01:43:00 +0200 (CEST) In-Reply-To: <20171005191111.27557-1-rmelton@cisco.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Everyone, As soon as I submitted the patch, I realized I neglected to signoff.  What's the recommended procedure, resubmit the original signed off, or bump to v1? Thanks, Roger On 10/5/17 3:11 PM, Roger B Melton wrote: > --- > > i40evf tx vector logic frees mbufs, but it does not remove the > mbufs from software rings which leads to double frees. This change > corrects that oversight. We've validated this fix within our application. > > drivers/net/i40e/i40e_rxtx_vec_common.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h > index 39a6da0..fdc6fce 100644 > --- a/drivers/net/i40e/i40e_rxtx_vec_common.h > +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h > @@ -127,6 +127,7 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq) > if (likely(m != NULL)) { > free[0] = m; > nb_free = 1; > + txep[0].mbuf = NULL; > for (i = 1; i < n; i++) { > m = rte_pktmbuf_prefree_seg(txep[i].mbuf); > if (likely(m != NULL)) { > @@ -139,14 +140,17 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq) > free[0] = m; > nb_free = 1; > } > + txep[i].mbuf = NULL; > } > } > rte_mempool_put_bulk(free[0]->pool, (void **)free, nb_free); > } else { > + txep[0].mbuf = NULL; > for (i = 1; i < n; i++) { > m = rte_pktmbuf_prefree_seg(txep[i].mbuf); > if (m != NULL) > rte_mempool_put(m->pool, m); > + txep[i].mbuf = NULL; > } > } >