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

2013-11-06 Thread Jose Gavine Cueto
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
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.


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

2013-11-06 Thread Jose Gavine Cueto
I see , now its clearer.

Thanks,
Pepe


On Wed, Nov 6, 2013 at 1:54 AM, Cyril Cressent wrote:

> On Wed, Nov 06, 2013 at 12:47:13AM +0800, Jose Gavine Cueto wrote:
>
> > 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
>
> I understand your question better now, and in that light I think my
> previous answer was confusing. Let me try to clarify:
>
> A ring only holds *pointers* to objects.  You enqueue pointers, and
> dequeue those pointers later, somewhere else, usually in another thread.
> The allocation/deallocation of the actual objects is none the concern of
> the ring and its enqueue/dequeue operations.
>
> If we take the simple_mp example, the msg dequeued by the lcore_recv()
> thread is created in mp_command.c and a pointer to that message is
> enqueued on "send_ring". If you read carefully how the rings are created
> you'll understand how "send_ring" and "recv_ring" relate to each other.
>
> I hope this is a bit clearer,
>
> Cyril
>



-- 
To stop learning is like to stop loving.


[dpdk-dev] Surprisingly high TCP ACK packets drop counter

2013-11-06 Thread Alexander Belyakov
Hello,

On Tue, Nov 5, 2013 at 6:40 PM, Prashant Upadhyaya <
prashant.upadhyaya at aricent.com> wrote:

>  Hi Alexander,
>
>
>
> I am also wondering like Olivier ? yours is a nice testcase and setup,
> hence requesting the information below instead of spending a lot of time
> reinventing the test case at my end.
>
> If you have the time on your side, it would be interesting to know what is
> the number of packets per second received inside your application on each
> of your 4 queues individually in both the usecases ? with and without RSC.
>
>
There is even packet distribution among all RX queues in both cases with
and without RSC.

Regards,
Alexander