DPDK usage discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: "Andriy Berestovskyy" <aber@semihalf.com>,
	"Javier Coleto Fernández" <javicoleto44@gmail.com>
Cc: users <users@dpdk.org>
Subject: Re: [dpdk-users] mbuf free cnt not decreasing
Date: Mon, 18 Apr 2016 16:29:19 +0000	[thread overview]
Message-ID: <1492D1F8-C60F-440F-846D-D69E60395657@intel.com> (raw)
In-Reply-To: <CAOysbxqKv3qNg5h9ZK6bQUG+LXsOu0aKuP4th3RcHdaq2iXRyQ@mail.gmail.com>

>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ández
><javicoleto44@gmail.com> 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. 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 code 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 <aber@semihalf.com>:
>>>
>>> On Mon, Apr 18, 2016 at 5:34 PM, Javier Coleto Fernández
>>> <javicoleto44@gmail.com> wrote:
>>> > Basing on what you say, is that return value supposed to be less than
>>> > 'n' in
>>> > case the ring is filled up or do I have to check the ring size before
>>> > calling rte_eth_tx_burst()?
>>>
>>> You just have to check the return value and free the unsent mbufs.
>>> Here is an example:
>>>
>>> ret = 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





  reply	other threads:[~2016-04-18 16:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15  8:34 Javier Coleto Fernández
2016-04-15 13:01 ` Andriy Berestovskyy
2016-04-18  8:41   ` Javier Coleto Fernández
2016-04-18  9:21     ` Andriy Berestovskyy
2016-04-18 14:37       ` Wiles, Keith
2016-04-18 15:34         ` Javier Coleto Fernández
2016-04-18 15:57           ` Andriy Berestovskyy
2016-04-18 16:01             ` Javier Coleto Fernández
2016-04-18 16:13               ` Andriy Berestovskyy
2016-04-18 16:29                 ` Wiles, Keith [this message]
2016-04-18 16:41                   ` Javier Coleto Fernández
2016-04-18 16:44                     ` Wiles, Keith
2016-04-19 11:30                       ` Javier Coleto Fernández
2016-04-18 14:53     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1492D1F8-C60F-440F-846D-D69E60395657@intel.com \
    --to=keith.wiles@intel.com \
    --cc=aber@semihalf.com \
    --cc=javicoleto44@gmail.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).