[dpdk-dev] Free up completed TX buffers

Andriy Berestovskyy aber at semihalf.com
Mon Jun 1 10:50:11 CEST 2015


Hi Zoltan,

On Fri, May 29, 2015 at 7:00 PM, Zoltan Kiss <zoltan.kiss at 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


More information about the dev mailing list