DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jose Gavine Cueto <pepedocs@gmail.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] preallocation of void ** obj_p of rte_ring_dequeue
Date: Wed, 6 Nov 2013 00:47:13 +0800	[thread overview]
Message-ID: <CAJ5bv6GcUvNHib02_Xaxs2xaz=J0XaxrqHistnKSQKz5zyYdOQ@mail.gmail.com> (raw)
In-Reply-To: <201311051218.27016.thomas.monjalon@6wind.com>

Hi Cyril,

Your'e welcome, and by the way the multiprocess example of simple_mp seems
confusing here:

static int
lcore_recv(__attribute__((unused)) void *arg)
{
unsigned lcore_id = rte_lcore_id();

printf("Starting core %u\n", lcore_id);
while (!quit){
*void *msg;*
if (*rte_ring_dequeue(recv_ring, &msg*) < 0){
usleep(5);
continue;
}
printf("core %u: Received '%s'\n", lcore_id, (char *)msg);
rte_mempool_put(message_pool, msg);
}

return 0;
}

It seems that it isn't allocating msg here, or maybe I'm just missing
something ?

Cheers,
Pepe


On Tue, Nov 5, 2013 at 7:18 PM, Thomas Monjalon
<thomas.monjalon@6wind.com>wrote:

> 05/11/2013 11:33, Cyril Cressent :
> > 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
>
> It is fixed by the patch I just sent. Thanks for reporting.
> --
> Thomas
>



-- 
To stop learning is like to stop loving.

  reply	other threads:[~2013-11-05 16:46 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
2013-11-05 10:42   ` Jose Gavine Cueto
2013-11-05 11:18   ` Thomas Monjalon
2013-11-05 16:47     ` Jose Gavine Cueto [this message]
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='CAJ5bv6GcUvNHib02_Xaxs2xaz=J0XaxrqHistnKSQKz5zyYdOQ@mail.gmail.com' \
    --to=pepedocs@gmail.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.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).