From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] net/mlx5: fix trimming SW ring for vectorized Rx Date: Thu, 03 Aug 2017 23:20:52 +0200 Message-ID: <3890701.xl1HzoHyJz@xps> References: <20170803211240.42742-1-yskoh@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com To: Yongseok Koh Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 04AC72C18 for ; Thu, 3 Aug 2017 23:21:00 +0200 (CEST) In-Reply-To: <20170803211240.42742-1-yskoh@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 03/08/2017 23:12, Yongseok Koh: > Unlike mlx5_rx_burst(), mlx5_rx_burst_vec() doesn't replace completed > buffers one by one right after completion is processed but replenishes > multiple buffers later with rte_mempool_get_bulk(). Therefore, there could > be some buffer addresses left in the SW ring (rxq->elts[]) which have > already been delivered to application. As PMD doesn't own such buffers, it > must not be freed by PMD. "Trimming" is needed before cleanup. > > A problem can be seen when quitting testpmd when > CONFIG_RTE_LIBRTE_MBUF_DEBUG=y and CONFIG_RTE_LIBRTE_MEMPOOL_DEBUG=y > > Trimming should be as simple as possible, it shouldn't touch any indexes > and buffer allocation isn't necessary. > > Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86") > > Signed-off-by: Yongseok Koh > Acked-by: Nelio Laranjeiro Applied, thanks