From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id AF3E920A4F; Thu, 3 Aug 2017 17:20:59 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 03 Aug 2017 17:20:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=rEoxFK11tBT1ZH9 OjeBc0U7o01jyiZD59X1SL82UOk0=; b=ZPpTJmJSw/d7LEEhZPekkp4HPFxEbFy NogfXGE4zwgPWlcf/mhG0xgAeTnVPdKmSZtWI9bNf1+WIjBG6QeDzaznRDsk1zAc qaEvgUfRsfFD1zNHq4Z/Cv2pnO0e0sfoYegsFmqMi7Ppcihi26s0zzTx/YlOwrFM JRG5Xhk2Atyw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=rEoxFK11tBT1ZH9OjeBc0U7o01jyiZD59X1SL82UOk0=; b=JNcN0vuB em/w2kK7drEW0kRVxqU2uO5TG7L3UdBgfEhhlOThpllbfWUyUs46X0OzTLEMIJG1 qo0yAgnkzLUIuJCuSiwBavjDAs+izFJSNFlaKsn3PEWqoF6JQebkseoW+C71ZiMH iWznjcabGQUSKh0HxsVxUot9T0Xfmn4SMFjlm9hJ7dV5/ByQBGXKhZ1n8AYT45nk ubqwZSEY5phhNECHDjYRhgMnoexDXRzKPvDl/WfCF1AGiZ/ymAeFpbPrKkAivJHb siKGypdRHgzvvPymsURGhrOHp+BGq2BWgEaJKfLlx+sJRYLuJts2uXHS0dfqfIhD VHUS9W1tmEGJyQ== X-ME-Sender: X-Sasl-enc: c7Sab0q9KBMJcM89PyygRSQxOWgU5kAqLIJcU7DSnJN9 1501795259 Received: from xps.localnet (196.114.118.80.rev.sfr.net [80.118.114.196]) by mail.messagingengine.com (Postfix) with ESMTPA id 43C0524515; Thu, 3 Aug 2017 17:20:59 -0400 (EDT) From: Thomas Monjalon To: Yongseok Koh Cc: dev@dpdk.org, adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Date: Thu, 03 Aug 2017 23:20:52 +0200 Message-ID: <3890701.xl1HzoHyJz@xps> In-Reply-To: <20170803211240.42742-1-yskoh@mellanox.com> References: <20170803211240.42742-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix trimming SW ring for vectorized Rx 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: Thu, 03 Aug 2017 21:21:00 -0000 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