[dpdk-users] rte ring dequeue cannot dequeue from rte ring

Huai-En Tseng the at csie.io
Wed Mar 27 03:39:33 CET 2019


Hi Dpdk users,

I coded a program which will create 3 lcores



			 |——————recv packet then enqueue                         lcore 1
 			 |
———————|——————dequeue then do something			  lcore 2
			 |
			 |——————only recv from another port then tx		  lcore 3

when I enqueue to the rte ring from lcore 1, I can’t dequeue in lcore 2. 

I declare the ring variable in global and call rte_ring_create() before call rte_eal_remote_launch(),

The rte_ring_dequeue_burst(rte_ring,&mail,1,NULL) in a for loop always return 0

The mail variable I declare is a pointer and assign mail = (char *)malloc(sizeof(1518));

I have checked the rte_ring variable in both lcore point to same ring (by checking their memory addr is same) 

Besides, the return value of rte_ring_count() after I enqueue 1 msg is 1 but at lcore 2 rte_ring_count() always return 0

does anyone know is there anything wrong?

thanks



More information about the users mailing list