X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-eventdev%2Ftest_order_queue.c;h=621367805ab592fe8684c5200b697e5a6e51928e;hb=05a732f7f78d6be13c7e593f67040cf0e55e503d;hp=7ac570c730cf37c559e167cff60432b137cf5c10;hpb=f0959283edb22dbabaf51c1e20fea466284d634e;p=dpdk.git diff --git a/app/test-eventdev/test_order_queue.c b/app/test-eventdev/test_order_queue.c index 7ac570c730..621367805a 100644 --- a/app/test-eventdev/test_order_queue.c +++ b/app/test-eventdev/test_order_queue.c @@ -9,7 +9,7 @@ /* See http://doc.dpdk.org/guides/tools/testeventdev.html for test details */ -static inline __attribute__((always_inline)) void +static __rte_always_inline void order_queue_process_stage_0(struct rte_event *const ev) { ev->queue_id = 1; /* q1 atomic queue */ @@ -19,7 +19,7 @@ order_queue_process_stage_0(struct rte_event *const ev) } static int -order_queue_worker(void *arg) +order_queue_worker(void *arg, const bool flow_id_cap) { ORDER_WORKER_INIT; struct rte_event ev; @@ -34,6 +34,9 @@ order_queue_worker(void *arg) continue; } + if (!flow_id_cap) + order_flow_id_copy_from_mbuf(t, &ev); + if (ev.queue_id == 0) { /* from ordered queue */ order_queue_process_stage_0(&ev); while (rte_event_enqueue_burst(dev_id, port, &ev, 1) @@ -50,7 +53,7 @@ order_queue_worker(void *arg) } static int -order_queue_worker_burst(void *arg) +order_queue_worker_burst(void *arg, const bool flow_id_cap) { ORDER_WORKER_INIT; struct rte_event ev[BURST_SIZE]; @@ -68,6 +71,10 @@ order_queue_worker_burst(void *arg) } for (i = 0; i < nb_rx; i++) { + + if (!flow_id_cap) + 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]); } else if (ev[i].queue_id == 1) {/* from atomic queue */ @@ -95,11 +102,19 @@ worker_wrapper(void *arg) { struct worker_data *w = arg; const bool burst = evt_has_burst_mode(w->dev_id); - - if (burst) - return order_queue_worker_burst(arg); - else - return order_queue_worker(arg); + const bool flow_id_cap = evt_has_flow_id(w->dev_id); + + if (burst) { + if (flow_id_cap) + return order_queue_worker_burst(arg, true); + else + return order_queue_worker_burst(arg, false); + } else { + if (flow_id_cap) + return order_queue_worker(arg, true); + else + return order_queue_worker(arg, false); + } } static int