From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) by dpdk.org (Postfix) with ESMTP id CC19B37B6 for ; Mon, 18 Apr 2016 18:41:36 +0200 (CEST) Received: by mail-lf0-f47.google.com with SMTP id j11so223558015lfb.1 for ; Mon, 18 Apr 2016 09:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=wGja4rMg6ROrHkMb/LF8OTdZh9DXXgQ/9l1Do0D59TM=; b=eMxD09do5Ruu692iyEdAM5hru0IrATiEV2wHiTUk6Son1z0IH8oZRpW3/HA6oLuv+d +zKav+zCCmHzVJihViBFHDJd6jrLAMyxq/bmjjQYpnm8hxtKEgcMe4+BPEcmHIBJd6Zy btZFk2wAs2OOoZvigSyy5Txl1uCYPoBp/yCmKqStQPFWja+ysoqnvojl2UmJ5KPpKFSK Fy+uwiRfOHZzWgVxwWyg9B61W52n9fBIuiWfCJyTHJkh0gSbJRYJglSFl6db7KDpehic lIRiVmB0QtySA1Gt2ZR81gDQSw4sH3fd6rjN/gDrujtNj5wS7+qBg+mcD7ytpeeEV92h rX4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=wGja4rMg6ROrHkMb/LF8OTdZh9DXXgQ/9l1Do0D59TM=; b=inzqCRWfLeUqCG2arJbCdxYHmJbCPFF/kHZD8aZYrq6bDj0FwWJOVnsbfFf2MuRsiD fIL1dzeZrh3rPu4khTMy7qT6Mk+fBZm+Ir/7okTVjXJxnb47hztbbF5t2YWYf5igY6fY 2JMHuPkky5cFnTYTj51hKbxM9DFhjgSB4k+RQYxM/fhxe2OTvAJqbZLaXwXPNaKy8xsn mxPmmmkBcCBiHormCf12QxYGi+q2OUoARXHqIp5vsTfukYs9t0hajml/WnwCdSZgdgc+ +zaE7SZhToHmVgTKmBfU3NdxNd6ANUzJtRPKu0Blz5FXOlKqNR/21/1x1N6LElGqm3Q4 ZSmA== X-Gm-Message-State: AOPr4FWKF3wN1YEisEWcpcQegP8gBMN0sa4ZXilrVq20dIOK5gOIGelB9zDFyJy3sBggs0rAXoIKDCJXScoJmA== MIME-Version: 1.0 X-Received: by 10.25.155.85 with SMTP id d82mr15865529lfe.74.1460997696553; Mon, 18 Apr 2016 09:41:36 -0700 (PDT) Received: by 10.112.164.40 with HTTP; Mon, 18 Apr 2016 09:41:36 -0700 (PDT) In-Reply-To: <1492D1F8-C60F-440F-846D-D69E60395657@intel.com> References: <1492D1F8-C60F-440F-846D-D69E60395657@intel.com> Date: Mon, 18 Apr 2016 18:41:36 +0200 Message-ID: From: =?UTF-8?Q?Javier_Coleto_Fern=C3=A1ndez?= To: "Wiles, Keith" Cc: Andriy Berestovskyy , users Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] mbuf free cnt not decreasing X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2016 16:41:37 -0000 2016-04-18 18:29 GMT+02:00 Wiles, Keith : > >Javier, > >That was just our guess, you might have the leak somewhere else... > > > >Andriy > > > >On Mon, Apr 18, 2016 at 6:01 PM, Javier Coleto Fern=C3=A1ndez > > wrote: > >> This is exactly what I'm doing at the moment, but the free count (both > the > >> rte_mempool_free_count() and rte_ring_free_count()) keeps increasing > >> nonetheless. > > Check to make sure you are not increasing the reference count in the mbuf= , > these two are the most common places to lose packets. I don't make any call to reference count changing functions (like rte_mbuf_refcnt_update/set) but, is there any other way this reference count could end up having a "bad" value? Also check your loops to make sure you are not breaking out of the packet > processing loops too soon and skipping some packets. In one case I have > seen someone converted a while loop into a for loop and forgot to remove > the i++ some place in the body of the code. Try adding counter on your co= de > to see if you are missing processing or freeing the packets. > I would not expect the DPDK code to be the problem, so focus on your code > is all I can tell you. > > >> > >> Regards, > >> Javier > >> > >> 2016-04-18 17:57 GMT+02:00 Andriy Berestovskyy : > >>> > >>> On Mon, Apr 18, 2016 at 5:34 PM, Javier Coleto Fern=C3=A1ndez > >>> wrote: > >>> > Basing on what you say, is that return value supposed to be less th= an > >>> > 'n' in > >>> > case the ring is filled up or do I have to check the ring size befo= re > >>> > calling rte_eth_tx_burst()? > >>> > >>> You just have to check the return value and free the unsent mbufs. > >>> Here is an example: > >>> > >>> ret =3D rte_eth_tx_burst(port, queueid, m_table, n); > >>> if (unlikely(ret < n)) { > >>> do { > >>> rte_pktmbuf_free(m_table[ret]); > >>> } while (++ret < n); > >>> } > > > > > Regards, > Keith > Regards, Javier