[dpdk-users] rte_rxmbuf_alloc() fails

Wiles, Keith keith.wiles at intel.com
Wed Dec 7 15:16:52 CET 2016


> On Dec 7, 2016, at 3:44 AM, 황규민 <hkm73560 at gmail.com> wrote:
> 
> Hi,
> 
> When I run my application DPDK doesn't receive any packets after about 3
> minutes.
> So I figured out why rte_rx_burst() returned 0 and the reason is
> rte_rxmbuf_alloc() failure. rte_rxmbuf_alloc() == NULL.
> I printed some statistics and it showed that the prod's head and cons' head
> are same.
> What does this mean?
> And rte_mempool_empty and rte_mempool_full always failed.

To me the basic problem for mbuf allocation fails is the mbufs are not being freed and there are many reasons for this to happen.

Here are a few I have hit:
- The number of mbufs created is smaller then the TX flush threshold in the PMD(s), which does not allow any packets to be freed until the threshold is hit.
- The next one I have see is not checking the rte_eth_tx_burst() return code, which is the number of mbufs that were able to be placed on the TX ring. Then the application just blindly reuses the mbuf array pointer again not realizing some mbufs are still in the list creating a mbuf leak.

DPDK is very well tested so I would not expect any of the currently released code to have any problems or bugs in not freeing mbufs.

> 
> Thanks.

Regards,
Keith



More information about the users mailing list