[dpdk-users] Possible rte_ring issues

Alex cidjey1991 at mail.ru
Thu Jul 21 18:31:22 CEST 2016


 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.


More information about the users mailing list