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

Jose Gavine Cueto pepedocs at gmail.com
Tue Nov 5 17:47:13 CET 2013


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


More information about the dev mailing list