From: Cyril Cressent <cyril.cressent@intel.com>
To: Jose Gavine Cueto <pepedocs@gmail.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] preallocation of void ** obj_p of rte_ring_dequeue
Date: Tue, 5 Nov 2013 10:33:25 +0000 [thread overview]
Message-ID: <20131105103325.GA25808@debian> (raw)
In-Reply-To: <CAJ5bv6EVB-oQuVqghaPq+6UQjkiLbhy6x3ascsYZhT_14bBYRg@mail.gmail.com>
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
next prev parent reply other threads:[~2013-11-05 10:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 10:15 Jose Gavine Cueto
2013-11-05 10:33 ` Cyril Cressent [this message]
2013-11-05 10:42 ` Jose Gavine Cueto
2013-11-05 11:18 ` Thomas Monjalon
2013-11-05 16:47 ` Jose Gavine Cueto
2013-11-05 17:54 ` Cyril Cressent
2013-11-05 23:28 ` Jose Gavine Cueto
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=20131105103325.GA25808@debian \
--to=cyril.cressent@intel.com \
--cc=dev@dpdk.org \
--cc=pepedocs@gmail.com \
/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).