[dpdk-dev] preallocation of void ** obj_p of rte_ring_dequeue

Jose Gavine Cueto pepedocs at gmail.com
Tue Nov 5 11:42:30 CET 2013


Thank you,

I've actually read the code & guide, but I wanted to make sure that what I
understood was correct.

Cheers,
Pepe


On Tue, Nov 5, 2013 at 6:33 PM, Cyril Cressent <cyril.cressent at intel.com>wrote:

> On Tue, Nov 05, 2013 at 06:15:01PM +0800, Jose Gavine Cueto wrote:
> >
> > When using *static int rte_ring_dequeue( structe rte_ring * r, void **
> > obj_p )*, is the user presumed to allocate obj_p , or does this method
> > allocates this obj_p ?
>
> This method doesn't allocate anything ; you have to allocate the object
> you want to fill yourself.
>
> You can find more details about how to work with rings there:
>
> - DPDK Programmer's Guide (Chapter 5 - Ring Library)
> - DPDK API Documentation for rte_ring.h
>
> Both of which are accessible at http://dpdk.org/doc
>
> Quite a few sample applications (examples/ directory in the DPDK
> distribution) also make use of rings, notably the quota_watermark one,
> so it's also a good place to look at.
>
> On a side note, it looks like the API reference page for rte_ring.h is
> broken? It's missing a lot of functions. I'll look into it if I get a
> chance.
> http://dpdk.org/doc/api/rte__ring_8h.html#func-members
>
> Cyril
>



-- 
To stop learning is like to stop loving.


More information about the dev mailing list