[dpdk-dev] A question of DPDK ring buffer

2013-08-20 Thread Bob Chen
ore pointers they never overlap according to the CAS atomic operation, that is our assumption. What do you reckon? Regards, Bob -- next part -- An HTML attachment was scrubbed... URL: <http://dpdk.org/ml/archives/dev/attachments/20130820/789270a6/attachmen

[dpdk-dev] A question of DPDK ring buffer

2013-08-20 Thread Bob Chen
ore pointers they never overlap according to the CAS atomic operation, that is our assumption. What do you reckon? Regards, Bob -- next part -- An HTML attachment was scrubbed... URL: <http://dpdk.org/ml/archives/dev/attachments/20130820/2b4ad6a5/attachmen

[dpdk-dev] A question of DPDK ring buffer

2013-08-20 Thread Olivier MATZ
Hello Ben, > OK, here is the question: Why DPDK has to maintain that public prod_tail > structure? Is it really necessary to endure a while loop here? If you remove this wait loop, you can trigger an issue. Imagine a case where core 0 wants to add an object in the ring: it does the CAS, modifying

[dpdk-dev] A question of DPDK ring buffer

2013-08-20 Thread Chen, Bo D
Hi Olivier, Please see my comments. do { prod_head = r->prod.head; cons_tail = r->cons.tail; prod_next = prod_head + n; success = rte_atomic32_cmpset(&r->prod.head, prod_head, prod_next); /*