DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] rte_rxmbuf_alloc() fails
@ 2016-12-07  9:44 황규민
  2016-12-07 14:16 ` Wiles, Keith
  0 siblings, 1 reply; 3+ messages in thread
From: 황규민 @ 2016-12-07  9:44 UTC (permalink / raw)
  To: users

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.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] rte_rxmbuf_alloc() fails
  2016-12-07  9:44 [dpdk-users] rte_rxmbuf_alloc() fails 황규민
@ 2016-12-07 14:16 ` Wiles, Keith
  2016-12-08  5:40   ` 황규민
  0 siblings, 1 reply; 3+ messages in thread
From: Wiles, Keith @ 2016-12-07 14:16 UTC (permalink / raw)
  To: 황규민; +Cc: users


> On Dec 7, 2016, at 3:44 AM, 황규민 <hkm73560@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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] rte_rxmbuf_alloc() fails
  2016-12-07 14:16 ` Wiles, Keith
@ 2016-12-08  5:40   ` 황규민
  0 siblings, 0 replies; 3+ messages in thread
From: 황규민 @ 2016-12-08  5:40 UTC (permalink / raw)
  To: Wiles, Keith; +Cc: users

Thank you for your answer.
I finally found the culprit. It was my fault.
I allocated useless mbufs from a mempool so the mbufs consume the mempool
slightly.
Thank you Keith :)

2016-12-07 23:16 GMT+09:00 Wiles, Keith <keith.wiles@intel.com>:

>
> > On Dec 7, 2016, at 3:44 AM, 황규민 <hkm73560@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
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-08  5:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-07  9:44 [dpdk-users] rte_rxmbuf_alloc() fails 황규민
2016-12-07 14:16 ` Wiles, Keith
2016-12-08  5:40   ` 황규민

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).