DPDK usage discussions
 help / color / mirror / Atom feed
From: Huai-En Tseng <the@csie.io>
To: users@dpdk.org
Subject: [dpdk-users] rte ring dequeue cannot dequeue from rte ring
Date: Wed, 27 Mar 2019 10:39:33 +0800	[thread overview]
Message-ID: <5592CCD5-90AF-4CD1-83F9-4CA94EA08A3D@csie.io> (raw)

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


                 reply	other threads:[~2019-03-27  2:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5592CCD5-90AF-4CD1-83F9-4CA94EA08A3D@csie.io \
    --to=the@csie.io \
    --cc=users@dpdk.org \
    /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).