DPDK usage discussions
 help / color / mirror / Atom feed
From: Alex <cidjey1991@mail.ru>
To: users <users@dpdk.org>
Subject: [dpdk-users] Possible rte_ring issues
Date: Thu, 21 Jul 2016 19:31:22 +0300	[thread overview]
Message-ID: <1469118682.547393171@f360.i.mail.ru> (raw)

 Hi guys

I have a pipeline-like application - 3 modules (rx, worker, tx) connected by rings.

Rx module gets the packtes, timestamps them and then sends them to the worker via a ring. The ring has single producer (rx) and single consumer (worker).
I've noticed that sometimes the worker gets some packets with inconsistent timestamps: the timestamp of the next incoming packets is less then the timestamp of the previous packet. Usually after that follows another 2 or 3 packets with inconsistent timestamps. Then everything get fine for some time. It happens quite often: every 10000-2000 packets.

I've put a check function for following timestamps on the outgress and ingress points of each module. It seems that on the outgress point of the RX module (before the  rte_ring_enqueue_bulk  into the ring) the timestamps are totally fine, but on the ingress point of the worker (after rte_ring_dequeue_burst from the ring) some packets come in the wrong order. It happens only between the bursts, the packets within one burst are always consistent.

For example: the RX sent 20 packets in a bulk, the worker then recieves 10 packets in one burst and 10 in another.
So sometimes I can see, that the first burst consists of the packets 1-2-3-4-5-6-7-8-11-12 and the second consists of the packets 9-10-13-14-15-16-17-18-19-20.
(Then again - on the out point of RX everything was perfectly fine)

And that wouldn't be that much of an issue, but my worker module is highly sensitive to this sort of things. It totally breaks its logic.

Is that how the ring behaviour supposed to be? Am I missing something?  Is there a way to force rings to deliver packets in the order they were sent?

I'm using DPDK 2.2.0

Thanks in advance.

                 reply	other threads:[~2016-07-21 16:31 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=1469118682.547393171@f360.i.mail.ru \
    --to=cidjey1991@mail.ru \
    --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).