DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andriy Berestovskyy <aber@semihalf.com>
To: dev@dpdk.org
Subject: Re: [dpdk-dev] Free up completed TX buffers
Date: Mon, 1 Jun 2015 10:50:11 +0200	[thread overview]
Message-ID: <CAOysbxpKv291e6V41=3CQSRP59cij9AZXV=wF-WiUm6awsgqQw@mail.gmail.com> (raw)
In-Reply-To: <55689B42.6060800@linaro.org>

Hi Zoltan,

On Fri, May 29, 2015 at 7:00 PM, Zoltan Kiss <zoltan.kiss@linaro.org> wrote:
> The easy way is just to increase your buffer pool's size to make
> sure that doesn't happen.

Go for it!

>  But there is no bulletproof way to calculate such
> a number

Yeah, there are many places for mbufs to stay :( I would try:

Mempool size = sum(numbers of all TX descriptors)
    + sum(rx_free_thresh)
    + (mempool cache size * (number of lcores - 1))
    + (burst size * number of lcores)

> I'm thinking about a foolproof way, which is exposing functions like
> ixgbe_tx_free_bufs from the PMDs, so the application can call it as a last
> resort to avoid deadlock.

Have a look at rte_eth_dev_tx_queue_stop()/start(). Some NICs (i.e.
ixgbe) do reset the queue and free all the mbufs.

Regards,
Andriy

  reply	other threads:[~2015-06-01  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29 17:00 Zoltan Kiss
2015-06-01  8:50 ` Andriy Berestovskyy [this message]
2015-06-01 17:51   ` Zoltan Kiss

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='CAOysbxpKv291e6V41=3CQSRP59cij9AZXV=wF-WiUm6awsgqQw@mail.gmail.com' \
    --to=aber@semihalf.com \
    --cc=dev@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).