gpudev: add alignment for memory allocation
[dpdk.git] / app / test-eventdev / test_order_queue.c
index 1511c00..80eaea5 100644 (file)
@@ -28,14 +28,14 @@ order_queue_worker(void *arg, const bool flow_id_cap)
                uint16_t event = rte_event_dequeue_burst(dev_id, port,
                                        &ev, 1, 0);
                if (!event) {
-                       if (rte_atomic64_read(outstand_pkts) <= 0)
+                       if (__atomic_load_n(outstand_pkts, __ATOMIC_RELAXED) <= 0)
                                break;
                        rte_pause();
                        continue;
                }
 
                if (!flow_id_cap)
-                       ev.flow_id = ev.mbuf->udata64;
+                       order_flow_id_copy_from_mbuf(t, &ev);
 
                if (ev.queue_id == 0) { /* from ordered queue */
                        order_queue_process_stage_0(&ev);
@@ -64,7 +64,7 @@ order_queue_worker_burst(void *arg, const bool flow_id_cap)
                                BURST_SIZE, 0);
 
                if (nb_rx == 0) {
-                       if (rte_atomic64_read(outstand_pkts) <= 0)
+                       if (__atomic_load_n(outstand_pkts, __ATOMIC_RELAXED) <= 0)
                                break;
                        rte_pause();
                        continue;
@@ -73,7 +73,7 @@ order_queue_worker_burst(void *arg, const bool flow_id_cap)
                for (i = 0; i < nb_rx; i++) {
 
                        if (!flow_id_cap)
-                               ev[i].flow_id = ev[i].mbuf->udata64;
+                               order_flow_id_copy_from_mbuf(t, &ev[i]);
 
                        if (ev[i].queue_id == 0) { /* from ordered queue */
                                order_queue_process_stage_0(&ev[i]);